diff --git a/.claude/launch.json b/.claude/launch.json new file mode 100644 index 00000000..5b5cc10a --- /dev/null +++ b/.claude/launch.json @@ -0,0 +1,15 @@ +{ + "version": "0.0.1", + "configurations": [ + { + "name": "mint-dev", + "runtimeExecutable": "npx", + "runtimeArgs": [ + "mint", + "dev" + ], + "port": 3000, + "autoPort": true + } + ] +} diff --git a/.claude/skills/release-version/SKILL.md b/.claude/skills/release-version/SKILL.md new file mode 100644 index 00000000..4f4b7ade --- /dev/null +++ b/.claude/skills/release-version/SKILL.md @@ -0,0 +1,110 @@ +--- +name: release-version +description: Use when releasing a new docs version for a product, freezing next to latest, or running the versioning scripts. Covers the ordered pre-freeze checks, the freeze itself, and the docs.json edits it does not do for you. +--- + +# Releasing a New Version + +When a product is ready to release, complete these steps in order. + +### 0. Optional pre-flight (SDK, up to a week ahead) + +Before committing to a freeze date, check how far the API reference has drifted from upstream without touching anything: + +```bash +cd scripts/api-reference && npm run release-check -- --version next --dry-run +``` + +This copies the generated pages and `docs.json` aside, regenerates them in place, reports what would change, then restores them from the copy, so the working tree ends where it started. It is not read-only while it runs: commit or stash uncommitted work under `sdk//api-reference` or `docs.json` first, because a run killed outright leaves the only copy in the scratch directory it prints on startup. Run it a week or so before a planned freeze so drift is discovered while there is still time to investigate it, not on release day when the only options are to fix it under pressure or ship it anyway. + +### 1. Update the Changelog + +Update the changelog in `next/` first, so it carries over when the freeze copies `next/` to `latest/`. If the new version is still listed as `## Unreleased` in the upstream `CHANGELOG.md`, use `--unreleased-as` to label it correctly. + +```bash +# If the version is released in CHANGELOG.md +cd scripts/versioning && npm run changelogs -- --product --target next --source --current-only + +# If the version is still listed as Unreleased in CHANGELOG.md +cd scripts/versioning && npm run changelogs -- --product --target next --source --unreleased-as --current-only +``` + +### 2. Update Version-Pinned Content in `next/` + +Do this before freezing, not after. The freeze copies `next/` to `latest/`, so anything fixed in `next/` first lands in both directories in one pass. Fixing it afterwards means editing `latest/` and then syncing every file back to `next/`. + +Two things are version-pinned and do not follow the freeze on their own: + +**Version label in front matter (SDK only).** Five pages render the version under the page title via their `description`: + +```bash +grep -rn 'description: "Version: v' sdk/next --include='*.mdx' +``` + +**GitHub links pinned to the previous release branch.** Pages link into the product repo at `release/v0..x` (SDK) or `v0..x` (CometBFT), and those refs keep pointing at the old version. Use the checker rather than a find-and-replace: + +```bash +node scripts/versioning/check-github-refs.js --product --targets next --json /tmp/flags.json +``` + +Review the report, then apply the safe rewrites with `--fix`. It bumps only what it can prove is safe and flags the rest. + +Do not blind-replace these by hand. Pinned tags and commit SHAs are deliberate historical citations, and bumping a ref under a `#L` line anchor can leave the link working while pointing at unrelated code. See the GitHub link section in [`scripts/versioning/CLAUDE.md`](../../../scripts/versioning/CLAUDE.md) for the rules and the measured failure rates. + +Hand the `--json` output to the [`update-stale-refs`](../update-stale-refs/SKILL.md) skill, which decides whether a flagged link means the page's prose needs a correction. + +A stale ref is often a symptom rather than the problem. A link that 404s at its current ref usually means the prose describes something upstream deleted, so check what the page claims before repointing the URL. + +### 2b. Regenerate and gate the API Reference (SDK only) + +The SDK API reference is generated from upstream protos at a resolved commit. Regenerate before freezing rather than after, for the same reason as step 2: the freeze changes which ref `latest` points at, and fixing content in `next/` first lands it in both directories in one pass. + +There is no scheduled regeneration any more, so this step is the only mechanism that keeps the reference current. If you remember a weekly workflow opening regeneration PRs, that is gone: docs versions freeze at release and published `latest` must not change between releases, and a cron cheap enough to run weekly can only report that upstream moved, which carries no decision attached. See [`scripts/api-reference/DESIGN.md`](../../../scripts/api-reference/DESIGN.md) for the fuller reasoning. + +```bash +cd scripts/api-reference && npm run release-check -- --version next --ref release/v0..x +``` + +Pass `--ref` pointing at the release branch. Without it, `next` resolves to `main`, and a freeze taken from that regeneration publishes development content under the release's version number, which is the bug this gate exists to catch. + +`release-check` regenerates, runs the offline checks, builds `simd` from the exact commit the pages record, starts a chain on its own ports, and runs every documented query and transaction message against it. This is a blocking gate: a freeze does not proceed while it fails. Needs Go, Node, git, `schemathesis`, and `GITHUB_TOKEN` in the environment (`export GITHUB_TOKEN=$(gh auth token)`); it says which are missing before it builds anything. + +If generation fails, a guard has fired: a fact that cannot be derived from the protos needs writing by hand, and the error names the exact item. See [`scripts/api-reference/CLAUDE.md`](../../../scripts/api-reference/CLAUDE.md). + +### 2c. Read the generated prose (SDK only) + +The gate proves that what a page tells a reader to send is accepted by a chain. Nothing in it reads the page as English, so a field can carry a correct type, a working example, and a description that is a fragment, a typo, or advice contradicting the page above it. + +Use the [`review-generated-prose`](../review-generated-prose/SKILL.md) skill on the regenerated pages. It is the last step before the freeze, because the freeze copies whatever is in `next/` into `latest/` and publishes it. + +The one thing to know before starting: never edit a generated page. Every `.mdx` under `api-reference/grpc/` is overwritten on the next run, so a fix belongs either in `lib/render.js`, where the generator's own wording lives, or upstream in the proto comments a description came from. The skill covers how to tell which. + +### 3. Freeze the Version + +Run the freeze script from `scripts/versioning/`. This promotes `next/` to `latest/`, rewrites all internal links, injects `noindex` into `next/` pages, and updates `versions.json`. + +```bash +cd scripts/versioning +NON_INTERACTIVE=1 SUBDIR= NEW_DISPLAY_VERSION= npm run freeze +``` + +Then manually update `docs.json` for the product's dropdown: + +- Add a new version entry cloned from `next/`, with all paths rewritten from `/next/` to `/latest/` +- Set `"tag": "Latest"` and `"default": true` on the `latest/` entry +- Set `"tag": "Unreleased"` on the `next/` entry +- Order: `latest` first, then `next`, then archived versions newest-first + +If the product has pre-existing archived version directories (e.g. `v0.53/`, `v10.1.x/`), tag them with `noindex` and `canonical`: + +```bash +node tag-archived.js --product --all +``` + +### 4. Check for Broken Links + +```bash +npx mint broken-links +``` + +Fix any broken links before committing. Note that this checks internal page paths only. It does not validate heading anchors and it does not check external URLs, so nothing here catches a dead or misdirected GitHub link. diff --git a/.claude/skills/review-generated-prose/SKILL.md b/.claude/skills/review-generated-prose/SKILL.md new file mode 100644 index 00000000..ea958574 --- /dev/null +++ b/.claude/skills/review-generated-prose/SKILL.md @@ -0,0 +1,67 @@ +--- +name: review-generated-prose +description: Use after regenerating the SDK API reference, as the last step before a freeze, to read the generated pages for grammar, spelling, house style, and whether they make sense to a reader. Also use when a generated page reads badly and it is unclear whether the fix belongs in the generator or upstream. +--- + +# Reviewing generated prose + +The checks around the API reference prove that what a page tells a reader to send is accepted by a chain. Nothing in them reads the page as English. A field can carry a correct type, a correct encoding note, a working example, and a description that is a sentence fragment, a typo, or advice that contradicts the page above it. + +This is the last step of a regeneration, after `npm run release-check` passes and before the freeze. + +## The rule that shapes everything here + +Never edit a generated page. + +`sdk//api-reference/grpc/*.mdx` and `rest/openapi.yaml` are overwritten wholesale on the next run. An edit to one is not a fix, it is a change that disappears silently at the next regeneration and takes its reviewer's attention with it. + +So every finding resolves to one of three places, and deciding which is the substance of this review: + +| The problem is in | Fix it in | How you can tell | +| --- | --- | --- | +| Wording the generator supplies: headings, table captions, encoding notes, the transaction envelope prose | `scripts/api-reference/lib/render.js` | The same phrasing appears on many pages, identically | +| A field or method description | Upstream, as an issue or PR against `cosmos/cosmos-sdk` proto comments | The text appears once, and reads like a developer's comment | +| One of the three hand-written pages | The page itself, which is safe to edit | `api-reference/index.mdx`, `grpc/index.mdx`, `transactions.mdx` | + +A description that is wrong upstream stays wrong until upstream fixes it. Record it, raise it, and do not paper over it locally. That is a real limit of a generated reference and it is better stated than hidden. + +## What to read + +Read the generated pages for a version, and sample rather than exhaustively grinding: the generator makes the same mistake on every page, so a defect is almost always a class. Three or four module pages of different shapes will surface nearly everything, and a pattern seen twice is a pattern. + +Prioritise the pages a reader actually lands on first: `bank`, `staking`, `gov`, `auth`, and whichever module changed most in this release. + +## What to look for + +**Grammar and spelling**, in the generator's own wording first. Upstream comment text is its own problem, but a typo the generator introduces is ours and appears everywhere. + +**House style**, from the root `CLAUDE.md`: no bold or italic in documentation content, no em-dashes, internal links as absolute Mintlify paths without `.mdx`. The generator should never emit any of these, so one occurrence is a template defect. + +**Whether it makes sense.** The question to hold is: could a competent reader who has not used this API before act on this page without guessing? Specifically: + +- Does a field description say what to put in the field, or only restate the field's name? +- Does the page state the form of every value it asks for, or does it leave a placeholder a reader cannot fill? The runners already fail on this, so anything here is something they could not see. +- Do the encoding notes agree with the transaction example directly below them? +- Does a sentence assume knowledge the page never gives, or that lives only in `grpc/index.mdx`? +- Is a heading or a note ambiguous between two methods with similar names? + +**Truncation and mangling.** Proto comments arrive with line breaks, code fences, and occasional markup. Look for a description cut mid-sentence, a stray backtick, a table cell that broke its row, a link that renders as literal text. + +## How to report + +Group findings by where they must be fixed, using the table above, because that is the order someone will act on them. For each: the page and anchor, the text as it stands, and what it should say. + +Say plainly when a class of problem is upstream and large. "Sixteen field descriptions across `staking` restate the field name and say nothing else" is a useful finding about upstream comment quality. Listing all sixteen is not. + +If nothing needs fixing, say so in a sentence. A prose review that manufactures findings to look thorough costs more attention than it saves. + +## Verifying a generator fix + +After changing `lib/render.js`, regenerate and confirm the fix landed everywhere the pattern appeared, not only on the page where you noticed it: + +```bash +cd scripts/api-reference && GITHUB_TOKEN=$(gh auth token) npm run sync -- --version next +npm test +``` + +The 77 unit tests assert generator behaviour by class, so add a case there for anything you fix. A wording defect that shipped once will ship again. diff --git a/.github/workflows/check-tutorial-forward-port.yml b/.github/workflows/check-tutorial-forward-port.yml new file mode 100644 index 00000000..acf3bbf2 --- /dev/null +++ b/.github/workflows/check-tutorial-forward-port.yml @@ -0,0 +1,63 @@ +name: Check example tutorials are forward-ported + +# The example chain tutorials are synced from cosmos/example into +# sdk/next/tutorials/example/ by a bot in that repo. Nothing carries them into +# sdk/latest/, so latest/ silently falls behind: it sat two syncs stale for +# months, telling readers localnet runs several validators when it runs one +# validator and three full nodes. +# +# These pages are the one exception to the version freeze. They instruct +# `git clone https://github.com/cosmos/example` and `git checkout main`, so they +# document whatever main is now rather than a released version. A frozen copy +# protects nothing; it just describes code the reader is not running. +# +# So this fails a PR that changes next/ without the matching latest/ change, and +# names the command that fixes it. It does not push the fix itself: the incoming +# sync PR is opened by the other repo's workflow, and a bot editing a bot's PR is +# harder to reason about than a red check with one command in it. + +on: + pull_request: + paths: + - "sdk/next/tutorials/example/**" + - "sdk/latest/tutorials/example/**" + +jobs: + forward-port: + name: latest/ matches next/ + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Forward-port into a scratch copy and diff + run: | + set -o pipefail + + # Run the real script, then ask git whether it changed anything. If it + # did, latest/ was behind and this PR would publish a stale tutorial. + node scripts/sync-next-to-latest.js sdk/next/tutorials/example/ + + if git diff --quiet -- sdk/latest/tutorials/example/; then + echo "latest/ already matches next/." + exit 0 + fi + + echo + echo "sdk/latest/tutorials/example/ is behind sdk/next/tutorials/example/." + echo + git --no-pager diff --stat -- sdk/latest/tutorials/example/ + echo + echo "These pages tell the reader to check out cosmos/example main, so a" + echo "frozen latest/ copy documents code they are not running. Run:" + echo + echo " node scripts/sync-next-to-latest.js sdk/next/tutorials/example/" + echo + echo "and commit the result to this PR." + exit 1 diff --git a/.github/workflows/sync-sdk-api-reference.yml b/.github/workflows/sync-sdk-api-reference.yml new file mode 100644 index 00000000..a4ed32dd --- /dev/null +++ b/.github/workflows/sync-sdk-api-reference.yml @@ -0,0 +1,156 @@ +name: Sync SDK API Reference + +# Regenerates the SDK API reference on demand. +# +# There is no schedule. Docs versions freeze at release, published `latest` does +# not change between releases, and the release process is the gate: see +# .claude/skills/release-version/SKILL.md and scripts/api-reference/DESIGN.md. +# +# A guard failure is routed to an issue rather than left as a red run nobody +# watches. Those guards fire when a fact that cannot be derived from the protos +# needs writing by hand, and they name the exact item. + +on: + workflow_dispatch: + inputs: + version: + description: 'Which version to regenerate. `latest` is frozen between releases, so regenerating it outside a release rewrites published pages.' + required: false + default: 'next' + type: choice + options: [next, latest, both] + +permissions: + contents: write + pull-requests: write + issues: write + +jobs: + sync: + name: Regenerate and open a PR + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install generator dependencies + working-directory: scripts/api-reference + run: npm ci || npm install + + - name: Install verification dependencies + run: pip install --quiet protobuf + + - name: Unit tests + working-directory: scripts/api-reference + run: npm test + + # The token lifts the GitHub API rate limit. Without it the SHA lookup + # fails partway through and the run produces no output at all. + - name: Regenerate + id: regenerate + working-directory: scripts/api-reference + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -o pipefail + # next only unless someone deliberately asks for more: `latest` is + # frozen between releases and regenerating it rewrites published pages. + versions="next" + if [ "${{ github.event.inputs.version }}" = "latest" ]; then versions="latest"; fi + if [ "${{ github.event.inputs.version }}" = "both" ]; then versions="latest next"; fi + echo "versions=$versions" >> "$GITHUB_OUTPUT" + + for v in $versions; do + echo "::group::sync $v" + node sync-sdk-api-reference.js --version "$v" 2>&1 | tee -a /tmp/sync.log + echo "::endgroup::" + done + + - name: Verify every example still parses + working-directory: scripts/api-reference + run: python3 verify-transaction-examples.py + + - name: Validate the OpenAPI specs + run: | + for v in ${{ steps.regenerate.outputs.versions }}; do + ./scripts/api-reference/node_modules/.bin/oas-validate --quiet \ + "sdk/$v/api-reference/rest/openapi.yaml" + done + + - name: Check for broken links + run: npx mint broken-links + + - name: Summarise what changed + id: summary + run: | + # Method-level diff, which is what a reviewer needs. A file-level diff + # of a 1.9 MB generated spec tells nobody anything. + added=$(git diff -U0 -- 'sdk/*/api-reference/grpc/*.mdx' | grep -c '^+### ' || true) + removed=$(git diff -U0 -- 'sdk/*/api-reference/grpc/*.mdx' | grep -c '^-### ' || true) + echo "added=$added" >> "$GITHUB_OUTPUT" + echo "removed=$removed" >> "$GITHUB_OUTPUT" + + { + echo "### Methods" + echo "- added: $added" + echo "- removed: $removed" + echo + echo "### Generator output" + echo '```' + grep -E 'modules|REST paths|nullable|strict|absent from' /tmp/sync.log || true + echo '```' + } > /tmp/summary.md + + if [ -n "$(git status --porcelain)" ]; then + echo "changed=true" >> "$GITHUB_OUTPUT" + else + echo "changed=false" >> "$GITHUB_OUTPUT" + fi + + - name: Open or update the PR + if: steps.summary.outputs.changed == 'true' + # Pinned to a commit rather than the mutable v6 tag: this job holds + # contents and pull-request write, so a retargeted tag would run + # third-party code with them. v6.1.0. + uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: bot/sdk-api-reference + commit-message: 'docs(sdk): regenerate the API reference from upstream' + title: 'Regenerate the Cosmos SDK API reference' + body-path: /tmp/summary.md + labels: automated + + # A guard stops the build when a fact that cannot be derived needs writing + # by hand. Left as a failed cron that would go unnoticed, so it becomes an + # issue naming the item. + - name: Raise an issue if generation failed + if: failure() + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + title="SDK API reference generation failed" + existing=$(gh issue list --state open --search "$title in:title" --json number \ + --jq '.[0].number' || true) + + body=$(printf '%s\n\n```\n%s\n```\n\n%s\n' \ + "Regeneration failed. If a guard fired, the log names the exact item that needs a definition; see scripts/api-reference/CLAUDE.md." \ + "$(tail -40 /tmp/sync.log 2>/dev/null || echo 'no generator output captured')" \ + "Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}") + + if [ -n "$existing" ]; then + gh issue comment "$existing" --body "$body" + else + gh issue create --title "$title" --body "$body" --label automated + fi diff --git a/.gitignore b/.gitignore index cde2e62a..20a95c2d 100644 --- a/.gitignore +++ b/.gitignore @@ -99,3 +99,9 @@ temporary/ # Claude Code context and working files WORKING.md + +# API reference run artifacts +scripts/api-reference/findings-*.json +scripts/api-reference/.schemathesis/ +scripts/api-reference/schemathesis.toml +scripts/api-reference/.hypothesis/ diff --git a/CLAUDE.md b/CLAUDE.md index 4a225552..59fc935c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -128,75 +128,9 @@ Reusable components — import with absolute paths (e.g. `/snippets/icons.mdx`), ## Releasing a New Version -When a product is ready to release, complete these steps in order. +The procedure lives in [`.claude/skills/release-version/SKILL.md`](.claude/skills/release-version/SKILL.md). It covers the ordered pre-freeze checks, the freeze, and the `docs.json` edits the script does not make for you. -### 1. Update the Changelog - -Update the changelog in `next/` first, so it carries over when the freeze copies `next/` to `latest/`. If the new version is still listed as `## Unreleased` in the upstream `CHANGELOG.md`, use `--unreleased-as` to label it correctly. - -```bash -# If the version is released in CHANGELOG.md -cd scripts/versioning && npm run changelogs -- --product --target next --source --current-only - -# If the version is still listed as Unreleased in CHANGELOG.md -cd scripts/versioning && npm run changelogs -- --product --target next --source --unreleased-as --current-only -``` - -### 2. Update Version-Pinned Content in `next/` - -Do this before freezing, not after. The freeze copies `next/` to `latest/`, so anything fixed in `next/` first lands in both directories in one pass. Fixing it afterwards means editing `latest/` and then syncing every file back to `next/`. - -Two things are version-pinned and do not follow the freeze on their own: - -**Version label in front matter (SDK only).** Five pages render the version under the page title via their `description`: - -```bash -grep -rn 'description: "Version: v' sdk/next --include='*.mdx' -``` - -**GitHub links pinned to the previous release branch.** Pages link into the product repo at `release/v0..x` (SDK) or `v0..x` (CometBFT), and those refs keep pointing at the old version. Use the checker rather than a find-and-replace: - -```bash -node scripts/versioning/check-github-refs.js --product --targets next --json /tmp/flags.json -``` - -Review the report, then apply the safe rewrites with `--fix`. It bumps only what it can prove is safe and flags the rest. - -Do not blind-replace these by hand. Pinned tags and commit SHAs are deliberate historical citations, and bumping a ref under a `#L` line anchor can leave the link working while pointing at unrelated code. See the GitHub link section in [`scripts/versioning/CLAUDE.md`](scripts/versioning/CLAUDE.md) for the rules and the measured failure rates. - -Hand the `--json` output to the [`update-stale-refs`](.claude/skills/update-stale-refs/SKILL.md) skill, which decides whether a flagged link means the page's prose needs a correction. - -A stale ref is often a symptom rather than the problem. A link that 404s at its current ref usually means the prose describes something upstream deleted, so check what the page claims before repointing the URL. - -### 3. Freeze the Version - -Run the freeze script from `scripts/versioning/`. This promotes `next/` to `latest/`, rewrites all internal links, injects `noindex` into `next/` pages, and updates `versions.json`. - -```bash -cd scripts/versioning -NON_INTERACTIVE=1 SUBDIR= NEW_DISPLAY_VERSION= npm run freeze -``` - -Then manually update `docs.json` for the product's dropdown: - -- Add a new version entry cloned from `next/`, with all paths rewritten from `/next/` to `/latest/` -- Set `"tag": "Latest"` and `"default": true` on the `latest/` entry -- Set `"tag": "Unreleased"` on the `next/` entry -- Order: `latest` first, then `next`, then archived versions newest-first - -If the product has pre-existing archived version directories (e.g. `v0.53/`, `v10.1.x/`), tag them with `noindex` and `canonical`: - -```bash -node tag-archived.js --product --all -``` - -### 4. Check for Broken Links - -```bash -npx mint broken-links -``` - -Fix any broken links before committing. Note that this checks internal page paths only. It does not validate heading anchors and it does not check external URLs, so nothing here catches a dead or misdirected GitHub link. +Two things worth knowing without opening it: version-pinned content is fixed in `next/` before the freeze rather than in `latest/` after, and the SDK API reference has a blocking gate (`scripts/api-reference` `npm run release-check`) that executes every documented query and transaction against a chain built from the release commit. ## Scripts @@ -216,3 +150,5 @@ npm run reset # clean + reinstall The Cosmos SDK example chain tutorials (`sdk/next/tutorials/example/`, files `00-overview.mdx` through `05-run-and-test.mdx`) are kept in sync with the `cosmos/example` repo via a bidirectional GitHub Actions workflow. When either side merges a change, a PR is opened on the other repo with content transformed between formats. The transform script lives at `scripts/docs-sync/transform.py` and is tracked in git. When editing these tutorial pages, `title:` is owned by the sync — other front matter (e.g. `description:`) is preserved. + +These pages are the one exception to the version freeze: they say `git checkout main`, so `latest/` must track `next/` rather than stay frozen. Carry changes across with `node scripts/sync-next-to-latest.js`. `sync-latest-to-next.js` refuses these paths, and the generated API reference, because it runs the wrong way for both. diff --git a/docs.json b/docs.json index 6bba8c78..609b73cf 100644 --- a/docs.json +++ b/docs.json @@ -21,10 +21,22 @@ }, "navbar": { "links": [ - { "label": "Cosmos SDK", "href": "/sdk/latest/learn" }, - { "label": "Cosmos EVM", "href": "/evm/latest/documentation/overview" }, - { "label": "IBC", "href": "/ibc/latest/intro" }, - { "label": "CometBFT", "href": "/cometbft/latest/docs/README" } + { + "label": "Cosmos SDK", + "href": "/sdk/latest/learn" + }, + { + "label": "Cosmos EVM", + "href": "/evm/latest/documentation/overview" + }, + { + "label": "IBC", + "href": "/ibc/latest/intro" + }, + { + "label": "CometBFT", + "href": "/cometbft/latest/docs/README" + } ] }, "interaction": { @@ -756,6 +768,51 @@ "pages": [ "sdk/latest/upgrade/v0.55-release" ] + }, + { + "tab": "API Reference", + "groups": [ + { + "group": "Overview", + "pages": [ + "sdk/latest/api-reference/index", + "sdk/latest/api-reference/transactions" + ] + }, + { + "group": "gRPC Services", + "pages": [ + "sdk/latest/api-reference/grpc/index", + "sdk/latest/api-reference/grpc/auth", + "sdk/latest/api-reference/grpc/authz", + "sdk/latest/api-reference/grpc/autocli", + "sdk/latest/api-reference/grpc/bank", + "sdk/latest/api-reference/grpc/base", + "sdk/latest/api-reference/grpc/consensus", + "sdk/latest/api-reference/grpc/counter", + "sdk/latest/api-reference/grpc/distribution", + "sdk/latest/api-reference/grpc/epochs", + "sdk/latest/api-reference/grpc/evidence", + "sdk/latest/api-reference/grpc/feegrant", + "sdk/latest/api-reference/grpc/gov", + "sdk/latest/api-reference/grpc/mint", + "sdk/latest/api-reference/grpc/reflection", + "sdk/latest/api-reference/grpc/slashing", + "sdk/latest/api-reference/grpc/staking", + "sdk/latest/api-reference/grpc/store", + "sdk/latest/api-reference/grpc/tx", + "sdk/latest/api-reference/grpc/upgrade", + "sdk/latest/api-reference/grpc/vesting" + ] + }, + { + "group": "REST (gRPC Gateway)", + "openapi": { + "source": "sdk/latest/api-reference/rest/openapi.yaml", + "directory": "sdk/latest/api-reference/rest" + } + } + ] } ], "tag": "Latest", @@ -1141,6 +1198,51 @@ "pages": [ "sdk/next/upgrade/v0.55-release" ] + }, + { + "tab": "API Reference", + "groups": [ + { + "group": "Overview", + "pages": [ + "sdk/next/api-reference/index", + "sdk/next/api-reference/transactions" + ] + }, + { + "group": "gRPC Services", + "pages": [ + "sdk/next/api-reference/grpc/index", + "sdk/next/api-reference/grpc/auth", + "sdk/next/api-reference/grpc/authz", + "sdk/next/api-reference/grpc/autocli", + "sdk/next/api-reference/grpc/bank", + "sdk/next/api-reference/grpc/base", + "sdk/next/api-reference/grpc/consensus", + "sdk/next/api-reference/grpc/counter", + "sdk/next/api-reference/grpc/distribution", + "sdk/next/api-reference/grpc/epochs", + "sdk/next/api-reference/grpc/evidence", + "sdk/next/api-reference/grpc/feegrant", + "sdk/next/api-reference/grpc/gov", + "sdk/next/api-reference/grpc/mint", + "sdk/next/api-reference/grpc/reflection", + "sdk/next/api-reference/grpc/slashing", + "sdk/next/api-reference/grpc/staking", + "sdk/next/api-reference/grpc/store", + "sdk/next/api-reference/grpc/tx", + "sdk/next/api-reference/grpc/upgrade", + "sdk/next/api-reference/grpc/vesting" + ] + }, + { + "group": "REST (gRPC Gateway)", + "openapi": { + "source": "sdk/next/api-reference/rest/openapi.yaml", + "directory": "sdk/next/api-reference/rest" + } + } + ] } ], "tag": "Unreleased" diff --git a/scripts/api-reference/CLAUDE.md b/scripts/api-reference/CLAUDE.md new file mode 100644 index 00000000..887092a3 --- /dev/null +++ b/scripts/api-reference/CLAUDE.md @@ -0,0 +1,92 @@ +# scripts/api-reference + +Generates the Cosmos SDK API reference: gRPC query services, transaction messages, and REST gateway routes, for `sdk/latest` and `sdk/next`. + +## Commands + +```bash +npm install # once, in this directory +npm run sync -- --version latest # regenerate one version +npm test # 77 unit tests, no network, ~110ms +npm run test-py # 32 Python unit tests, no network +npm run verify-examples # every JSON example parses against the protos +npm run conformance # REST responses match published schemas (needs a chain) +npm run query-onchain # all 123 documented queries actually run (needs a chain) +npm run tx-onchain # all 48 documented transaction messages actually run (needs a chain) +npm run release-check # the whole gate, on a chain it builds itself +``` + +`release-check` is the one command to run before a freeze. It regenerates, runs the +offline checks, builds `simd` from the exact commit the pages record, starts a chain +on its own ports, and runs every documented query and message against it. Needs Go, +Node, git and `schemathesis`; it says which are missing before it builds anything. +`--dry-run` copies the generated pages and `docs.json` aside, regenerates them in +place, reports what would change, then restores them from the copy. The tree ends +where it started, but it is rewritten while the run is in flight, so commit or +stash uncommitted generated work first. The run prints the scratch directory it +copied to, which is where the originals are if it is killed before restoring. + +The harness chain runs on RPC 26667, REST 1318, gRPC 9091, P2P 26666 and pprof 6061, +none of them the default. A developer chain on the defaults is therefore neither +disturbed nor, far worse, mistaken for the chain under test when the harness fails +to start. + +`sync` needs a `GITHUB_TOKEN` in practice, for one request: resolving a branch to a commit SHA through the GitHub API. Nothing else is authenticated, since the swagger comes from `raw.githubusercontent.com` and the descriptor from an anonymous `buf` fetch. One request never exhausts a budget on its own, but unauthenticated `api.github.com` allows 60 an hour per IP, and a shared CI runner can have spent them already. It then fails on that first request with a `403`, which `release-check` catches in preflight instead. + +## What is generated and what is not + +Generated, and overwritten on every run: + +``` +sdk//api-reference/grpc/.mdx 21 pages, from the proto descriptor +sdk//api-reference/rest/openapi.yaml from upstream's gateway swagger +docs.json the API Reference tab, rewritten in place +``` + +Hand-written, never touched by the generator: + +``` +sdk//api-reference/index.mdx interaction surfaces, ports, app.toml +sdk//api-reference/grpc/index.mdx reflection recipes, scalar encodings +sdk//api-reference/transactions.mdx build, sign, broadcast +``` + +## Do not run sync-latest-to-next on generated files + +`latest` and `next` are generated from different commits, so copying one over the other would publish `latest`'s content under `next`'s version stamp. Only the three hand-written pages are synced that way. + +## Guards + +Three facts cannot be derived from the protos, so they are written by hand and their completeness is enforced. Each guard fires because the corresponding list had already gone stale once. + +| Guard | Fails when | Fix | +| --- | --- | --- | +| scalar annotations | a `cosmos_proto.scalar` annotation has no definition in `grpc/index.mdx` | add a row to the Scalar encodings table | +| well-known types | a type with a specification-defined JSON form has no entry in `WELL_KNOWN_JSON` | add its JSON representation to `lib/render.js` | +| transaction envelope | a `cosmos.tx.v1beta1` field is unmentioned in `transactions.mdx` | mention it | + +A fourth condition is repaired rather than reported: response fields the protos define and upstream's spec omits. Upstream's swagger is generated separately from the protos and lags them, so this is expected, but publishing a schema known to be incomplete and then marking it strict fails conformance against a real response and short-changes anyone generating a client. The response-schema correction adds the field from the descriptor. The drift line still names what was repaired, currently two, both v0.55 additions, and a second pass after the repair fails the build if anything is left. + +## Why some things are the way they are + +**Operation IDs are derived, not taken from upstream.** Upstream assigns `GovV1Proposal` to two different gov routes. Mintlify builds page slugs from that field, so the collision would silently drop a page. + +**Summaries are replaced with the method name.** Upstream puts entire multi-paragraph proto comments in `summary`, and Mintlify builds filenames from it. The longest overran the filesystem limit and crashed the build. + +**Two `auth` routes are dropped.** They differ only in path parameter name, which OpenAPI forbids in one document. Both methods stay documented on the gRPC page. + +**Response schemas are made strict and nullable.** Without `additionalProperties: false` nothing could fail a conformance run, because proto3 omits defaults so no field can be marked required. The gateway emits `null` for unset message fields and empty `bytes`, so those are marked nullable per field. + +**Corrections follow `$ref`.** Four of the 108 operations reference a component instead of inlining their response. A correction that only walks inline schemas skips them silently. + +**`buf convert` is not used for verification.** It drops unknown fields everywhere and exits 0, so a completely misspelled example passes. Python's `json_format` rejects them, including inside an `Any`, which matches what a node does. + +## Testing philosophy + +Every defect found in this reference was a class rather than an instance, because a generator makes the same mistake on every page. So the unit tests assert classes rather than instances. + +Live execution is exhaustive: `query-onchain` runs all 123 documented queries and `tx-onchain` all 48 transaction messages, filled from what each page states. A command that cannot be used as written fails there, and the exceptions that genuinely cannot work are recorded in the manifests with a reason. + +A transaction is asserted on the result the chain delivered, not on the broadcast's return. `--broadcast-mode sync` reports the ante handler's verdict, so a message that pays its fee and carries a valid signature reads as success even when its module handler rejects it. Reading the result back by transaction hash is what separates the chain accepting an example from the example working, and it moved 27 of 48 messages out of the success column when it was introduced. + +The limit worth knowing: no automated check distinguishes a wrong documented value from missing chain state. A commission rate documented in the wrong encoding fails with a business error, indistinguishable from a chain that has no validator. That judgment needs a person, or an agent reading the findings file, and is worth re-running when the SDK version changes. diff --git a/scripts/api-reference/DESIGN.md b/scripts/api-reference/DESIGN.md new file mode 100644 index 00000000..f4c2716e --- /dev/null +++ b/scripts/api-reference/DESIGN.md @@ -0,0 +1,290 @@ +# Design: generated and verified API reference + +Status: approved 2026-09-03. Items 1 to 8 in scope, item 9 deferred. + +This document records why the tooling in this directory is shaped the way it is, +and what changes were agreed to harden it. `CLAUDE.md` in this directory +describes how to run it. Read this one when changing it. + +## The invariant everything follows from + +> Fill an example from what the page says, never from the source of truth the +> page is explaining. + +A verifier that reads the proto descriptor to decide what a field should contain +can pass while the page tells a reader to write a value the chain rejects. That +is not hypothetical: it happened, and the page shipped a `cosmos.Dec` encoding +that failed on chain while the descriptor-driven check stayed green. + +So both on-chain runners read the rendered page: the field table, the type links +into the Types section, the enum values, the stated encodings. Only genuinely +reader-owned values (an address, an amount, a moniker) come from outside, via +`READER_SUPPLIED` in `pagefill.py`. + +Three consequences fall out of that sentence, and they explain most of the code: + +- A field the page cannot explain is a finding, not a skip. The reader is stuck + at exactly that point, so the test is stuck too. +- The manifests hold only what cannot be derived. Anything derivable is derived, + so an upstream addition is exercised with no edit. +- Tests are not written per method. Both runners enumerate from the pages, so + the add, remove, and change cases need no test authoring at all. + +## Cadence + +Docs versions freeze at release, every few months. `next` is the working draft; +at freeze it becomes the new `latest` under the new version, and the previous +`latest` is archived. Published `latest` does not change between releases. + +Two things follow. + +Regenerating `latest` between releases is wrong, because it rewrites frozen +published pages from a branch that has moved. Only the release process may +change it. + +There is no scheduled automation. A cron cheap enough to run weekly can only +report that upstream moved, which carries no decision, and a run informative +enough to act on requires building a chain and executing 171 items, which is +only actionable at release time. Early warning is available on demand instead, +through `release-check --dry-run`, with an optional pre-flight a week before a +planned freeze. `workflow_dispatch` stays so a run can be triggered from the +Actions tab without local dependencies. + +## Changes in scope + +### 1. Ref override, so a version documents the version it claims + +`resolveRef` hardcodes `next` to `main` and `latest` to the release branch +derived from `versions.json`. Under the freeze model this publishes the wrong +content: + +1. `next` is generated from `main`. +2. Upstream tags v0.54.0. +3. The freeze promotes `next` to `latest`, stamped v0.54. +4. The published v0.54 reference documents `main`, which is v0.55 development. + +Neither existing command can produce v0.54 content. `--version next` resolves to +`main`; `--version latest` derives its ref from `versions.json`, which still +reads v0.53 until the freeze runs. + +Add `--ref ` overriding the resolved ref for one run. The release +procedure regenerates `next` from the release branch before freezing. + +Acceptance: `--ref release/v0.54.x --version next` writes pages whose +`openapi.yaml` header records a SHA on that branch, and a unit test asserts +`--ref` wins over the derived value. + +### 2. Parse-completeness guard + +`query-onchain.py` computes its own denominator from the parse: + +```python +for target, block in pagefill.queries_on(page): + commands[target] = (page, block) +... +total = len(commands) +``` + +`queries_on` skips any section whose command block does not match the `GRPCURL` +regex. Nothing asserts the total. A render change that alters the command block +therefore drops that method from the test set, prints a smaller total, and exits +0: untested and green, the one outcome this project exists to prevent. + +Both runners gain a guard: the set parsed from the pages must equal the set the +descriptor declares. A shortfall fails and names the missing methods. + +The descriptor side of that comparison is `inventory.json`, written beside the +pages: fully qualified method and message names, nothing else. No request or +response shape, no field list. The invariant this project exists to protect is +that the pages, not a script's private copy, are the source of truth for what a +reader can send and expect back; a names-only list cannot violate that, because +it asserts membership only, never content. Content still comes from parsing the +page itself. + +This is the same shape as the three generator guards, and exists for the same +reason: a list that had already gone stale once. + +Acceptance: mutating a rendered command block in a fixture makes the guard fail +and name that method. + +### 3. Delete `smoke.py` + +`query-onchain` runs all 123 of the same commands with a better filler, so the +15 curated cases are subsumed. Two things are not, and move into +`query-onchain`: + +- crossing address spaces is rejected +- `Msg` is not served on port 9090 + +Both are negative assertions, which would silently start passing if the chain +changed, so they are worth keeping. + +### 4. One manifest schema + +`query-coverage.toml` and `tx-coverage.toml` have different shapes, and +`tx-coverage.toml` carries a placeholder `[queries]` table added only to satisfy +a parser. Unify onto one schema keyed by fully qualified method or message name, +with `expect`, `note`, and optional `requires`. + +`expect` keeps a per-runner vocabulary, because the two runners assert different +things. Queries use `unfillable` and `known-failure`. Transactions use `success`, +`unauthorized`, `state-error`, and `skip`. The shared part is the file shape and +the diffing behaviour, not the value set, and each runner rejects a value outside +its own vocabulary rather than ignoring it. + +Both runners diff their manifest against the pages every run and report orphans, +so a removed method leaves a visible trace. `skip` entries are still probed, and +an unexpected success is reported, so a stale entry cannot quietly understate +what works. That mechanism has already caught five entries being too +pessimistic. Both properties survive the unification. + +`tx-coverage.toml`'s separate `[unfillable]` table folds into `expect = +"unfillable"` on the case itself. The two tables agreed by construction, since +an entry could only be in one or the other, so unifying them removes a +distinction that never carried information rather than aligning two shapes that +disagreed. + +### 5. Findings as data + +Each runner writes one findings file with a stable schema, and the terminal +summary is rendered from it: + +```json +{ + "version": "next", + "ref": "release/v0.54.x", + "sha": "2086680...", + "runner": "query-onchain", + "totals": { "pass": 80, "environmental": 25, "known": 18, "findings": 1 }, + "findings": [ + { + "page": "bank.mdx", + "anchor": "#balance", + "method": "cosmos.bank.v1beta1.Query/Balance", + "claim": "address is the address to query balances for. Encoded as cosmos.AddressString.", + "sent": { "address": "cosmos1...", "denom": "stake" }, + "response": "rpc error: code = InvalidArgument ...", + "verdict": "page-defect", + "manifest_entry": null + } + ] +} +``` + +`verdict` is one of `page-defect`, `unfillable`, `environmental`, `known`, +`unclassified`. The file is a run artifact and is never committed. This is the +contract a later agent-driven repair step would consume, which is why it is +worth fixing now rather than retrofitting into five scripts. + +### 6. Classification as data, failing loud + +`MALFORMED` and `ENVIRONMENTAL` in `query-onchain.py` are substring lists tuned +against one chain's error text, and an unmatched error currently falls through to +a guess. Move both lists into the manifest as data, and classify an unrecognized +error as `unclassified`, which is a finding. + +An SDK release that rewords an error should produce a visible unclassified +finding, not a silently rebucketed pass. + +### 7. `release-check` + +One command wrapping the full gate: + +```bash +npm run release-check -- --version next --ref release/v0.54.x +npm run release-check -- --version next --dry-run +``` + +It regenerates, runs the unit tests and `verify-examples`, builds simapp at the +resolved SHA, runs `conformance`, `query-onchain`, and `tx-onchain`, and exits +non-zero with a findings file if any page publishes something the chain rejects. + +`--dry-run` copies the generated tree and `docs.json` to a temporary directory, +regenerates in place, diffs the result against the copy, then restores from it. +So `sdk//api-reference` and `docs.json` are rewritten during the run +and put back before it exits, rather than left untouched. The restore runs in a +`finally`, which covers an exception or Ctrl-C but not a kill, so the run prints +the scratch path first and anything uncommitted under those paths is at risk +until it finishes. + +Run a few times a year with a person watching, so simapp build time and +occasional flakiness are acceptable and no non-blocking hedge is needed. + +The workflow loses its `schedule:` block and keeps `workflow_dispatch`. + +### 8. Documentation moves + +The release procedure moves from the root `CLAUDE.md` (lines 129 to 210, about a +third of a file loaded into every session) into +`.claude/skills/release-version/SKILL.md`, which loads only when someone is +doing a release. There is precedent: that section already delegates step 2 to +`.claude/skills/update-stale-refs/SKILL.md`. + +The skill carries the ordered checklist, the reason step 2 comes before the +freeze, the new `release-check` gate, and the optional pre-flight. + +Rules stay in `CLAUDE.md`: writing style, `docs.json` invariants, the +do-not-edit-archived-directories rule, internal link format. Those apply to every +session. Only the procedure moves. + +This directory's `CLAUDE.md` also has a stale claim. Its testing philosophy +section says exhaustive live execution is deliberately not attempted, which the +two runners disproved. + +### The transferable rules + +Recorded so a second product does not have to rediscover them. The pattern moves; +the Cosmos-specific code does not. + +1. Generate from a machine-readable source, never by hand. +2. Guard the hand-written remainder for completeness against that source. +3. Test by executing what the docs publish, filled only from what they state. +4. Keep a manifest of exceptions, diffed both ways, so output is deltas rather + than the same list every run. + +Three seams mark where a second product would cut: where facts come from (the +descriptor), what the page claims (`pagefill`), and how a claim is executed +(grpcurl against simapp). They are named but not abstracted, because no second +product is scheduled and an abstraction designed against one example is usually +wrong where it matters. + +## Deferred + +### 9. Machine-readable claims sidecar + +The generator would emit `.claims.json` beside each page recording the +same claims it renders, and `pagefill.py` would load it instead of parsing MDX +with twelve regexes. That removes a real design smell: what a page claims is +currently encoded twice, in two languages, with the Python side a lossy inverse +of the JavaScript renderer. + +Two conditions on ever building it. + +The sidecar must not become the source of truth. It records what the generator +intended to say; the invariant requires testing what the page actually says. A +rendering bug that drops a note while the sidecar retains it would pass. So it +ships with a consistency check asserting every claim string appears verbatim in +the rendered `.mdx`, which is also robust to the layout changes that make regexes +fragile. + +Equivalence must be proved, not argued. Dump `fill()` output for all 171 items +before and after, and diff. Chain results are the wrong comparison, being noisy +with sequence timing and chain state. + +Deferred because change 2 closes the dangerous failure mode for ten lines, which +leaves the sidecar buying quieter failure rather than more correctness. Build it +when a render change actually trips the completeness guard, or when a second +product needs the same parse. By then the evidence names the fragile parse +instead of a guess. + +## Risks + +The release-day discovery risk is accepted. With no scheduled run, a few months +of upstream drift surfaces at once during a release. It is bounded because +everything derivable is derived, so the residue is manifest lines or a note on +one of the three hand-written pages, not a rewrite. The optional pre-flight +removes the surprise for anyone who wants to spend ten minutes a week early. + +Simapp is a build dependency of the gate. If building it at an arbitrary ref +proves unreliable, the on-chain runners stop gating and the offline checks carry +the release alone, which is a real reduction in what is verified. diff --git a/scripts/api-reference/chain.py b/scripts/api-reference/chain.py new file mode 100644 index 00000000..f4fe124c --- /dev/null +++ b/scripts/api-reference/chain.py @@ -0,0 +1,273 @@ +"""Build simapp at a commit and run it, so a check runs against the documented code. + +Version skew produces false failures that cost more to discount than the build +costs to run: the public Hub runs v0.53.4 against pages documenting v0.55. + +The chain deliberately avoids every default port. A developer chain on the same +machine would otherwise either block this one from binding or, far worse, still +be there for the runners to find after this one failed to start, which would +report somebody else's chain state as the documentation's. +""" + +import json +import os +import re +import shutil +import signal +import subprocess +import time +import urllib.request +from contextlib import contextmanager +from pathlib import Path + +CHAIN_ID = "docs-check" +KEY, SECOND_KEY = "docs-primary", "docs-second" + +# Not the defaults (26657 / 1317 / 9090 / 26656 / 6060), on purpose. See the +# module docstring. +RPC_PORT = 26667 +REST_PORT = 1318 +GRPC_PORT = 9091 +P2P_PORT = 26666 +PPROF_PORT = 6061 + +NODE = f"tcp://localhost:{RPC_PORT}" +REST = f"http://localhost:{REST_PORT}" +GRPC = f"localhost:{GRPC_PORT}" + + +def _run(args, **kwargs): + return subprocess.run(args, check=True, capture_output=True, text=True, **kwargs) + + +def build(repository: str, sha: str, workdir: Path) -> Path: + """Clone at a SHA and build simd. Returns the binary path.""" + source = workdir / "cosmos-sdk" + origin = f"https://github.com/{repository}.git" + # A workdir reused across repositories would otherwise fetch the requested + # commit from the wrong origin, and either fail confusingly or, if the SHA + # happens to resolve, build the wrong code. + if source.exists() and _remote(source) not in (origin, origin.removesuffix(".git")): + shutil.rmtree(source) + if not source.exists(): + # A blobless clone of cosmos-sdk is the difference between a minute and + # ten. --no-checkout because the branch tip is not what gets built. + _run(["git", "clone", "--filter=blob:none", "--no-checkout", origin, str(source)]) + # The commit may be behind a branch tip or on no branch at all, so ask for it + # by name rather than assuming the clone already has it. + _run(["git", "-C", str(source), "fetch", "--filter=blob:none", "origin", sha]) + _run(["git", "-C", str(source), "checkout", "--force", sha]) + + # simd is a main package under the simapp module, which is its own Go module + # with replace directives back to the repository root. + simapp = source / "simapp" + if not (simapp / "simd").is_dir(): + raise RuntimeError( + f"{simapp}/simd is not there; this SDK version puts the binary elsewhere" + ) + binary = workdir / "simd" + _run(["go", "build", "-o", str(binary), "./simd"], cwd=str(simapp)) + return binary + + +def _remote(source: Path) -> str: + try: + return _run(["git", "-C", str(source), "remote", "get-url", "origin"]).stdout.strip() + except (subprocess.CalledProcessError, FileNotFoundError): + return "" + + +def _genesis(simd: Path, home: Path, args: list) -> None: + """Run a genesis subcommand, whichever level this SDK version puts it at.""" + try: + _run([str(simd), "genesis", *args, "--home", str(home)]) + except subprocess.CalledProcessError: + # Older versions have these at the top level, without the `genesis` group. + _run([str(simd), *args, "--home", str(home)]) + + +def configure(home: Path) -> None: + """Bind every server to this harness's own ports, and turn the API server on. + + A global `enable = false` -> `enable = true` replace is what the plan called + for and it is not safe: it would also flip anything else in the file that + happens to be off. This walks the sections and touches only the two that the + runners need. + """ + app = home / "config" / "app.toml" + wanted = { + "api": {"enable": "true", "address": f'"tcp://localhost:{REST_PORT}"'}, + "grpc": {"enable": "true", "address": f'"localhost:{GRPC_PORT}"'}, + } + app.write_text(_set_in_sections(app.read_text(), wanted)) + + seen = _read_sections(app.read_text()) + for section, keys in wanted.items(): + for key, value in keys.items(): + if seen.get((section, key)) != value: + raise RuntimeError( + f"app.toml [{section}] {key} is {seen.get((section, key))!r}, " + f"wanted {value!r}; the config layout changed" + ) + + config = home / "config" / "config.toml" + text = config.read_text() + text = _set_in_sections(text, { + "rpc": { + "laddr": f'"tcp://127.0.0.1:{RPC_PORT}"', + # CometBFT's pprof listener is another default port to stay off. + "pprof_laddr": f'"localhost:{PPROF_PORT}"', + }, + "p2p": {"laddr": f'"tcp://0.0.0.0:{P2P_PORT}"'}, + }) + config.write_text(text) + + +SECTION = re.compile(r"^\s*\[(?P[^\]]+)\]\s*$") +ASSIGNMENT = re.compile(r"^(?P[A-Za-z0-9_\-]+)\s*=\s*(?P.*?)\s*$") + + +def _set_in_sections(text: str, wanted: dict) -> str: + section, lines = None, [] + for line in text.splitlines(): + header = SECTION.match(line) + if header: + section = header.group("name") + else: + assignment = ASSIGNMENT.match(line) + if assignment and section in wanted: + key = assignment.group("key") + if key in wanted[section]: + line = f"{key} = {wanted[section][key]}" + lines.append(line) + return "\n".join(lines) + "\n" + + +def _read_sections(text: str) -> dict: + section, values = None, {} + for line in text.splitlines(): + header = SECTION.match(line) + if header: + section = header.group("name") + continue + assignment = ASSIGNMENT.match(line) + if assignment and section: + values[(section, assignment.group("key"))] = assignment.group("value") + return values + + +def init(simd: Path, home: Path) -> None: + if home.exists(): + shutil.rmtree(home) + common = ["--home", str(home), "--keyring-backend", "test"] + + _run([str(simd), "init", "docs", "--chain-id", CHAIN_ID, "--home", str(home)]) + for name in (KEY, SECOND_KEY): + _run([str(simd), "keys", "add", name, *common]) + + genesis = home / "config" / "genesis.json" + document = json.loads(genesis.read_text()) + denom = document["app_state"]["staking"]["params"]["bond_denom"] + + for name in (KEY, SECOND_KEY): + address = _run([str(simd), "keys", "show", name, "-a", *common]).stdout.strip() + _genesis(simd, home, ["add-genesis-account", address, f"100000000000{denom}", + "--keyring-backend", "test"]) + + _genesis(simd, home, ["gentx", KEY, f"70000000000{denom}", + "--chain-id", CHAIN_ID, "--keyring-backend", "test"]) + _genesis(simd, home, ["collect-gentxs"]) + + configure(home) + + +def wait_for_block(rest: str, timeout: int = 90, process=None, log: Path = None) -> None: + deadline = time.time() + timeout + while time.time() < deadline: + if process is not None and process.poll() is not None: + raise RuntimeError( + f"simd exited with {process.returncode} before producing a block\n" + + _tail(log) + ) + try: + with urllib.request.urlopen( + f"{rest}/cosmos/base/tendermint/v1beta1/blocks/latest", timeout=5 + ) as response: + if int(json.load(response)["block"]["header"]["height"]) >= 1: + return + except Exception: # noqa: BLE001 + pass + time.sleep(1) + raise RuntimeError(f"no block within {timeout}s; check the node log\n" + _tail(log)) + + +def _tail(log: Path, lines: int = 30) -> str: + if not log or not Path(log).exists(): + return "" + return "\n".join(Path(log).read_text().splitlines()[-lines:]) + + +@contextmanager +def running(repository: str, sha: str, workdir: Path): + workdir = Path(workdir) + workdir.mkdir(parents=True, exist_ok=True) + simd = build(repository, sha, workdir) + home = workdir / "home" + init(simd, home) + + log_path = workdir / "node.log" + log = open(log_path, "w") + # Its own process group: simd starts children, and killing only the parent + # leaves a node holding the ports. + process = subprocess.Popen( + [str(simd), "start", + "--home", str(home), + "--api.enable", + "--grpc.enable", + "--api.address", f"tcp://localhost:{REST_PORT}", + "--grpc.address", GRPC, + "--rpc.laddr", f"tcp://127.0.0.1:{RPC_PORT}", + "--p2p.laddr", f"tcp://0.0.0.0:{P2P_PORT}"], + stdout=log, stderr=subprocess.STDOUT, start_new_session=True, + ) + try: + wait_for_block(REST, process=process, log=log_path) + yield { + "simd": str(simd), "home": str(home), "chain_id": CHAIN_ID, + "node": NODE, "rest": REST, "grpc": GRPC, + "key": KEY, "second_key": SECOND_KEY, "log": str(log_path), + } + finally: + _stop(process) + log.close() + + +def _stop(process) -> None: + """Tear the node down without ever raising. + + This runs in a `finally`, so anything it raises replaces the exception that + brought us here. The process can exit between the poll and the signal, which + is a ProcessLookupError out of a teardown path and a lost error message. + """ + if process.poll() is not None: + return + try: + group = os.getpgid(process.pid) + except ProcessLookupError: + return + _signal(group, signal.SIGTERM) + try: + process.wait(timeout=30) + except subprocess.TimeoutExpired: + _signal(group, signal.SIGKILL) + try: + process.wait(timeout=10) + except subprocess.TimeoutExpired: + print(f"warning: simd (pid {process.pid}) did not die; kill it by hand") + + +def _signal(group: int, which) -> None: + try: + os.killpg(group, which) + except (ProcessLookupError, PermissionError): + pass diff --git a/scripts/api-reference/conformance.py b/scripts/api-reference/conformance.py new file mode 100644 index 00000000..65d3fbfd --- /dev/null +++ b/scripts/api-reference/conformance.py @@ -0,0 +1,163 @@ +#!/usr/bin/env python3 +"""Check that a node's REST responses match the schemas this reference publishes. + +The generated OpenAPI spec describes 107 routes, almost all of them queries. If a +schema disagrees with what a node returns, anyone generating a client from it +reads the wrong field names and gets undefined back. That defect shipped once: +the spec documented `nextKey` while the gateway emits `next_key`. + +Schemathesis does the comparison. This wraps it with the two things it cannot +know: which real values to put in path parameters, and how to report a mismatch +as a documentation defect rather than as an API bug. + +Point it at a local simapp rather than a public endpoint. simapp runs the exact +SDK version the pages document and registers every module, so a failure is a real +disagreement instead of a version or module-availability artifact. + +Usage: + python3 conformance.py --version latest --url http://localhost:1317 +""" + +import argparse +import json +import subprocess +import sys +import urllib.request +from pathlib import Path + +HERE = Path(__file__).resolve().parent +REPO_ROOT = HERE.parent.parent + + +def get(url: str): + with urllib.request.urlopen(url, timeout=15) as response: + return json.load(response) + + +def discover_fixtures(base: str) -> dict: + """Learn real parameter values from the chain under test. + + No tool can guess a valid bech32 address for a given chain, and a generated + one fails the checksum. Asking the chain is the only reliable source, and it + keeps the fixtures correct when the chain is rebuilt. + """ + fixtures = {} + + params = get(f"{base}/cosmos/staking/v1beta1/params") + fixtures["denom"] = params["params"]["bond_denom"] + + validators = get(f"{base}/cosmos/staking/v1beta1/validators?pagination.limit=1") + if validators.get("validators"): + fixtures["validator_addr"] = validators["validators"][0]["operator_address"] + + accounts = get(f"{base}/cosmos/auth/v1beta1/accounts?pagination.limit=5") + for account in accounts.get("accounts", []): + address = account.get("address") or account.get("base_account", {}).get("address") + if address and address.startswith("cosmos1"): + fixtures["address"] = address + break + + block = get(f"{base}/cosmos/base/tendermint/v1beta1/blocks/latest") + fixtures["height"] = block["block"]["header"]["height"] + + return fixtures + + +# Path parameter names in the generated spec, mapped to the fixture that fits. +# Names come from the protos, so they are stable across SDK versions. +PARAMETER_FIXTURES = { + "address": "address", + "delegator_addr": "address", + "delegatorAddr": "address", + "granter": "address", + "grantee": "address", + "depositor": "address", + "voter": "address", + "validator_addr": "validator_addr", + "validatorAddr": "validator_addr", + "denom": "denom", + "height": "height", +} + + +def write_config(config_path: Path, spec: Path, fixtures: dict) -> None: + """A schemathesis.toml pinning parameters and running one check. + + Only response_schema_conformance is enabled. The other checks assert things + about an API under development, which is not what this is: the node is + correct by definition and the documentation is what may be wrong. + """ + lines = [ + "# Generated by conformance.py. Values are discovered from the chain", + "# under test, so this file is disposable rather than maintained.", + "", + "[checks]", + "enabled = false", + "response_schema_conformance.enabled = true", + "", + "[parameters]", + ] + for name, fixture in PARAMETER_FIXTURES.items(): + if fixture in fixtures: + lines.append(f'"path.{name}" = "{fixtures[fixture]}"') + lines.append("") + config_path.write_text("\n".join(lines) + "\n") + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--version", default="latest", choices=["latest", "next"]) + parser.add_argument("--url", default="http://localhost:1317") + parser.add_argument("--schemathesis", default="schemathesis") + parser.add_argument("--report", default=None, help="write the JSON report here") + args = parser.parse_args() + + spec = REPO_ROOT / "sdk" / args.version / "api-reference" / "rest" / "openapi.yaml" + if not spec.exists(): + print(f"no spec at {spec}", file=sys.stderr) + return 1 + + print(f"Discovering fixtures from {args.url}") + try: + fixtures = discover_fixtures(args.url) + except Exception as error: # noqa: BLE001 - any failure here is fatal and worth showing + print(f" could not reach the chain: {error}", file=sys.stderr) + print(" start a local simapp with its API server enabled first", file=sys.stderr) + return 1 + for name, value in fixtures.items(): + print(f" {name}: {value}") + + # Discovered automatically from the working directory; there is no flag. + config = Path.cwd() / "schemathesis.toml" + write_config(config, spec, fixtures) + + command = [ + args.schemathesis, + "run", + str(spec), + "--url", + args.url, + # The examples phase needs `example` values in the spec, which upstream + # does not provide. Coverage is deterministic and visits every operation. + "--phases", + "coverage", + "--continue-on-failure", + ] + if args.report: + command += ["--report", "json", "--report-json-path", args.report] + + print(f"\nRunning {' '.join(command[:3])} against {args.url}") + result = subprocess.run(command) + + if result.returncode != 0: + print( + "\nA failure here means a response did not match the schema this " + "reference publishes. The node is the source of truth: the fix is " + "almost always to the generator or the spec, not to the chain.", + file=sys.stderr, + ) + return result.returncode + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/api-reference/findings.py b/scripts/api-reference/findings.py new file mode 100644 index 00000000..0b3db6e8 --- /dev/null +++ b/scripts/api-reference/findings.py @@ -0,0 +1,96 @@ +"""The structured result of a runner. + +One document per run, with the terminal summary rendered from it rather than +printed alongside it, so what a person reads and what a later repair step +consumes cannot disagree. + +The document is a run artifact. It is never committed: it describes one chain +at one moment, and a committed copy would go stale silently. +""" + +import json +from dataclasses import dataclass, asdict +from pathlib import Path + +# "stale-manifest-entry" is about the manifest rather than the page: what the +# manifest records is no longer true of the documentation, usually because +# upstream supplied what a page was missing. Surfacing that is the whole point +# of diffing the manifest against the pages every run. +VERDICTS = ("page-defect", "unfillable", "environmental", "known", "unclassified", + "stale-manifest-entry") + + +@dataclass +class Finding: + page: str + anchor: str + method: str + claim: str + sent: dict | None + response: str + verdict: str + manifest_entry: str | None + + +def claim_for(fields: dict, sent: dict | None) -> str: + """What the page told the reader to put in the fields that were actually sent. + + A finding whose claim is empty is not the contract DESIGN.md section 5 + describes: a repair step reading the file has to be told what the page said + before it can decide whether the page or the chain is wrong. The page's own + field table is in hand wherever a chain rejection is recorded, so the notes + for the fields present in the payload are joined and carried along. + """ + if not sent or not fields: + return "" + notes = [] + for key in sent: + note = fields.get(key, ("", ""))[0] + if note: + notes.append(f"{key}: {note}") + return " ".join(notes) + + +def document(version: str, repository: str, ref: str, sha: str, runner: str, + totals: dict, items) -> dict: + items = list(items) + for item in items: + if item.verdict not in VERDICTS: + raise ValueError(f"{item.verdict!r} is not one of {VERDICTS}") + + return { + "version": version, + "repository": repository, + "ref": ref, + "sha": sha, + "runner": runner, + "totals": {**totals, "findings": len(items)}, + "findings": [asdict(item) for item in items], + } + + +def write(path, document: dict) -> None: + Path(path).write_text(f"{json.dumps(document, indent=2, sort_keys=False)}\n") + + +def render(document: dict) -> str: + totals = ", ".join(f"{value} {key}" for key, value in document["totals"].items() if value) + lines = [ + f"{document['runner']} on {document['version']} at " + f"{document['repository']}@{document['ref']} ({document['sha'][:12]}): {totals}" + ] + + if not document["findings"]: + lines.append("no findings") + return "\n".join(lines) + + for item in document["findings"]: + lines.append(f"\n {item['page']}{item['anchor']} {item['method']}") + lines.append(f" verdict {item['verdict']}") + if item["claim"]: + lines.append(f" page says {item['claim']}") + if item["sent"] is not None: + lines.append(f" sent {json.dumps(item['sent'])}") + lines.append(f" chain said {item['response']}") + + return "\n".join(lines) diff --git a/scripts/api-reference/lib/checks.js b/scripts/api-reference/lib/checks.js new file mode 100644 index 00000000..8e62469a --- /dev/null +++ b/scripts/api-reference/lib/checks.js @@ -0,0 +1,178 @@ +// Guards over the parts of the reference that cannot be derived from upstream. +// +// The generator reads everything it can from the descriptor, but a few facts +// live outside the protos: what an encoding convention means, and how a +// well-known type is represented in JSON. Those are written by hand. These +// checks make sure the hand-written half stays complete as upstream changes, +// and that generated output can shrink as well as grow. + +import fs from 'fs'; +import path from 'path'; + +import { WELL_KNOWN_JSON, SPECIAL_JSON_TYPES } from './render.js'; + +/** + * The generated pages annotate fields with scalar conventions taken from the + * protos, as `Encoded as cosmos.Dec`. What those conventions mean is not in the + * protos, so it is written by hand in grpc/index.mdx, and a hand-written list + * next to generated content is exactly the thing that goes stale: upstream + * added cosmos.ConsensusAddressString and the page did not know. + * + * The prose stays hand-written. Its completeness does not: every annotation the + * descriptor actually uses must be defined on that page, or the run fails. + */ +export function checkScalarAnnotationsDocumented(types, outputRoot) { + const used = new Map(); + for (const message of types.messages.values()) { + for (const field of message.fields) { + if (!field.scalarHint) continue; + // Keep one example of where it is used, so whoever has to define it can + // go and look at a real field rather than hunting for the annotation. + if (!used.has(field.scalarHint)) { + used.set(field.scalarHint, `${message.fullName}.${field.name}`); + } + } + } + + const pagePath = path.join(outputRoot, 'grpc', 'index.mdx'); + if (!fs.existsSync(pagePath)) return [...used.keys()]; + + const page = fs.readFileSync(pagePath, 'utf8'); + const undocumented = [...used.keys()].filter((name) => !page.includes(`\`${name}\``)).sort(); + + if (undocumented.length) { + const lines = undocumented.map((name) => ` ${name} (used by ${used.get(name)})`); + throw new Error( + [ + `${undocumented.length} scalar annotation(s) appear in the protos but are not defined in ${path.relative(process.cwd(), pagePath)}:`, + ...lines, + '', + 'Field tables render "Encoded as " with nowhere for a reader to look it up.', + 'Add a row to the Scalar encodings table on that page describing what the encoding means.', + ].join('\n'), + ); + } + return [...used.keys()]; +} + +/** + * Deletes generated pages for modules that no longer exist upstream. + * + * Without this a module removed in a new SDK version keeps its page on disk. + * The nav rewrite drops it, so nobody notices, but the URL keeps serving a page + * frozen at whatever the module looked like before it was deleted. Generated + * output has to be able to shrink, not only grow. + * + * index.mdx is hand-written and lives in the same directory, so it is exempt. + */ +export function pruneRemovedModulePages(outputRoot, moduleNames) { + const dir = path.join(outputRoot, 'grpc'); + if (!fs.existsSync(dir)) return []; + + const keep = new Set([...moduleNames.map((m) => `${m}.mdx`), 'index.mdx']); + const removed = fs.readdirSync(dir).filter((f) => f.endsWith('.mdx') && !keep.has(f)); + + for (const file of removed) fs.unlinkSync(path.join(dir, file)); + return removed; +} + +/** + * Well-known types carry JSON representations unrelated to their proto fields, + * and the renderer knows a fixed set of them. One it does not know gets expanded + * structurally, which is how Duration shipped as {"seconds":0,"nanos":0} instead + * of "604800s": confidently wrong, and silent. + * + * A new SDK version reaching for a well-known type we do not handle should stop + * the build rather than produce examples nobody can use. + */ +export function checkWellKnownTypesHandled(types) { + const unhandled = new Set(); + for (const message of types.messages.values()) { + for (const field of message.fields) { + const name = field.typeName; + if (!name || !SPECIAL_JSON_TYPES.has(name)) continue; + if (name === 'google.protobuf.Any' || name in WELL_KNOWN_JSON) continue; + unhandled.add(name); + } + } + + if (unhandled.size) { + throw new Error( + `these types have a specification-defined JSON form but no representation in lib/render.js: ${[...unhandled].sort().join(', ')}\n` + + 'Expanding them structurally produces examples that do not match the wire format. Add each to WELL_KNOWN_JSON.', + ); + } +} + +/** + * The transactions page lists the fields a transaction envelope carries beyond + * the abridged example. That list mirrors cosmos.tx.v1beta1, so it goes stale + * exactly the way the scalar table did: v0.55 added `unordered`, + * `timeout_timestamp` and `tip`, and the page did not know. + * + * The prose stays hand-written. Its completeness is checked here. + */ +const ENVELOPE_MESSAGES = [ + 'cosmos.tx.v1beta1.TxBody', + 'cosmos.tx.v1beta1.AuthInfo', + 'cosmos.tx.v1beta1.Fee', +]; + +export function checkTxEnvelopeDocumented(types, outputRoot) { + const pagePath = path.join(outputRoot, 'transactions.mdx'); + if (!fs.existsSync(pagePath)) return []; + + const page = fs.readFileSync(pagePath, 'utf8'); + const missing = []; + + for (const messageName of ENVELOPE_MESSAGES) { + const message = types.messages.get(messageName); + if (!message) continue; + for (const field of message.fields) { + // Either spelling counts: named in prose as `memo`, or shown in the + // envelope example as "memo". + const mentioned = + page.includes(`\`${field.name}\``) || page.includes(`"${field.name}"`); + if (!mentioned) missing.push(`${messageName}.${field.name}`); + } + } + + if (missing.length) { + throw new Error( + [ + `${missing.length} transaction envelope field(s) are not mentioned in ${path.relative(process.cwd(), pagePath)}:`, + ...missing.map((name) => ` ${name}`), + '', + 'A reader comparing the page to real CLI output finds fields the page never explains.', + ].join('\n'), + ); + } + return missing; +} + +/** + * Modules whose every method is deprecated. + * + * A deprecated method among live ones stays documented: a reader who meets it + * in reflection output needs to identify it, and the page carries a warning. + * A module with nothing else is different. It becomes a sidebar entry and a + * page whose entire content is something nobody should call. + * + * Requires at least one method, so a module that defines only types is kept + * rather than dropped on a vacuous truth. + */ +export function dropFullyDeprecatedModules(modules) { + const kept = []; + const dropped = []; + + for (const module of modules) { + const methods = module.services.flatMap((service) => service.methods); + if (methods.length && methods.every((method) => method.deprecated)) { + dropped.push(module.name); + } else { + kept.push(module); + } + } + + return { kept, dropped }; +} diff --git a/scripts/api-reference/lib/descriptor.js b/scripts/api-reference/lib/descriptor.js new file mode 100644 index 00000000..eb94c979 --- /dev/null +++ b/scripts/api-reference/lib/descriptor.js @@ -0,0 +1,304 @@ +// Turns a buf-generated FileDescriptorSet into the model the renderer consumes. +// +// Nothing here is hand-maintained: the module list, the service list, and the +// ordering all fall out of the descriptor. A module that appears upstream shows +// up in the output on the next run without anyone editing this file. + +const SOURCE_PATH_SERVICE = 6; +const SOURCE_PATH_MESSAGE = 4; +const SOURCE_PATH_METHOD = 2; +const SOURCE_PATH_FIELD = 2; + +const HTTP_OPTION = '[google.api.http]'; +const ADDED_IN_METHOD = '[cosmos_proto.method_added_in]'; +const ADDED_IN_FIELD = '[cosmos_proto.field_added_in]'; +const SCALAR_OPTION = '[cosmos_proto.scalar]'; +const SIGNER_OPTION = '[cosmos.msg.v1.signer]'; +const AMINO_NAME_OPTION = '[amino.name]'; +const CUSTOM_TYPE_OPTION = '[gogoproto.customtype]'; +const ACCEPTS_INTERFACE = '[cosmos_proto.accepts_interface]'; +const IMPLEMENTS_INTERFACE = '[cosmos_proto.implements_interface]'; + +const HTTP_VERBS = ['get', 'post', 'put', 'patch', 'delete']; + +// Scalar proto types render as-is; TYPE_MESSAGE and TYPE_ENUM carry a typeName. +const SCALAR_TYPES = { + TYPE_DOUBLE: 'double', + TYPE_FLOAT: 'float', + TYPE_INT64: 'int64', + TYPE_UINT64: 'uint64', + TYPE_INT32: 'int32', + TYPE_FIXED64: 'fixed64', + TYPE_FIXED32: 'fixed32', + TYPE_BOOL: 'bool', + TYPE_STRING: 'string', + TYPE_BYTES: 'bytes', + TYPE_UINT32: 'uint32', + TYPE_SFIXED32: 'sfixed32', + TYPE_SFIXED64: 'sfixed64', + TYPE_SINT32: 'sint32', + TYPE_SINT64: 'sint64', +}; + +// sourceCodeInfo addresses every element by a path of field numbers and indexes. +// Flattening it once up front is cheaper than searching per lookup. +function indexComments(file) { + const byPath = new Map(); + for (const loc of file.sourceCodeInfo?.location ?? []) { + const text = (loc.leadingComments ?? '').trim(); + if (text) byPath.set(loc.path.join('.'), cleanComment(text)); + } + return byPath; +} + +// Proto comments arrive with the leading space that followed each `//`, and +// wrap mid-sentence. Unwrap paragraphs so they render as prose rather than +// keeping the source file's line breaks. +function cleanComment(text) { + const lines = text.split('\n').map((l) => l.replace(/^ /, '')); + const paragraphs = []; + let current = []; + for (const line of lines) { + if (line.trim() === '') { + if (current.length) paragraphs.push(current.join(' ')); + current = []; + } else { + current.push(line.trim()); + } + } + if (current.length) paragraphs.push(current.join(' ')); + return paragraphs.join('\n\n'); +} + +// Two normalizations are needed before an annotation path can be compared to a +// generated OpenAPI path. +// +// `{name=foo/*}` is a gRPC-gateway matching rule rather than part of the URL +// shape, so the `=...` half goes. +// +// Parameter names then have to agree. Annotations carry the proto field name +// (`{account_id}`) while protoc-gen-openapiv2 emits the JSON name +// (`{accountId}`). Dropping the names entirely would be simpler but would +// conflate genuinely distinct routes: auth binds both `bech32/{address_bytes}` +// and `bech32/{address_string}`, which are identical once the names are gone. +function normalizeHttpPath(path) { + return path.replace(/\{([^}=]+)(=[^}]*)?\}/g, (_, name) => `{${toJsonName(name)}}`); +} + +function toJsonName(name) { + return name.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase()); +} + +function readHttpRule(options) { + const rule = options?.[HTTP_OPTION]; + if (!rule) return null; + for (const verb of HTTP_VERBS) { + if (rule[verb]) return { verb, path: normalizeHttpPath(rule[verb]) }; + } + // `custom` bindings exist in the spec but the SDK does not use them. Treat an + // unrecognised shape as absent rather than guessing at it. + return null; +} + +// `cosmos.bank.v1beta1` and `cosmos.base.node.v1beta1` both belong to one module +// as far as a reader is concerned. The second segment is that module. +function moduleOf(pkg) { + const parts = pkg.split('.'); + return parts.length > 1 ? parts[1] : parts[0]; +} + +// A Msg service is not served by the gRPC query router, so it must not be +// rendered as a callable endpoint. See baseapp/msg_service_router.go. +function serviceKind(name) { + return name === 'Msg' ? 'msg' : 'query'; +} + +function buildTypeIndex(files) { + const messages = new Map(); + const enums = new Map(); + + const walkMessage = (pkg, prefix, msg, file, comments, path) => { + const fullName = `${prefix}.${msg.name}`; + messages.set(fullName, { + fullName, + name: msg.name, + package: pkg, + file: file.name, + comment: comments.get(path.join('.')) ?? '', + fields: (msg.field ?? []).map((field, i) => ({ + name: field.name, + jsonName: field.jsonName, + number: field.number, + repeated: field.label === 'LABEL_REPEATED', + optional: field.proto3Optional === true, + type: SCALAR_TYPES[field.type] ?? null, + typeName: field.typeName ? field.typeName.replace(/^\./, '') : null, + scalarHint: field.options?.[SCALAR_OPTION] ?? null, + // Distinguishes the three wire forms a cosmos.Dec can take. A field + // carrying the LegacyDec custom type is marshalled as a scaled integer; + // one without holds an already-formatted decimal. + customType: field.options?.[CUSTOM_TYPE_OPTION] ?? null, + addedIn: field.options?.[ADDED_IN_FIELD] ?? null, + deprecated: field.options?.deprecated === true, + // Fields in a oneof share an index. Only one may be set at a time, so an + // example that sets them all is not a valid message. + oneofIndex: field.oneofIndex ?? null, + // An Any field declares which interface it accepts. Messages declare + // which they implement. Together they name the concrete type URLs a + // reader may put in that field, which is otherwise undiscoverable. + acceptsInterface: field.options?.[ACCEPTS_INTERFACE] ?? null, + comment: comments.get([...path, SOURCE_PATH_FIELD, i].join('.')) ?? '', + })), + // A map field compiles to a repeated synthetic nested message. Those + // are an implementation detail and must not surface as documented types. + isMapEntry: msg.options?.mapEntry === true, + // Which field names the account that must sign a transaction carrying + // this message. `authority` means the governance module account, which no + // user holds a key for, so the message only executes via a passed proposal. + signers: msg.options?.[SIGNER_OPTION] ?? null, + // The name this message is registered under for Amino JSON signing, which + // is used by signers that display a transaction for human approval, such as + // hardware wallets. Frozen for signature compatibility, so many + // predate the current naming convention. + aminoName: msg.options?.[AMINO_NAME_OPTION] ?? null, + implementsInterface: msg.options?.[IMPLEMENTS_INTERFACE] ?? null, + }); + + (msg.nestedType ?? []).forEach((nested, i) => { + walkMessage(pkg, fullName, nested, file, comments, [...path, 3, i]); + }); + (msg.enumType ?? []).forEach((e, i) => { + enums.set(`${fullName}.${e.name}`, { + fullName: `${fullName}.${e.name}`, + values: (e.value ?? []).map((v) => ({ + name: v.name, + deprecated: v.options?.deprecated === true, + })), + }); + }); + }; + + for (const file of files) { + const comments = indexComments(file); + const pkg = file.package ?? ''; + (file.messageType ?? []).forEach((msg, i) => { + walkMessage(pkg, pkg, msg, file, comments, [SOURCE_PATH_MESSAGE, i]); + }); + (file.enumType ?? []).forEach((e) => { + enums.set(`${pkg}.${e.name}`, { + fullName: `${pkg}.${e.name}`, + values: (e.value ?? []).map((v) => ({ + name: v.name, + deprecated: v.options?.deprecated === true, + })), + }); + }); + } + + return { messages, enums }; +} + +function buildModules(files) { + const modules = new Map(); + + for (const file of files) { + if (!file.service?.length) continue; + const pkg = file.package ?? ''; + + // The proto tree vendors its dependencies, so a descriptor built from it + // also contains tendermint.abci.ABCI, the consensus interface between + // CometBFT and the application. That is not an SDK module API and belongs + // in the CometBFT docs. This is a namespace boundary rather than a list of + // modules, so a module added upstream still appears without an edit here. + if (!pkg.startsWith('cosmos.')) continue; + + const comments = indexComments(file); + const moduleName = moduleOf(pkg); + + if (!modules.has(moduleName)) { + modules.set(moduleName, { name: moduleName, services: [] }); + } + + file.service.forEach((service, svcIndex) => { + const servicePath = [SOURCE_PATH_SERVICE, svcIndex]; + modules.get(moduleName).services.push({ + name: service.name, + fullName: `${pkg}.${service.name}`, + package: pkg, + file: file.name, + kind: serviceKind(service.name), + comment: comments.get(servicePath.join('.')) ?? '', + methods: (service.method ?? []).map((method, i) => { + const http = readHttpRule(method.options); + return { + name: method.name, + fullName: `${pkg}.${service.name}/${method.name}`, + inputType: method.inputType.replace(/^\./, ''), + outputType: method.outputType.replace(/^\./, ''), + comment: comments.get([...servicePath, SOURCE_PATH_METHOD, i].join('.')) ?? '', + http, + addedIn: method.options?.[ADDED_IN_METHOD] ?? null, + deprecated: method.options?.deprecated === true, + }; + }), + }); + }); + } + + for (const module of modules.values()) { + module.services.sort((a, b) => a.fullName.localeCompare(b.fullName)); + for (const service of module.services) { + service.methods.sort((a, b) => a.name.localeCompare(b.name)); + } + } + + return [...modules.values()].sort((a, b) => a.name.localeCompare(b.name)); +} + +export function parseDescriptor(descriptor) { + const files = descriptor.file ?? []; + const types = buildTypeIndex(files); + + /** + * A string field whose name matches an enum in its own package carries that + * enum's values, even though the proto types it as a plain string and links + * nothing. staking's QueryValidatorsRequest.status is the only such field in + * the SDK, and without this a reader sees `"status": ""` while the + * values sit in the same page's Types section, unconnected. Verified to match + * exactly one field, so it names a real relationship rather than guessing. + */ + for (const message of types.messages.values()) { + for (const field of message.fields) { + if (field.type !== 'string' || field.enumValues) continue; + for (const [name, enumType] of types.enums) { + const short = name.split('.').pop(); + if ( + name.startsWith(`${message.package}.`) && + short.toLowerCase().endsWith(field.name.toLowerCase()) + ) { + field.enumValues = enumType; + break; + } + } + } + } + + // interface name -> the concrete messages that implement it + // implements_interface is a repeated option, so it arrives as an array even + // when a message declares one interface. accepts_interface is a single value. + const implementations = new Map(); + for (const message of types.messages.values()) { + const declared = message.implementsInterface; + if (!declared) continue; + for (const name of Array.isArray(declared) ? declared : [declared]) { + const list = implementations.get(name) ?? []; + if (!list.includes(message.fullName)) list.push(message.fullName); + implementations.set(name, list); + } + } + for (const list of implementations.values()) list.sort(); + + return { modules: buildModules(files), types: { ...types, implementations } }; +} + +export { moduleOf, normalizeHttpPath }; diff --git a/scripts/api-reference/lib/inventory.js b/scripts/api-reference/lib/inventory.js new file mode 100644 index 00000000..6827866b --- /dev/null +++ b/scripts/api-reference/lib/inventory.js @@ -0,0 +1,28 @@ +// The names of everything the reference is expected to document, derived +// from the descriptor. +// +// This is names only, deliberately. The on-chain runners fill values from +// what a page states, never from the descriptor, because a filler that reads +// the descriptor can pass while the page is wrong. Asking the descriptor +// which methods should exist does not weaken that: it is the question of +// coverage, not the question of what a field contains. + +/** + * @param {Array} modules - modules as produced by parseDescriptor(). + * @returns {{queries: string[], messages: string[]}} both arrays sorted. + */ +export function buildInventory(modules) { + const queries = []; + const messages = []; + + for (const module of modules) { + for (const service of module.services) { + for (const method of service.methods) { + if (service.kind === 'query') queries.push(method.fullName); + if (service.kind === 'msg') messages.push(method.inputType); + } + } + } + + return { queries: [...new Set(queries)].sort(), messages: [...new Set(messages)].sort() }; +} diff --git a/scripts/api-reference/lib/openapi.js b/scripts/api-reference/lib/openapi.js new file mode 100644 index 00000000..80ff8f11 --- /dev/null +++ b/scripts/api-reference/lib/openapi.js @@ -0,0 +1,612 @@ +// Converts the upstream gRPC-gateway Swagger 2.0 spec to OpenAPI 3.0 and joins +// it to the descriptor. +// +// The join is keyed on (verb, normalized path) taken from each method's +// [google.api.http] annotation. Upstream's operationIds are display names that +// its merge step rewrites to avoid collisions in a single document (bank's +// Params becomes BankParams), so they identify a page, not a method. Using them +// as an identity mapping would attribute methods to names no node serves. + +import { convertObj } from 'swagger2openapi'; +import { moduleOf, normalizeHttpPath } from './descriptor.js'; + +export class JoinError extends Error {} + +const HTTP_VERBS = ['get', 'post', 'put', 'patch', 'delete']; + +// `cosmos.gov.v1beta1` yields `v1beta1`. Packages that carry no version segment +// fall back to their last segment, which is still stable per service. +function packageVersion(pkg) { + const last = pkg.split('.').pop(); + return last ?? pkg; +} + +function pathKey(verb, path) { + return `${verb.toLowerCase()} ${normalizeHttpPath(path)}`; +} + +// `/cosmos/bank/v1beta1/balances/{address}` belongs to bank. The path mirrors +// the proto package, so the module falls out of the second segment either way. +function moduleFromPath(path) { + const segments = path.split('/').filter(Boolean); + return segments.length > 1 ? segments[1] : segments[0] ?? 'other'; +} + +export async function convertToOpenApi3(swagger) { + const { openapi } = await convertObj(swagger, { + patch: true, + warnOnly: true, + refSiblings: 'preserve', + }); + return openapi; +} + +// Every descriptor method that upstream bound to an HTTP route, keyed for the +// join. A duplicate key means two methods claim one route, which would make the +// cross-links ambiguous in a way no downstream check would catch. +function indexAnnotatedMethods(modules) { + const byRoute = new Map(); + const collisions = []; + + for (const module of modules) { + for (const service of module.services) { + for (const method of service.methods) { + if (!method.http) continue; + const key = pathKey(method.http.verb, method.http.path); + if (byRoute.has(key)) { + collisions.push({ key, methods: [byRoute.get(key).fullName, method.fullName] }); + continue; + } + byRoute.set(key, { ...method, module: module.name, service }); + } + } + } + + return { byRoute, collisions }; +} + +export function joinSpecToDescriptor(spec, modules, { grpcPagePath, headings }) { + const { byRoute, collisions } = indexAnnotatedMethods(modules); + const problems = []; + const matched = new Set(); + const operationIds = new Map(); + const tags = new Set(); + + for (const collision of collisions) { + problems.push( + `two methods bind the same route ${collision.key}: ${collision.methods.join(' and ')}`, + ); + } + + for (const [path, pathItem] of Object.entries(spec.paths ?? {})) { + for (const verb of HTTP_VERBS) { + const operation = pathItem[verb]; + if (!operation) continue; + + const key = pathKey(verb, path); + const method = byRoute.get(key); + + if (!method) { + problems.push(`REST operation ${key} has no descriptor method bound to it`); + continue; + } + + matched.add(key); + + // Upstream's operationIds come from a merge step that renames methods to + // avoid collisions, and it gets them wrong: gov v1 assigns GovV1Proposal + // to both /proposals and /proposals/{proposalId}. Mintlify derives page + // slugs from these, so a collision silently drops an endpoint. Deriving + // them from the descriptor removes the dependency on that rename map. + // + // The package version is part of the id because gov ships v1 and v1beta1 + // side by side with identical method names. The uniqueness check below + // still runs: this shape is readable rather than provably unique, so a + // future collision fails the build instead of losing a page. + operation.operationId = `${method.module}_${packageVersion(method.service.package)}_${method.name}`; + if (operationIds.has(operation.operationId)) { + problems.push( + `duplicate operationId ${operation.operationId} on ${verb} ${path} and ${operationIds.get(operation.operationId)}`, + ); + } + operationIds.set(operation.operationId, `${verb} ${path}`); + + const module = moduleFromPath(path); + tags.add(module); + operation.tags = [module]; + + // OpenAPI expects `summary` to be a short label and `description` to hold + // the prose. Upstream puts the entire proto comment in `summary`, and + // Mintlify builds each page's filename from it, which overruns the + // filesystem name limit on long comments such as upgrade's + // UpgradedConsensusState. Using the method name keeps page slugs short, + // stable and meaningful, and the prose moves where it belongs. + const heading = headings.get(`${method.service.fullName}/${method.name}`); + + const upstreamSummary = operation.summary?.trim(); + // The summary becomes the sidebar label and the page slug. gov lists two + // identical sets of eight entries otherwise, differing only by a URL + // suffix the reader never sees, while behaving differently. + operation.summary = heading?.label ?? method.name; + if (upstreamSummary) { + operation.description = operation.description + ? `${upstreamSummary}\n\n${operation.description}` + : upstreamSummary; + } + + const link = `${grpcPagePath}/${method.module}#${heading?.anchor ?? method.name.toLowerCase()}`; + const prefix = `gRPC: \`${method.service.fullName}/${method.name}\` ([reference](${link}))`; + operation.description = operation.description + ? `${prefix}\n\n${operation.description}` + : prefix; + operation['x-grpc-method'] = `${method.service.fullName}/${method.name}`; + } + } + + // Upstream builds its spec by merging a fixed list of per-module files in + // client/docs/config.json, which omits the reflection, autocli and app + // services. Their HTTP annotations are real and the routes work on a node, + // but no REST page can be generated for them, so the gRPC page shows the path + // without a link. That is a property of upstream's build, not a disagreement, + // so it is reported rather than fatal. + const unrepresented = []; + for (const [key, method] of byRoute) { + if (!matched.has(key)) unrepresented.push(`${method.fullName} (${key})`); + } + + spec.tags = [...tags].sort().map((name) => ({ name })); + return { spec, problems, unrepresented, routesByMethod: byRoute }; +} + +/** + * OpenAPI considers two paths identical when they differ only in the names of + * their template variables, and forbids both from appearing in one document. + * Upstream's generated spec violates this: auth binds + * `bech32/{address_bytes}` and `bech32/{address_string}`, which collapse to the + * same template. + * + * Keeping both produces a spec that fails validation and that Mintlify resolves + * by silently dropping one page. Dropping them here instead, and reporting + * exactly what was dropped, keeps the loss visible. The methods themselves stay + * documented on the module's gRPC page, and the routes still work on a node. + */ +export function dropIdenticalPathTemplates(spec) { + const byShape = new Map(); + for (const routePath of Object.keys(spec.paths)) { + const shape = routePath.replace(/\{[^}]+\}/g, '{}'); + if (!byShape.has(shape)) byShape.set(shape, []); + byShape.get(shape).push(routePath); + } + + const dropped = []; + for (const paths of byShape.values()) { + if (paths.length < 2) continue; + // Sorted so the survivor does not depend on object key order. + const [, ...rest] = [...paths].sort(); + for (const routePath of rest) { + dropped.push(routePath); + delete spec.paths[routePath]; + } + } + + return { spec, dropped }; +} + +/** + * Rewrites schema property names from protobuf JSON names to proto field names. + * + * Upstream generates the spec with json_names_for_fields on, so it documents + * `nextKey`, `operatorAddress`, `delegatorShares`. The SDK's gateway marshals + * with the original names, so every real response uses `next_key`, + * `operator_address`, `delegator_shares`. A client written against the spec + * reads undefined from every field. + * + * The mapping is taken from the descriptor rather than by converting case, so + * a field whose proto name genuinely is camelCase is left alone. jsonName is a + * deterministic function of the proto name, so the inverse is unambiguous. + */ +export function useProtoFieldNames(spec, types) { + const protoName = new Map(); + for (const message of types.messages.values()) { + for (const field of message.fields) { + if (field.jsonName && field.jsonName !== field.name) { + protoName.set(field.jsonName, field.name); + } + } + } + + let renamed = 0; + const rename = (key) => + key + .split('.') + .map((part) => protoName.get(part) ?? part) + .join('.'); + + const walk = (node) => { + if (Array.isArray(node)) return node.forEach(walk); + if (!node || typeof node !== 'object') return; + + if (node.properties && typeof node.properties === 'object') { + const next = {}; + for (const [key, value] of Object.entries(node.properties)) { + const to = rename(key); + if (to !== key) renamed += 1; + next[to] = value; + } + node.properties = next; + } + if (Array.isArray(node.required)) node.required = node.required.map(rename); + + for (const value of Object.values(node)) walk(value); + }; + + // Schemas only. Parameter names are left alone: a path parameter has to keep + // matching its path template, and grpc-gateway accepts either spelling for a + // query parameter, so renaming those would risk breaking working requests to + // fix nothing a reader can see. + walk(spec.components ?? {}); + for (const pathItem of Object.values(spec.paths ?? {})) { + for (const operation of Object.values(pathItem)) { + if (!operation || typeof operation !== 'object') continue; + walk(operation.responses ?? {}); + walk(operation.requestBody ?? {}); + } + } + + return { spec, renamed }; +} + +/** + * Marks properties the gateway can return as null. + * + * proto3 has no null, but the REST gateway emits `null` for an unset + * message-typed field and for empty `bytes`: an absent `pagination.next_key` + * comes back as null, not "". A schema declaring `type: string` therefore + * disagrees with real responses, and a generated client typed from it breaks on + * the first empty page. + * + * Derived per field from the descriptor rather than applied blanket, so scalars + * that genuinely never arrive as null keep their stricter type. + */ +/** + * Applies the two schema corrections to an operation's inlined response. + * + * Upstream inlines response schemas per operation rather than referencing + * components, so corrections applied to components/schemas never reach the + * document a validator actually checks against. Pairing the inline schema with + * the method's output message lets both corrections land where they matter. + */ +/** + * Builds a response schema for a field upstream's swagger never declared. + * + * Upstream's gateway spec is generated separately from the protos and lags + * them, so a field the chain returns can be missing from the schema this + * reference publishes. Left alone that is a two-sided defect: conformance fails + * on a real response, and anyone generating a client from the spec is missing + * the field. The descriptor knows the field, so it is repaired rather than + * recorded as an exception. + * + * Only ever called for a field with no property in the schema, so it cannot + * change how an operation upstream did describe is represented. The shapes + * match what upstream emits for the same proto types: 64-bit integers as + * strings, 32-bit as integers, bytes base64, enums as their value names. + */ +const SCALAR_SCHEMAS = { + double: { type: 'number', format: 'double' }, + float: { type: 'number', format: 'float' }, + int64: { type: 'string', format: 'int64' }, + sint64: { type: 'string', format: 'int64' }, + sfixed64: { type: 'string', format: 'int64' }, + uint64: { type: 'string', format: 'uint64' }, + fixed64: { type: 'string', format: 'uint64' }, + int32: { type: 'integer', format: 'int32' }, + sint32: { type: 'integer', format: 'int32' }, + sfixed32: { type: 'integer', format: 'int32' }, + // Upstream widens the unsigned 32-bit types, which do not fit an int32. + uint32: { type: 'integer', format: 'int64' }, + fixed32: { type: 'integer', format: 'int64' }, + bool: { type: 'boolean' }, + string: { type: 'string' }, + bytes: { type: 'string', format: 'byte' }, +}; + +// Rendered as a JSON scalar rather than as their proto fields. +const WELL_KNOWN_SCHEMAS = { + 'google.protobuf.Timestamp': { type: 'string', format: 'date-time' }, + 'google.protobuf.Duration': { type: 'string' }, + 'google.protobuf.FieldMask': { type: 'string' }, + 'google.protobuf.StringValue': { type: 'string' }, + 'google.protobuf.BoolValue': { type: 'boolean' }, + 'google.protobuf.BytesValue': { type: 'string', format: 'byte' }, +}; + +export function schemaForField(field, types, declined = [], path = '') { + const schema = shapeForField(field, types, declined, path); + // Upstream puts a repeated field's description on the array, not on its items. + if (field.comment) schema.description = field.comment.trim(); + return schema; +} + +function shapeForField(field, types, declined, path) { + const entry = field.repeated && field.typeName ? types.messages.get(field.typeName) : null; + if (entry?.isMapEntry) { + // A map compiles to a repeated synthetic entry message, but in JSON it + // is an object keyed by k, not an array of {key, value} pairs. Without this + // the LABEL_REPEATED on the field would wrap it in an array. + const value = entry.fields.find((f) => f.name === 'value'); + if (!value) { + declined.push(`${path}: a map whose entry message declares no value field`); + return { type: 'object' }; + } + return { type: 'object', additionalProperties: schemaForField(value, types, declined, path) }; + } + + const one = singleSchemaForField(field, types, declined, path); + return field.repeated ? { type: 'array', items: one } : one; +} + +function singleSchemaForField(field, types, declined, path) { + if (field.type) { + const scalar = SCALAR_SCHEMAS[field.type]; + if (scalar) return { ...scalar }; + declined.push(`${path}: unknown scalar type ${field.type}, described as a string`); + return { type: 'string' }; + } + if (!field.typeName) { + declined.push(`${path}: neither a scalar nor a named type, described as a string`); + return { type: 'string' }; + } + if (WELL_KNOWN_SCHEMAS[field.typeName]) return { ...WELL_KNOWN_SCHEMAS[field.typeName] }; + + const enumType = types.enums.get(field.typeName); + if (enumType) { + const values = enumType.values.map((v) => v.name); + return { type: 'string', enum: values, default: values[0] }; + } + + // An Any is inlined with @type and carries whatever the concrete message + // holds, so it must stay open rather than be described field by field. + if (field.typeName === 'google.protobuf.Any') { + return { type: 'object', properties: { '@type': { type: 'string' } } }; + } + + const nested = types.messages.get(field.typeName); + if (!nested) { + // An open object accepts anything, so conformance stops checking this + // subtree. It cannot mis-describe a response, but it under-describes one, + // and the drift check that follows sees a property and reports nothing. + // Hence the decline is surfaced by the caller rather than left silent. + declined.push(`${path}: ${field.typeName} is not in the descriptor, left an open object`); + return { type: 'object' }; + } + + // An empty shell: the caller recurses into it with the nested message, and + // the same pass that fills this one fills that. + return { type: 'object', properties: {} }; +} + +function correctInlineSchema(raw, message, types, counts, seen = new Set(), spec = null) { + const schema = spec ? resolveRef(raw, spec) : raw; + if (!schema || !message || typeof schema !== 'object') return; + // An Any is inlined with @type in JSON, so type_url and value are correctly + // absent and must not be repaired into the schema. + if (message.fullName === 'google.protobuf.Any') return; + if (schema.type === 'array') { + return correctInlineSchema(schema.items, message, types, counts, seen, spec); + } + if (!schema.properties) return; + + const key = `${message.fullName}`; + if (seen.has(key)) return; + const next = new Set(seen).add(key); + + let carriesAny = false; + for (const field of message.fields) { + if (field.typeName === 'google.protobuf.Any') carriesAny = true; + + // A field the protos define and upstream's spec omits. Repaired here rather + // than reported, so the published spec describes what the chain returns. + if (!(field.name in schema.properties)) { + schema.properties[field.name] = schemaForField( + field, types, counts.declined, `${message.fullName}.${field.name}`, + ); + counts.added += 1; + } + const property = schema.properties[field.name]; + if (!property) continue; + + if ((field.type === 'bytes' || (!field.type && field.typeName)) && property.nullable !== true) { + property.nullable = true; + counts.marked += 1; + } + + const nested = field.typeName ? types.messages.get(field.typeName) : null; + if (nested) correctInlineSchema(property, nested, types, counts, next, spec); + } + + if (!carriesAny && schema.additionalProperties === undefined) { + schema.additionalProperties = false; + counts.strict += 1; + } +} + +/** + * Reports response fields the protos define and upstream's spec omits. + * + * The swagger is generated separately from the protos and lags them, so a new + * SDK version can add a field the chain returns and the spec never mentions. + * v0.55 added `key_rotation_fee` to staking params exactly this way, and only a + * live conformance run against a node surfaced it. + * + * Comparing the inline schema against its own message finds the same gap at + * generation time, with no chain and no network. It warns rather than fails: + * upstream lagging is normal and should not block a docs build. + */ +// Four of the 108 operations reference a component instead of inlining their +// response. A correction that only walks inline schemas silently skips those. +function resolveRef(schema, spec) { + if (!schema?.$ref) return schema; + const name = schema.$ref.replace('#/components/schemas/', ''); + return spec.components?.schemas?.[name] ?? schema; +} + +export function findSchemaDrift(spec, types, methodsByOperation) { + const drift = []; + + const walk = (raw, message, path, seen) => { + const schema = resolveRef(raw, spec); + if (!schema?.properties || !message || seen.has(message.fullName)) return; + // An Any is inlined with @type in JSON, so its type_url and value fields + // are correctly absent from the schema and are not drift. + if (message.fullName === 'google.protobuf.Any') return; + const next = new Set(seen).add(message.fullName); + + for (const field of message.fields) { + if (!(field.name in schema.properties)) { + drift.push(`${path}.${field.name}`); + continue; + } + const nested = field.typeName ? types.messages.get(field.typeName) : null; + const property = schema.properties[field.name]; + const resolved = resolveRef(property, spec); + const target = resolved?.type === 'array' ? resolved.items : resolved; + if (nested) walk(target, nested, `${path}.${field.name}`, next); + } + }; + + for (const [routePath, pathItem] of Object.entries(spec.paths ?? {})) { + for (const operation of Object.values(pathItem)) { + if (!operation || typeof operation !== 'object') continue; + const outputType = methodsByOperation.get(operation['x-grpc-method']); + const message = outputType ? types.messages.get(outputType) : null; + const schema = Object.values(operation.responses?.['200']?.content ?? {})[0]?.schema; + if (message && schema) walk(schema, message, routePath, new Set()); + } + } + + return drift; +} + +export function correctResponseSchemas(spec, types, methodsByOperation) { + const counts = { marked: 0, strict: 0, added: 0, declined: [] }; + + for (const pathItem of Object.values(spec.paths ?? {})) { + for (const operation of Object.values(pathItem)) { + if (!operation || typeof operation !== 'object') continue; + const outputType = methodsByOperation.get(operation['x-grpc-method']); + const message = outputType ? types.messages.get(outputType) : null; + // Upstream declares the response under `*/*`, not application/json, so + // take whichever media type is present rather than assuming one. + const content = operation.responses?.['200']?.content ?? {}; + const schema = Object.values(content)[0]?.schema; + if (message && schema) correctInlineSchema(schema, message, types, counts, new Set(), spec); + } + } + + return { spec, ...counts }; +} + +export function allowGatewayNulls(spec, types) { + let marked = 0; + + for (const [name, schema] of Object.entries(spec.components?.schemas ?? {})) { + const message = types.messages.get(name); + if (!message || !schema?.properties) continue; + + for (const field of message.fields) { + const property = schema.properties[field.name]; + if (!property) continue; + const nullable = field.type === 'bytes' || (!field.type && field.typeName); + if (nullable && property.nullable !== true) { + property.nullable = true; + marked += 1; + } + } + } + + return { spec, marked }; +} + +export function applyServers(spec) { + // No public chain runs the SDK version these pages document, and no live call + // is made at generation time: a build-time request to a third party would + // make the output nondeterministic and break the regeneration check. + spec.servers = [ + { + url: 'https://cosmos-rest.publicnode.com', + description: + 'Community-run public endpoint serving Cosmos Hub. Not operated by the Cosmos SDK team, and running a different SDK version than these pages document. Endpoints for modules the chain does not include return 501.', + }, + { + url: 'http://localhost:1317', + description: 'Your own node. Requires api.enable in app.toml.', + }, + ]; + return spec; +} + +export function applyInfo(spec, context) { + spec.info = { + ...spec.info, + title: 'Cosmos SDK REST API', + description: [ + `HTTP bindings for the gRPC query services of the standard Cosmos SDK modules, documenting Cosmos SDK ${context.displayVersion}.`, + '', + `Generated from ${context.repository} at commit ${context.sha} on ref \`${context.ref}\`.`, + '', + 'A chain exposes only the modules its application registers, so it may serve a subset of these routes alongside routes of its own.', + ].join('\n'), + version: context.displayVersion, + }; + return spec; +} + +export { moduleFromPath, pathKey }; + +/** + * Declares that documented schemas list every field a response can contain. + * + * Without this, a response validator has almost nothing to check: proto3 omits + * defaults so nothing can be marked `required`, and JSON Schema allows unknown + * properties by default. A response whose field names differ entirely from the + * schema still validates. That is exactly how the camelCase defect would have + * survived contract testing. + * + * Setting additionalProperties false makes an undeclared field an error, which + * is the one direction we can assert: the gateway returning `next_key` where the + * schema declares `nextKey` becomes a failure rather than a silent pass. + * + * Schemas reachable from a google.protobuf.Any are exempt, because an Any + * legitimately inlines the fields of whatever concrete message it carries, and + * no schema can enumerate those in advance. + */ +export function requireDeclaredFields(spec, types) { + const carriesAny = new Set(); + + const visit = (typeName, seen = new Set()) => { + if (!typeName || seen.has(typeName)) return false; + if (typeName === 'google.protobuf.Any') return true; + const message = types.messages.get(typeName); + if (!message) return false; + + const next = new Set(seen).add(typeName); + const found = message.fields.some((f) => visit(f.typeName, next)); + if (found) carriesAny.add(typeName); + return found; + }; + for (const name of types.messages.keys()) visit(name); + + let strict = 0; + let exempt = 0; + for (const [name, schema] of Object.entries(spec.components?.schemas ?? {})) { + if (!schema || schema.type === 'array' || !schema.properties) continue; + if (name === 'google.protobuf.Any' || carriesAny.has(name)) { + exempt += 1; + continue; + } + schema.additionalProperties = false; + strict += 1; + } + + return { spec, strict, exempt }; +} diff --git a/scripts/api-reference/lib/refs.js b/scripts/api-reference/lib/refs.js new file mode 100644 index 00000000..11337308 --- /dev/null +++ b/scripts/api-reference/lib/refs.js @@ -0,0 +1,48 @@ +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const HERE = path.dirname(fileURLToPath(import.meta.url)); +const REPO_ROOT = path.resolve(HERE, '../../..'); +const PRODUCT = 'sdk'; + +export function parseArgs(argv) { + const args = { version: null, modules: null, ref: null }; + for (let i = 0; i < argv.length; i += 1) { + if (argv[i] === '--version') args.version = argv[i + 1]; + if (argv[i] === '--ref') args.ref = argv[i + 1]; + if (argv[i] === '--modules') args.modules = argv[i + 1].split(',').map((m) => m.trim()); + } + if (!['next', 'latest'].includes(args.version)) { + throw new Error('--version must be next or latest'); + } + return args; +} + +/** + * next documents unreleased main. latest documents the released branch, whose + * name follows from versions.json rather than being written down here, so a + * freeze to v0.56 carries the generator with it. + * + * An explicit ref overrides that resolution and nothing else. The release + * procedure needs to generate next's pages from the release branch before a + * freeze, while the pages still carry next's version stamp, so the ref and the + * displayed version are deliberately independent. + */ +export function resolveRef(version, { ref = null } = {}) { + const versions = JSON.parse(fs.readFileSync(path.join(REPO_ROOT, 'versions.json'), 'utf8')); + const product = versions.products[PRODUCT]; + if (!product) throw new Error(`versions.json has no ${PRODUCT} product`); + + const displayVersion = product.latestDisplayVersion; + const match = displayVersion.match(/^v(\d+)\.(\d+)/); + if (!match) throw new Error(`cannot parse latestDisplayVersion ${displayVersion}`); + + const derived = version === 'next' ? 'main' : `release/v${match[1]}.${match[2]}.x`; + + return { + repository: product.repository, + ref: ref ?? derived, + displayVersion: version === 'next' ? `${displayVersion} (unreleased)` : displayVersion, + }; +} diff --git a/scripts/api-reference/lib/render.js b/scripts/api-reference/lib/render.js new file mode 100644 index 00000000..abae0c25 --- /dev/null +++ b/scripts/api-reference/lib/render.js @@ -0,0 +1,715 @@ +// Renders one MDX page per module from the descriptor model. +// +// Queries and transaction messages are deliberately presented differently. +// A Msg service is registered into the MsgServiceRouter (baseapp/msg_service_router.go) +// and is consulted only during transaction delivery, so its methods are not +// reachable on the gRPC query server. Rendering them beside queries with a +// grpcurl example would teach an interaction model the SDK does not implement. + +// A type outside the cosmos namespace is protobuf machinery or a vendored +// dependency: google.protobuf, gogoproto, amino, cosmos_proto, tendermint. Those +// are named in field tables but not documented as types of their own. +// +// This is the same namespace boundary the module scan uses, expressed as a rule +// rather than a list, so a dependency vendored in a future SDK version is +// excluded without anyone adding it here. +function isOpaque(typeName) { + return !typeName.startsWith('cosmos.'); +} + +function titleCase(name) { + return name.charAt(0).toUpperCase() + name.slice(1); +} + +// Mintlify slugs a heading by lowercasing it and turning `.` into `-`. Headings +// use the fully qualified name because short names collide inside a module: +// gov ships QueryProposalRequest in both v1 and v1beta1. +function anchorFor(fullName) { + return `#${fullName.toLowerCase().replace(/\./g, '-')}`; +} + +/** + * Proto comments are plain text, but MDX reads `{` as the start of an + * expression and `<` as the start of a tag, and a page containing either fails + * to compile rather than rendering them literally. The pagination comments in + * cosmos/base/query/v1beta1 embed a proto snippet and hit exactly this. + * + * Escaping is skipped inside backtick spans, where MDX already treats both + * characters as literal and a backslash would show up in the output. + */ +function looksLikeCode(paragraph) { + return /\{/.test(paragraph) && /\}/.test(paragraph) && /[;=]/.test(paragraph); +} + +function mdxSafe(text) { + return (text ?? '') + .split('\n\n') + .map((paragraph) => { + // Proto comments sometimes embed a snippet, as PageRequest does with + // `message SomeRequest { ... }`. Escaping the braces makes it compile but + // renders code as prose; inline code renders correctly and needs no + // escaping, since MDX treats braces literally inside a code span. + if (looksLikeCode(paragraph) && !paragraph.includes('`')) { + return `\`${paragraph.trim()}\``; + } + return paragraph + .split(/(`[^`]*`)/g) + .map((part) => (part.startsWith('`') ? part : part.replace(/([<{}])/g, '\\$1'))) + .join(''); + }) + .join('\n\n'); +} + +function escapeCell(text) { + return mdxSafe(text).replace(/\|/g, '\\|').replace(/\n\n/g, ' ').replace(/\n/g, ' ').trim(); +} + +function shortName(fullName) { + return fullName.split('.').pop(); +} + +function typeLabel(typeName, documentedTypes) { + return documentedTypes.has(typeName) + ? `[\`${shortName(typeName)}\`](${anchorFor(typeName)})` + : `\`${shortName(typeName)}\``; +} + +function fieldTypeCell(field, documentedTypes, types) { + if (field.type) { + return field.repeated ? `\`${field.type}\`[]` : `\`${field.type}\``; + } + if (!field.typeName) return '`unknown`'; + + // A map field compiles to a repeated synthetic entry message. Rendering + // it as `MapEntry[]` would describe the compiler's output rather than the API. + const referenced = types.messages.get(field.typeName); + if (referenced?.isMapEntry) { + const key = referenced.fields.find((f) => f.name === 'key'); + const value = referenced.fields.find((f) => f.name === 'value'); + const keyLabel = key?.type ?? shortName(key?.typeName ?? 'unknown'); + const valueLabel = value?.type ?? shortName(value?.typeName ?? 'unknown'); + return `\`map<${keyLabel}, ${valueLabel}>\``; + } + + const base = typeLabel(field.typeName, documentedTypes); + return field.repeated ? `${base}[]` : base; +} + +/** + * A cosmos.Dec reaches the wire in three different shapes, and the annotation + * alone does not say which. The descriptor does: a LegacyDec custom type is + * marshalled as an integer scaled by 10^18, a plain string field holds an + * already-formatted decimal, and a bytes field carries base64 of the scaled + * digits. Stating one blanket rule was wrong for whole modules and produced + * answers out by 10^18 with no error. + */ +function decEncoding(field) { + const scaled = field.customType?.endsWith('LegacyDec'); + const grpcForm = field.type === 'bytes' + ? (scaled ? 'base64 of an integer string scaled by 10^18' : 'base64') + : (scaled ? 'an integer string scaled by 10^18' : 'a decimal string'); + // The REST gateway installs the SDK's own marshaler, which renders every + // cosmos.Dec as a plain decimal string whatever form it takes on the gRPC + // wire. Stating only the gRPC form tells a REST reader to divide a value that + // is already divided, which is the 10^18 error in the other direction. + if (grpcForm === 'a decimal string') return 'Encoded as cosmos.Dec, a decimal string.'; + return `Encoded as cosmos.Dec, read back as ${grpcForm} over gRPC.`; +} + +function interfaceNote(field, types) { + if (!field.acceptsInterface) return null; + const options = types.implementations?.get(field.acceptsInterface) ?? []; + if (!options.length) return `Accepts any message implementing ${field.acceptsInterface}.`; + return `One of: ${options.map((name) => `\`/${name}\``).join(', ')}.`; +} + +function fieldNotes(field, types) { + const notes = []; + if (field.enumValues) { + notes.push(`One of the [\`${shortName(field.enumValues.fullName)}\`](${anchorFor(field.enumValues.fullName)}) values.`); + } + if (field.deprecated) notes.push('Deprecated.'); + const accepted = interfaceNote(field, types); + if (accepted) notes.push(accepted); + if (field.scalarHint === 'cosmos.Dec') notes.push(decEncoding(field)); + else if (field.scalarHint) notes.push(`Encoded as ${field.scalarHint}.`); + return notes; +} + +function renderFieldTable(message, documentedTypes, types) { + if (!message) return 'Schema unavailable.\n'; + if (!message.fields.length) return 'This message has no fields.\n'; + + const rows = message.fields.map((field) => { + const notes = fieldNotes(field, types); + const description = [escapeCell(field.comment), ...notes].filter(Boolean).join(' '); + return `| \`${field.name}\` | ${fieldTypeCell(field, documentedTypes, types)} | ${description} |`; + }); + + return ['| Field | Type | Description |', '| --- | --- | --- |', ...rows].join('\n') + '\n'; +} + +// Every message reachable from this module's own methods, one hop at a time, +// so a reader can resolve a nested field without leaving the page. +function collectReferencedTypes(module, types) { + const wanted = new Set(); + const queue = []; + + for (const service of module.services) { + for (const method of service.methods) { + queue.push(method.inputType, method.outputType); + } + } + + while (queue.length) { + const name = queue.shift(); + if (!name || wanted.has(name) || isOpaque(name)) continue; + + // Enums are leaves, and they have to be documented: without the value list + // a reader has no way to learn that a vote option is "VOTE_OPTION_YES". + if (types.enums.has(name)) { + wanted.add(name); + continue; + } + + const message = types.messages.get(name); + if (!message || message.isMapEntry) continue; + wanted.add(name); + for (const field of message.fields) { + if (field.typeName) queue.push(field.typeName); + } + } + + return wanted; +} + +// The depth at which expansion stops and a nested message collapses to `{}`. +// Nothing in the SDK protos nests this far without recursing, and the guard +// below stops recursion regardless. +const MAX_EXPANSION_DEPTH = 4; + +// Protobuf JSON encodes 64-bit integers as strings, because they exceed what a +// JSON number can hold exactly. Every such proto type ends in 64 and no +// floating-point type does, so this is a rule over the type name rather than a +// list that has to be kept in step with the scalar table in descriptor.js. +function isStringEncodedInt(type) { + return /64$/.test(type); +} + +/** + * A value taken from the field's own description, when it names one. + * + * Several request fields are plain strings whose legal values exist only in + * prose: gov's `params_type` takes "voting", "tallying" or "deposit", and the + * generated example said ``, so the documented command errored with + * `unknown params type: `. Where the comment quotes candidates, the + * first is a value that actually works. + */ +function quotedCandidate(field) { + if (field.type !== 'string' || !field.comment) return null; + const quoted = field.comment.match(/"([a-z][a-z0-9_]{2,})"/i); + return quoted ? quoted[1] : null; +} + +function scalarPlaceholder(type, field) { + // A bytes field carrying a cosmos.Dec is written as a decimal string, not as + // base64: the transaction decoder parses it with the decimal type, and the + // empty-bytes placeholder is rejected outright with "decimal string cannot be + // empty". base64 is only how the field reads back over gRPC. + if (type === 'bytes' && field?.scalarHint === 'cosmos.Dec') return '0.05'; + if (type === 'bool') return false; + // bytes is base64 in protobuf JSON, so a `` placeholder is not merely + // unhelpful, it fails to decode: grpcurl rejects it with "illegal base64 data". + if (type === 'bytes') return ''; + if (type === 'string') return ''; + // proto3's zero is a legal value in the type system but is rejected by many + // handlers: proposal_id 0 and height 0 both error. 1 is valid far more often. + if (isStringEncodedInt(type)) return '1'; + return 0; +} + +/** + * Well-known types have their own JSON representations that bear no relation to + * their proto fields. Expanding them structurally produces confidently wrong + * examples: a Duration is "604800s" on the wire, never {"seconds":0,"nanos":0}. + */ +export const WELL_KNOWN_JSON = { + 'google.protobuf.Duration': '0s', + 'google.protobuf.Timestamp': '', + 'google.protobuf.FieldMask': '', + 'google.protobuf.Empty': {}, + 'google.protobuf.Struct': {}, + 'google.protobuf.Value': null, + 'google.protobuf.ListValue': [], + 'google.protobuf.NullValue': null, + 'google.protobuf.StringValue': '', + 'google.protobuf.BytesValue': '', + 'google.protobuf.BoolValue': false, + 'google.protobuf.DoubleValue': 0, + 'google.protobuf.FloatValue': 0, + 'google.protobuf.Int64Value': '0', + 'google.protobuf.UInt64Value': '0', + 'google.protobuf.Int32Value': 0, + 'google.protobuf.UInt32Value': 0, +}; + +/** + * The protobuf types whose JSON form is defined by the specification rather than + * by their fields. Any other google.protobuf type, DescriptorProto among them, + * is an ordinary message and expands correctly on its own. + * + * Kept separate from the map above so the generator can assert the two agree: + * dropping an entry from WELL_KNOWN_JSON would otherwise silently reintroduce + * the bug where Duration rendered as {"seconds":0,"nanos":0}. + */ +export const SPECIAL_JSON_TYPES = new Set([ + 'google.protobuf.Any', + 'google.protobuf.Duration', + 'google.protobuf.Timestamp', + 'google.protobuf.FieldMask', + 'google.protobuf.Empty', + 'google.protobuf.Struct', + 'google.protobuf.Value', + 'google.protobuf.ListValue', + 'google.protobuf.NullValue', + 'google.protobuf.StringValue', + 'google.protobuf.BytesValue', + 'google.protobuf.BoolValue', + 'google.protobuf.DoubleValue', + 'google.protobuf.FloatValue', + 'google.protobuf.Int64Value', + 'google.protobuf.UInt64Value', + 'google.protobuf.Int32Value', + 'google.protobuf.UInt32Value', +]); + +/** + * An Any is inlined in protobuf JSON: the packed message's own fields sit + * alongside an `@type` discriminator. Its proto fields, `type_url` and `value`, + * never appear in JSON at all. Rendering them sends readers down a path that + * cannot decode, and it contradicts the transactions page, which describes + * `@type` correctly. + */ +/** + * Types whose useful example is narrower than their full field set. + * + * A PageRequest expanded field-by-field sets `key` and `offset` together, which + * the SDK rejects as soon as `key` is non-empty, and an `offset` of 1 silently + * skips the first result. Only `limit` belongs in a starting template; the rest + * of the fields stay documented in the type's own table. + */ +const CANONICAL_EXAMPLES = { + 'cosmos.base.query.v1beta1.PageRequest': { limit: '1' }, +}; + +const ANY_EXAMPLE = { + '@type': '/cosmos.example.v1.MsgExample', + '...': 'the fields of that message, inline', +}; + +// The first value of a proto enum is required to be the zero value, which by +// SDK convention is *_UNSPECIFIED and is rejected by handlers. Showing it as +// the example would document a value that always fails. +function enumExample(enumType) { + const values = enumType.values ?? []; + // Skip the UNSPECIFIED zero value, which handlers reject, and skip deprecated + // values: tx's BroadcastMode lists BROADCAST_MODE_BLOCK first among non-zero + // values and it has been removed from the SDK, so it was the one value the + // example could never work with. + const usable = values.find((v) => !v.name.endsWith('_UNSPECIFIED') && !v.deprecated); + return (usable ?? values.find((v) => !v.name.endsWith('_UNSPECIFIED')) ?? values[0])?.name + ?? ''; +} + +/** + * A fillable value for one field, expanding nested messages rather than + * collapsing them to `{}`. This is what makes the example pasteable: a reader + * building a MsgMultiSend needs to see that an Input holds an address and a + * list of coins, without resolving two links first. + * + * `seen` breaks type cycles. Several SDK messages are indirectly recursive, and + * without it Any-bearing types would expand forever. + */ +function exampleValue(field, types, depth, seen) { + const single = () => { + if (field.type === 'string') { + if (field.enumValues) return enumExample(field.enumValues); + const candidate = quotedCandidate(field); + if (candidate) return candidate; + } + if (field.type) return scalarPlaceholder(field.type, field); + if (!field.typeName) return null; + + if (field.typeName === 'google.protobuf.Any') return ANY_EXAMPLE; + if (field.typeName in CANONICAL_EXAMPLES) return CANONICAL_EXAMPLES[field.typeName]; + if (field.typeName in WELL_KNOWN_JSON) return WELL_KNOWN_JSON[field.typeName]; + + const enumType = types.enums.get(field.typeName); + if (enumType) return enumExample(enumType); + + const message = types.messages.get(field.typeName); + if (!message) return {}; + + if (message.isMapEntry) { + const value = message.fields.find((f) => f.name === 'value'); + return { '': value ? exampleValue(value, types, depth + 1, seen) : {} }; + } + + if (depth >= MAX_EXPANSION_DEPTH || seen.has(field.typeName)) return {}; + + const next = new Set(seen).add(field.typeName); + return exampleBody(message, types, depth + 1, next); + }; + + const value = single(); + return field.repeated ? [value] : value; +} + +// Keys use the proto field name rather than the camelCase JSON name. Both are +// accepted on input, but every field table, signer row and response on the +// chain uses snake_case, and showing two spellings for one field leaves a +// reader unable to tell which is real. +function exampleBody(message, types, depth = 0, seen = new Set()) { + const body = {}; + // A oneof permits exactly one member. Setting several produces a message the + // parser rejects with "should not have multiple oneof fields", so only the + // first member of each oneof appears in an example. + const usedOneofs = new Set(); + + for (const field of message.fields ?? []) { + if (field.oneofIndex !== null && field.oneofIndex !== undefined) { + if (usedOneofs.has(field.oneofIndex)) continue; + usedOneofs.add(field.oneofIndex); + } + // A deprecated field alongside its replacement leaves a reader unable to + // tell which one is read: auth's AccountAddressByID sets both `id` and + // `account_id`. The table still documents it; the runnable example omits it. + if (field.deprecated) continue; + body[field.name] = exampleValue(field, types, depth, seen); + } + return body; +} + +function grpcurlExample(method, service, request, types) { + const target = `localhost:9090 ${service.fullName}/${method.name}`; + if (!request?.fields.length) return `grpcurl -plaintext ${target}`; + + const body = JSON.stringify(exampleBody(request, types)); + return `grpcurl -plaintext -d '${body}' \\\n ${target}`; +} + +/** + * The message as it appears inside a transaction's `body.messages`, including + * the `@type` discriminator. The page shows the type URL as a fact; this shows + * where that URL actually goes. + */ +function transactionMessageExample(method, types) { + const message = types.messages.get(method.inputType); + const body = { '@type': `/${method.inputType}`, ...exampleBody(message ?? { fields: [] }, types) }; + return JSON.stringify(body, null, 2); +} + +/** + * Method headings, and the anchors REST pages link to. + * + * gov ships v1 and v1beta1 in one module, so a bare method name produces four + * competing `### Deposit` headings on one page. The link still resolves, to + * whichever came first, which is worse than breaking: a v1beta1 REST page + * silently lands the reader on the v1 method. Where a module holds more than + * one package version, the version goes in the heading. + */ +export function buildMethodHeadings(modules) { + const headings = new Map(); + + for (const module of modules) { + // Qualify only as far as it takes to make every label on the page unique. + // gov needs the version because it ships v1 and v1beta1, and then needs the + // service too, because Deposit exists on both Query and Msg within v1. + const candidates = []; + for (const service of module.services) { + for (const method of service.methods) { + candidates.push({ service, method, key: `${service.fullName}/${method.name}` }); + } + } + + const count = (labelOf) => { + const seen = new Map(); + for (const entry of candidates) { + const label = labelOf(entry); + seen.set(label, (seen.get(label) ?? 0) + 1); + } + return seen; + }; + + const bare = ({ method }) => method.name; + const withVersion = ({ service, method }) => + `${method.name} (${packageVersionOf(service.package)})`; + const withService = ({ service, method }) => + `${method.name} (${service.name}, ${packageVersionOf(service.package)})`; + + const bareCounts = count(bare); + const versionCounts = count(withVersion); + + for (const entry of candidates) { + let label = bare(entry); + if (bareCounts.get(label) > 1) { + label = versionCounts.get(withVersion(entry)) > 1 ? withService(entry) : withVersion(entry); + } + headings.set(entry.key, { + label, + anchor: label + .toLowerCase() + .replace(/[(),]/g, '') + .trim() + .replace(/\s+/g, '-'), + module: module.name, + }); + } + } + + return headings; +} + +function packageVersionOf(pkg) { + return pkg.split('.').pop(); +} + +function renderQueryMethod(method, service, types, documentedTypes, headings) { + const heading = headings.get(`${service.fullName}/${method.name}`); + const lines = [`### ${heading?.label ?? method.name}`, '']; + + if (method.deprecated) { + lines.push('This method is deprecated.', ''); + } + if (method.comment) lines.push(mdxSafe(method.comment), ""); + + const facts = [ + '| | |', + '| --- | --- |', + `| gRPC | \`${service.fullName}/${method.name}\` |`, + ]; + if (method.http) { + facts.push(`| REST | \`${method.http.verb.toUpperCase()} ${method.http.path}\` |`); + } + lines.push(...facts, ''); + + const request = types.messages.get(method.inputType); + const response = types.messages.get(method.outputType); + lines.push(`Request \`${shortName(method.inputType)}\`:`, ''); + lines.push(renderFieldTable(request, documentedTypes, types), ''); + lines.push(`Response \`${shortName(method.outputType)}\`:`, ''); + lines.push(renderFieldTable(response, documentedTypes, types), ''); + + lines.push('```bash', grpcurlExample(method, service, request, types), '```', ''); + return lines.join('\n'); +} + +function renderMsgMethod(method, service, types, documentedTypes, headings, context) { + const heading = headings.get(`${service.fullName}/${method.name}`); + const lines = [`### ${heading?.label ?? method.name}`, '']; + + if (method.deprecated) { + lines.push('This message is deprecated.', ''); + } + if (method.comment) lines.push(mdxSafe(method.comment), ""); + + const message = types.messages.get(method.inputType); + const response = types.messages.get(method.outputType); + + const facts = [ + '| | |', + '| --- | --- |', + `| Type URL | \`/${method.inputType}\` |`, + `| Handler | \`${service.fullName}/${method.name}\` |`, + ]; + + const signers = message?.signers ?? []; + if (signers.length) { + facts.push(`| Signer | ${signers.map((f) => `\`${f}\``).join(', ')} |`); + } + + // Shown for every message rather than only where it deviates from + // cosmos-sdk/. That convention holds for barely half of them, because + // governance-gated messages follow cosmos-sdk/x// instead, so + // any single default would be wrong about half the surface and the output + // would flip between versions on one upstream rename. + if (message) { + facts.push( + `| Amino name | ${message.aminoName ? `\`${message.aminoName}\`` : 'none registered'} |`, + ); + } + lines.push(...facts, ''); + + if (signers.includes('authority')) { + lines.push( + 'The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.', + '', + ); + } + + lines.push(renderFieldTable(message, documentedTypes, types), ''); + lines.push('In a transaction:', ''); + lines.push('```json', transactionMessageExample(method, types), '```', ''); + lines.push(`Response \`${shortName(method.outputType)}\`:`, ''); + lines.push(renderFieldTable(response, documentedTypes, types), ''); + return lines.join('\n'); +} + +function renderTypeSection(fullName, types, documentedTypes) { + const lines = [`### ${fullName}`, '']; + + const enumType = types.enums.get(fullName); + if (enumType) { + lines.push('Written as a quoted string in JSON.', ''); + lines.push('| Value | |', '| --- | --- |'); + for (const value of enumType.values) { + const notes = []; + if (value.name.endsWith('_UNSPECIFIED')) notes.push('Zero value. Handlers reject it.'); + if (value.deprecated) notes.push('Deprecated.'); + lines.push(`| \`${value.name}\` | ${notes.join(' ')} |`); + } + lines.push(''); + return lines.join('\n'); + } + + const message = types.messages.get(fullName); + if (message?.comment) lines.push(mdxSafe(message.comment), ""); + lines.push(renderFieldTable(message, documentedTypes, types), ''); + return lines.join('\n'); +} + +export function renderModulePage(module, types, context, headings) { + // Every message a method takes or returns is rendered under that method, so + // repeating it in Types would be a second copy of what the reader just read. + // Types carries what is referenced but never shown: nested and shared types + // such as Coin, PageRequest and BaseAccount, which field tables link to. + const reachable = collectReferencedTypes(module, types); + const inlined = new Set(); + for (const service of module.services) { + for (const method of service.methods) { + inlined.add(method.inputType); + inlined.add(method.outputType); + } + } + const documentedTypes = new Set([...reachable].filter((name) => !inlined.has(name))); + + const queries = module.services.filter((s) => s.kind === 'query'); + const msgs = module.services.filter((s) => s.kind === 'msg'); + + const queryCount = queries.reduce((n, s) => n + s.methods.length, 0); + const msgCount = msgs.reduce((n, s) => n + s.methods.length, 0); + + const out = []; + out.push('---'); + out.push(`title: "${titleCase(module.name)}"`); + out.push( + `description: "gRPC queries and transaction messages defined by the ${module.name} module in Cosmos SDK ${context.displayVersion}."`, + ); + out.push('---'); + out.push(''); + out.push( + `{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */}`, + ); + out.push(''); + // Provenance only. What a node actually serves is stated once, beside the + // reflection command that answers it, rather than twice on every page. + out.push(''); + out.push( + ` Generated from [\`${context.repository}@${context.sha.slice(0, 12)}\`](https://github.com/${context.repository}/tree/${context.sha}/proto) on ref \`${context.ref}\`.`, + ); + out.push(''); + out.push(''); + + if (queryCount) { + out.push('## Queries'); + out.push(''); + out.push( + 'A node exposes only the services its application registers:', + ); + out.push(''); + out.push('- gRPC on port 9090'); + out.push('- REST on port 1317, if the method has an HTTP binding'); + out.push(''); + out.push( + `Run \`grpcurl -plaintext localhost:9090 list\` to see what a node serves.`, + ); + out.push(''); + out.push( + `Queries are read-only and never pass through consensus. See [Queries](/sdk/${context.version}/learn/concepts/transactions#queries).`, + ); + out.push(''); + // Search engines land readers directly on a module page, so the examples + // have to say what they assume. Without this, a reader points a -plaintext + // localhost example at a public endpoint and gets a TLS handshake failure + // with no route to the page that explains it. + // + // No blanket statement about cosmos.Dec here. The same value is written and + // read in different forms depending on the surface, so a single sentence is + // wrong in one direction whichever form it names. An earlier version of this + // paragraph asserted the scaled integer string, which is the read form, and + // shipped that to readers writing requests on 42 pages. The field table + // states the form per field, which is the only place it can be right. + out.push( + `Replace \`\` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some \`string\` fields accept enum constants listed under Types. Field tables give the encoding each value takes.`, + ); + out.push(''); + out.push( + `Examples assume a local node. For TLS endpoints, use port 443 and omit \`-plaintext\`. See [gRPC services](/sdk/${context.version}/api-reference/grpc/index) for reflection, address formats, and decimal encoding.`, + ); + out.push(''); + for (const service of queries) { + if (queries.length > 1) { + out.push(`## ${service.fullName}`, ''); + if (service.comment) out.push(mdxSafe(service.comment), ""); + } + for (const method of service.methods) { + out.push(renderQueryMethod(method, service, types, documentedTypes, headings)); + } + } + } + + if (msgCount) { + out.push('## Transaction messages'); + out.push(''); + out.push( + `These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/${context.version}/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/${context.version}/api-reference/transactions) for the envelope they go into.`, + ); + out.push(''); + // The Dec sentence is the most expensive prose in this reference: the + // encoding was wrong four times and each attempt read plausibly. The bytes + // clause is the case that shipped wrong, where the form a reader writes and + // the form it reads back in differ. pagefill.py refuses to fill a Dec field + // unless the page states the form, matching on the value rather than on + // this wording, so the sentence can be rewritten but the value has to stay. + out.push( + `Examples use CLI transaction JSON. Decimal fields use values such as \`"0.05"\`, even when their proto type is \`bytes\`. The gRPC \`TxEncode\` method instead requires the scaled value \`"50000000000000000"\`. See [scalar encodings](/sdk/${context.version}/api-reference/grpc/index#scalar-encodings).`, + ); + out.push(''); + out.push('- Handler: Generated client method'); + out.push('- Signer: Account that must sign'); + out.push('- Amino name: Legacy identifier used by hardware wallets and other Amino signers'); + out.push(''); + for (const service of msgs) { + for (const method of service.methods) { + out.push(renderMsgMethod(method, service, types, documentedTypes, headings, context)); + } + } + } + + const typeNames = [...documentedTypes].sort(); + if (typeNames.length) { + out.push('## Types'); + out.push(''); + out.push( + 'Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field.', + ); + out.push(''); + for (const name of typeNames) { + out.push(renderTypeSection(name, types, documentedTypes)); + } + } + + return out.join('\n').replace(/\n{3,}/g, '\n\n') + '\n'; +} + +export { anchorFor, collectReferencedTypes }; diff --git a/scripts/api-reference/manifest.py b/scripts/api-reference/manifest.py new file mode 100644 index 00000000..6a3b0ecd --- /dev/null +++ b/scripts/api-reference/manifest.py @@ -0,0 +1,82 @@ +"""The coverage manifest: what the runners cannot derive. + +One schema for both runners. Every entry is a statement that something cannot +work as written, with a reason, so a run's output is what changed rather than +the same list every time. Where a reason is fixable it should be fixed instead +of recorded here. +""" + +import tomllib +from pathlib import Path + +QUERY_VOCABULARY = {"unfillable", "known-failure"} +TX_VOCABULARY = {"success", "unauthorized", "state-error", "skip", "unfillable"} + +LEGACY_TABLES = ("queries", "messages", "unfillable") + + +class Invalid(Exception): + """The manifest does not match the schema.""" + + +def load(path: Path, vocabulary: set, default: str | None = None) -> dict: + if not Path(path).exists(): + raise Invalid(f"{path} does not exist") + + document = tomllib.loads(Path(path).read_text()) + + for table in LEGACY_TABLES: + if table in document: + raise Invalid( + f"{path} has a legacy [{table}] table; entries belong under [cases.\"name\"]" + ) + + entries = document.get("cases", {}) + for name, entry in entries.items(): + entry.setdefault("expect", default) + if entry["expect"] not in vocabulary: + raise Invalid( + f"{path}: {name} has expect = {entry['expect']!r}, " + f"which is not one of {sorted(vocabulary)}" + ) + # An entry whose only content is a prerequisite states an ordering, not + # an exception, so it needs no reason. Anything else does: an exception + # without a stated reason cannot be told apart from an oversight. + claims_more = set(entry) - {"expect", "requires", "signer"} or entry["expect"] != default + if claims_more and not entry.get("note"): + raise Invalid(f"{path}: {name} has no note, so its reason is not stated") + + return entries + + +def orphans(entries: dict, documented) -> list: + """Manifest entries naming something the pages no longer document.""" + return sorted(set(entries) - set(documented)) + + +def load_errors(path: Path) -> dict: + """Error substrings that decide whether a failure is the page's fault. + + Data rather than code, because they are tuned to one chain's wording and + will drift when the SDK rewords an error. + """ + document = tomllib.loads(Path(path).read_text()) + errors = document.get("errors", {}) + for key in ("malformed", "environmental"): + if not errors.get(key): + raise Invalid(f"{path} has no [errors] {key} list") + return errors + + +def classify(output: str, errors: dict) -> str: + """Whether a failing command failed on its own arguments. + + An error matching nothing is unclassified, not assumed benign. A release + that rewords an error should be visible rather than silently rebucketed. + """ + low = output.lower() + if any(m in low for m in errors["malformed"]): + return "malformed" + if any(m in low for m in errors["environmental"]): + return "environmental" + return "unclassified" diff --git a/scripts/api-reference/package.json b/scripts/api-reference/package.json new file mode 100644 index 00000000..07c38c57 --- /dev/null +++ b/scripts/api-reference/package.json @@ -0,0 +1,22 @@ +{ + "name": "cosmos-docs-api-reference", + "version": "1.0.0", + "description": "Generates the Cosmos SDK API reference from upstream protos and the gRPC-gateway spec", + "type": "module", + "private": true, + "scripts": { + "sync": "node sync-sdk-api-reference.js", + "test": "node --test \"test/**/*.test.js\"", + "test-py": "python3 -m unittest discover -s test -p 'test_*.py'", + "verify-examples": "python3 verify-transaction-examples.py", + "conformance": "python3 conformance.py", + "tx-onchain": "python3 tx-onchain.py", + "query-onchain": "python3 query-onchain.py", + "release-check": "python3 release-check.py" + }, + "dependencies": { + "@bufbuild/buf": "1.72.0", + "js-yaml": "4.1.0", + "swagger2openapi": "7.0.8" + } +} diff --git a/scripts/api-reference/pagefill.py b/scripts/api-reference/pagefill.py new file mode 100644 index 00000000..7ddea5d5 --- /dev/null +++ b/scripts/api-reference/pagefill.py @@ -0,0 +1,293 @@ +"""Read the reference pages and fill their examples the way a reader would. + +Shared by the two on-chain runners. The rule both follow: a value comes from the +page, or from something the reader legitimately owns, or it is a finding. Nothing +is taken from the proto descriptor, because the descriptor is what the page is +supposed to be explaining. A filler that consults it can be right while the page +is wrong, which is exactly the failure this is built to catch. +""" + +import json +import re +from pathlib import Path + +REPO_ROOT = Path(__file__).resolve().parent.parent.parent + +# What a reader brings themselves. Anything else is the page's job to state. +READER_SUPPLIED = { + "cosmos.AddressString", + "cosmos.ValidatorAddressString", + "cosmos.ConsensusAddressString", + "cosmos.Int", +} + +SECTION = re.compile(r"### (?P[\w (),]+)\n(?P<body>.*?)(?=\n### |\n## |\Z)", re.DOTALL) +TYPE_URL = re.compile(r"\| Type URL \| `/(?P<type>[\w.]+)` \|") +GRPC_ROW = re.compile(r"\| gRPC \| `(?P<method>[\w.]+/\w+)` \|") +FIELD_ROW = re.compile(r"^\| `(?P<field>\w+)` \| (?P<type>[^|]+) \| (?P<note>[^|]*) \|$", re.M) +TYPE_LINK = re.compile(r"\(#(?P<anchor>[a-z0-9-]+)\)") +TYPE_HEADING = re.compile(r"^### (?P<name>cosmos[\w.]+)$", re.M) +TX_JSON = re.compile(r"In a transaction:\n\n```json\n(?P<json>.*?)\n```", re.DOTALL) +GRPCURL = re.compile( + r"```bash\ngrpcurl -plaintext(?: -d '(?P<payload>.*?)' \\\n )? *localhost:9090 " + r"(?P<target>[\w.]+/\w+)\n```", + re.DOTALL, +) +ONE_OF = re.compile(r"One of: (?P<options>`/[\w.]+`(?:, `/[\w.]+`)*)") +DEC_NOTE = re.compile(r"Encoded as cosmos\.Dec") +SCALAR_NOTE = re.compile(r"Encoded as (?P<name>cosmos\.\w+)") +ENUM_ROW = re.compile(r"^\| `(?P<value>[A-Z][A-Z0-9_]+)` \|", re.M) +GOVERNANCE_GATED = "The signer is the governance module account" + + +class Unfillable(Exception): + """The page gives a reader no way to determine this field. + + Carries the field name and, more importantly, the page's own note for + it, resolved at the raise site against whichever field table was in + scope there. `fill()` rebinds that table when it recurses into a nested + type, so a caller resolving the note itself from a top-level table would + either miss it or, worse, match an unrelated same-named field at the top + level. Reading `note` off the exception avoids both. `field` and `note` + are empty only for a whole-example failure not attributable to one key. + """ + + def __init__(self, message: str, field: str | None = None, note: str = ""): + super().__init__(message) + self.field = field + self.note = note + + +class Incomplete(Exception): + """The page parse did not cover everything the generator says it documents.""" + + +def assert_complete(version: str, parsed, kind: str) -> None: + """Every name the generator recorded must appear in the parse. + + The runners derive their own totals from what they parsed, so a regex that + stops matching would shrink the test set and still exit 0. This turns that + into a loud failure naming the exact methods. + """ + path = REPO_ROOT / "sdk" / version / "api-reference" / "inventory.json" + if not path.exists(): + raise Incomplete( + f"{path} is missing; regenerate with `npm run sync -- --version {version}`" + ) + + expected = set(json.loads(path.read_text())[kind]) + missing = sorted(expected - set(parsed)) + if missing: + raise Incomplete( + f"the page parse found {len(set(parsed))} of {len(expected)} {kind}; " + f"{len(missing)} missing, so a regex in pagefill.py has stopped matching:\n" + + "\n".join(f" {name}" for name in missing) + ) + + +GENERATED_FROM = re.compile( + r"Generated from (?P<repository>[\w./-]+) at commit (?P<sha>[0-9a-f]{40}) " + r"on ref\s+`(?P<ref>[\w./-]+)`" +) + + +def generated_from(version: str) -> tuple[str, str, str]: + """Which upstream commit these pages were generated from, and on what ref. + + Recorded in the spec's own description by the generator, so a check cannot + disagree with the artifact about what it is checking. Returns + (repository, sha, ref). + """ + path = REPO_ROOT / "sdk" / version / "api-reference" / "rest" / "openapi.yaml" + found = GENERATED_FROM.search(path.read_text()) + if not found: + raise Incomplete(f"{path} does not record the commit and ref it was generated from") + return found.group("repository"), found.group("sha"), found.group("ref") + + +def read_page(page: Path) -> dict: + """Everything one module page says, in the shape the fillers need.""" + text = page.read_text() + + # The Types section: where a reader follows a link to learn what a nested + # field contains, and where enum values are listed. + types, enums = {}, {} + headings = list(TYPE_HEADING.finditer(text)) + for index, heading in enumerate(headings): + end = headings[index + 1].start() if index + 1 < len(headings) else len(text) + block = text[heading.end():end] + name = heading.group("name") + types[name] = { + m.group("field"): (m.group("note").strip(), m.group("type").strip()) + for m in FIELD_ROW.finditer(block) + } + if "Written as a quoted string" in block: + values = [v for v in ENUM_ROW.findall(block) if not v.endswith("_UNSPECIFIED")] + if values: + enums[name] = values[0] + + return { + "name": page.name, + "text": text, + "types": types, + "enums": enums, + # Mintlify slugs a heading by lowercasing and replacing dots, so a link + # in a Type column maps back to the type it names. + "by_anchor": {name.lower().replace(".", "-"): name for name in types}, + # The page's own statement of how a Dec is written into a transaction. + # Read rather than assumed, so the runner is testing that sentence. + # Tied to the value a reader would copy rather than to one sentence's + # wording, so the boilerplate can be rewritten without silently making + # every Dec field unfillable. The page still has to state the form. + "dec_decimal": 'such as `"0.05"`' in text, + } + + +def anchor_for(title: str) -> str: + """The anchor Mintlify assigns to a `### ` heading. + + Matches `buildMethodHeadings` in lib/render.js exactly: lowercase, drop + `(`, `)` and `,`, collapse whitespace to `-`. Most headings are just the + method name, but gov ships v1 and v1beta1 in one module, so a page can + hold several `### Deposit` headings disambiguated as `Deposit (Query, + v1)`; only the generator's own slugging reproduces that anchor. + """ + return re.sub(r"\s+", "-", re.sub(r"[(),]", "", title.lower()).strip()) + + +def transactions_on(page: dict, source: Path): + """Every transaction message the page documents, with its example and tables.""" + for block in SECTION.finditer(page["text"]): + body = block.group("body") + type_url, example = TYPE_URL.search(body), TX_JSON.search(body) + if not type_url or not example: + continue + yield type_url.group("type"), { + "example": json.loads(example.group("json")), + "fields": _fields(body), + "anchor": "#" + anchor_for(block.group("title")), + # The page states, in its own words, that no user can sign this. + # Read rather than derived from the descriptor, so what the runner + # expects is what the reader was told, and so a message that becomes + # governance gated upstream classifies itself with no manifest edit. + "governance_gated": GOVERNANCE_GATED in body, + } + + +def queries_on(page: dict): + """Every runnable grpcurl example the page publishes, with its field table.""" + for block in SECTION.finditer(page["text"]): + body = block.group("body") + command = GRPCURL.search(body) + if not command: + continue + payload = command.group("payload") + yield command.group("target"), { + "example": json.loads(payload) if payload else None, + "fields": _fields(body), + "anchor": "#" + anchor_for(block.group("title")), + } + + +def _fields(body: str) -> dict: + return { + m.group("field"): (m.group("note").strip(), m.group("type").strip()) + for m in FIELD_ROW.finditer(body) + } + + +def fill_value(value, note: str, type_cell: str, page: dict, fixtures: dict, field: str): + """Resolve one placeholder from the page, or from what the reader owns.""" + if not isinstance(value, str) or not value.startswith("<"): + return value + + one_of = ONE_OF.search(note) + if one_of: + return one_of.group("options").split(",")[0].strip().strip("`") + + # An enum-typed field links to its values in the page's own Types section. + link = TYPE_LINK.search(type_cell) + if link: + named = page["by_anchor"].get(link.group("anchor"), "") + if named in page["enums"]: + return page["enums"][named] + + if DEC_NOTE.search(note): + if not page["dec_decimal"]: + raise Unfillable("the page does not state how a Dec is written", field=field, note=note) + # Every Dec written into a transaction is a decimal string, including + # the ones whose proto type is bytes. + return "0.05" + + scalar = SCALAR_NOTE.search(note) + if scalar and scalar.group("name") in READER_SUPPLIED: + return fixtures[scalar.group("name")] + + if field == "denom" or "denomination" in note.lower(): + return fixtures["denom"] + + quoted = re.search(r'"([a-z][a-z0-9_]{2,})"', note) + if quoted: + return quoted.group(1) + + # A constrained format is the page's responsibility to state. Free text is + # not: a reader supplies their own memo or moniker without being told. + constrained = ( + value != "<string>" + or field.endswith(("_url", "_hash", "_id", "_key", "_bytes", "_type", "_address")) + or re.search(r"hex|base64|RFC|must (be|match)|identifier|type URL|query", note, re.I) + ) + if constrained: + raise Unfillable(f"no value or form for `{field}` (placeholder {value})", field=field, note=note) + return "test" + + +def fill(body, page: dict, fixtures: dict, fields=None): + """Fill a whole example, following the page's links into nested types.""" + if isinstance(body, list): + return [fill(v, page, fixtures, fields) for v in body] + if not isinstance(body, dict): + return body + + fields = {} if fields is None else fields + out = {} + for key, value in body.items(): + if key == "@type": + out[key] = value + continue + + note, type_cell = fields.get(key, ("", "")) + + # An Any field may be repeated, in which case the placeholder sits + # inside a list rather than directly under the key. + candidate = value[0] if isinstance(value, list) and value else value + if isinstance(candidate, dict) and candidate.get("@type", "").startswith("/cosmos.example."): + wrap = (lambda v: [v]) if isinstance(value, list) else (lambda v: v) + one_of = ONE_OF.search(note) + if one_of: + out[key] = wrap({"@type": one_of.group("options").split(",")[0].strip().strip("`")}) + continue + if "implementing cosmos.base.v1beta1.Msg" in note: + out[key] = wrap({ + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": fixtures["cosmos.AddressString"], + "to_address": fixtures["cosmos.AddressString"], + "amount": [{"denom": fixtures["denom"], "amount": "1"}], + }) + continue + raise Unfillable(f"`{key}` is an Any and the page names no concrete type", field=key, note=note) + + if isinstance(value, (dict, list)): + link = TYPE_LINK.search(type_cell) + nested = page["types"].get(page["by_anchor"].get(link.group("anchor"), "")) if link else None + out[key] = fill(value, page, fixtures, nested or {}) + else: + out[key] = fill_value(value, note, type_cell, page, fixtures, key) + return out + + +def pages_for(version: str): + directory = REPO_ROOT / "sdk" / version / "api-reference" / "grpc" + for path in sorted(directory.glob("*.mdx")): + if path.name != "index.mdx": + yield path, read_page(path) diff --git a/scripts/api-reference/query-coverage.toml b/scripts/api-reference/query-coverage.toml new file mode 100644 index 00000000..e6cd1958 --- /dev/null +++ b/scripts/api-reference/query-coverage.toml @@ -0,0 +1,126 @@ +# Known exceptions for the on-chain query runner. +# +# Every documented grpcurl command is run with values taken from the page. Most +# work. The ones here do not, and each says why, so the runner's output is what +# changed rather than the same list every week. +# +# Entries are diffed against the pages on every run: one whose method no longer +# exists is reported as an orphan rather than silently ignored, and a method +# added upstream is exercised with no entry at all. +# +# expect: +# unfillable the page cannot give a reader a usable value for some field +# known-failure the command runs but the chain rejects its arguments +# +# An entry is a statement that we know this cannot work as written. Where the +# reason is fixable it should be fixed instead of recorded. + +# Error substrings that decide whether a failing command failed on its own +# arguments. Tuned to one chain's wording, so they live here rather than in +# code: an SDK release that rewords an error should be a manifest edit with a +# visible diff, not a silent reclassification. +# +# An error matching neither list is reported as unclassified, which is a +# finding. Add it to whichever list is correct once you have read it. + +[errors] +malformed = [ + "invalid character", "illegal base64", "unknown field", "invalid value for enum", + "hrp does not match", "cannot unmarshal", "invalid validator status", + "expecting number", "bad input", "unable to resolve type", "no such method", + "decoding bech32 failed", "empty address", "unknown params type", + "invalid evidence hash", "disfix json wrapper", "unsupported abci query path", + "wanted tag", "is not allowed", +] +environmental = [ + "not expose service", "not found", "doesn't exist", "no delegation", + "client metadata for denom", "identifier not available", "not available", +] + +# --------------------------------------------------------------------------- +# Values that only exist on a live chain. No static example can supply a +# transaction hash or raw transaction bytes, so these are inherent rather than +# oversights. The honest fix is prose naming where the value comes from. +# --------------------------------------------------------------------------- + +[cases."cosmos.tx.v1beta1.Service/GetTx"] +expect = "unfillable" +note = "needs a transaction hash, which only exists after broadcasting one" + +[cases."cosmos.tx.v1beta1.Service/GetTxsEvent"] +expect = "unfillable" +note = "needs a CometBFT event query; the syntax is not documented on this page" + +[cases."cosmos.tx.v1beta1.Service/TxEncode"] +expect = "unfillable" +note = "timeout_timestamp has no stated form on this page" + +[cases."cosmos.tx.v1beta1.Service/BroadcastTx"] +expect = "known-failure" +note = "needs signed transaction bytes from a previous step" + +[cases."cosmos.tx.v1beta1.Service/Simulate"] +expect = "known-failure" +note = "needs transaction bytes" + +[cases."cosmos.tx.v1beta1.Service/TxDecode"] +expect = "known-failure" +note = "needs transaction bytes" + +[cases."cosmos.tx.v1beta1.Service/TxDecodeAmino"] +expect = "known-failure" +note = "needs amino-encoded transaction bytes" + +[cases."cosmos.tx.v1beta1.Service/TxEncodeAmino"] +expect = "known-failure" +note = "needs an amino JSON document" + +[cases."cosmos.evidence.v1beta1.Query/Evidence"] +expect = "known-failure" +note = "needs a hex evidence hash, obtainable only from a submitted evidence transaction" + +[cases."cosmos.base.tendermint.v1beta1.Service/ABCIQuery"] +expect = "known-failure" +note = "needs an ABCI store path; the page does not enumerate valid paths" + +# --------------------------------------------------------------------------- +# Upstream leaves the field undocumented, so the page has nothing to pass on. +# These are worth raising with cosmos-sdk rather than papering over here. +# --------------------------------------------------------------------------- + +[cases."cosmos.auth.v1beta1.Query/AddressBytesToString"] +expect = "known-failure" +note = "address_bytes is base64 of raw address bytes; upstream documents no example and an empty value is rejected" + +[cases."cosmos.auth.v1beta1.Query/AddressStringToBytes"] +expect = "known-failure" +note = "address_string carries no scalar annotation upstream, so nothing marks it as bech32" + +[cases."cosmos.authz.v1beta1.Query/Grants"] +expect = "unfillable" +note = "msg_type_url has no stated form; upstream's comment does not give an example" + +[cases."cosmos.upgrade.v1beta1.Query/AppliedPlan"] +expect = "unfillable" +note = "needs the name of a plan that has been applied; no query lists them" + +[cases."cosmos.upgrade.v1beta1.Query/ModuleVersions"] +expect = "unfillable" +note = "module_name is optional and undocumented; omitting it returns every module" + +[cases."cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations"] +expect = "unfillable" +note = "needs an interface name from ListAllInterfaces; the page does not cross-reference it" + +# --------------------------------------------------------------------------- +# Not a node API. The service is implemented by an out-of-process streaming +# plugin that the node dials as a client, so no node serves it on 9090. +# --------------------------------------------------------------------------- + +[cases."cosmos.store.streaming.abci.ABCIListenerService/ListenCommit"] +expect = "unfillable" +note = "plugin interface, not served by a node; the example cannot work anywhere" + +[cases."cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock"] +expect = "unfillable" +note = "plugin interface, not served by a node; the example cannot work anywhere" diff --git a/scripts/api-reference/query-onchain.py b/scripts/api-reference/query-onchain.py new file mode 100644 index 00000000..8343b4e3 --- /dev/null +++ b/scripts/api-reference/query-onchain.py @@ -0,0 +1,289 @@ +#!/usr/bin/env python3 +"""Run every documented query against a chain, filled the way a reader would fill it. + +The reference publishes a grpcurl command for every query method. This runs all +of them, substituting placeholders using only what the page states or what a +reader legitimately owns, so a command that cannot be used as written fails here. + +Two outcomes are defects: + + the command errors on its own arguments the page's payload is wrong + a placeholder cannot be resolved the page never says what to put there + +Everything else is not: a query that returns nothing, or that names a module this +chain does not register, was still a well-formed request. + +Known exceptions live in query-coverage.toml with a reason, so the output is what +changed rather than the same list every run. Entries are diffed against the pages +each time, so one whose method is gone is reported instead of silently ignored. + +Usage: + python3 query-onchain.py --grpc localhost:9090 --rest http://localhost:1317 +""" + +import argparse +import json +import subprocess +import sys +import urllib.request +from pathlib import Path + +import findings +import manifest +import pagefill + +HERE = Path(__file__).resolve().parent + + +def fixtures(rest: str) -> dict: + def get(path): + with urllib.request.urlopen(f"{rest}{path}", timeout=20) as response: + return json.load(response) + + values = {"denom": get("/cosmos/staking/v1beta1/params")["params"]["bond_denom"]} + + validators = get("/cosmos/staking/v1beta1/validators?pagination.limit=1").get("validators", []) + if validators: + values["cosmos.ValidatorAddressString"] = validators[0]["operator_address"] + + for account in get("/cosmos/auth/v1beta1/accounts?pagination.limit=5").get("accounts", []): + address = account.get("address") or account.get("base_account", {}).get("address") + if address and address.startswith("cosmos1"): + values["cosmos.AddressString"] = address + break + + infos = get("/cosmos/slashing/v1beta1/signing_infos?pagination.limit=1").get("info", []) + if infos: + values["cosmos.ConsensusAddressString"] = infos[0]["address"] + + values["cosmos.Int"] = "1" + return values + + +def assertions(grpc: str, rest: str, values: dict, counts: dict) -> list: + """Claims the enumerated commands cannot express. + + Two are negative: they pass by failing. They are worth keeping precisely + because they would start passing silently if the chain changed, which no + positive assertion, run over and over against a chain that keeps agreeing + with the page, would ever notice. + + ``values["cosmos.AddressString"]`` is only set when fixtures() happens to + see a cosmos1-prefixed account among the first five accounts the chain + returns. On a chain with a different bech32 prefix, or one whose first + five accounts are all module accounts, the key is absent. The two checks + that need an account address are skipped rather than raising: a KeyError + here would take down the run before the other 123 queries execute, which + is a worse outcome than losing two of four assertions. + """ + items = [] + address = values.get("cosmos.AddressString") + + def expect_error(name, args_, claim, page): + result = subprocess.run(["grpcurl", "-plaintext", *args_], capture_output=True, + text=True, timeout=60) + if result.returncode == 0: + items.append(findings.Finding( + page=page, anchor="", method=name, claim=claim, + sent=None, response="succeeded, but the page says it cannot", + verdict="page-defect", manifest_entry=None)) + print(f" FAIL {name:52} unexpectedly succeeded") + else: + counts["pass"] += 1 + print(f" PASS {name:52} rejected as documented") + + if address: + expect_error( + "cosmos.staking.v1beta1.Query/Validator", + ["-d", json.dumps({"validator_addr": address}), grpc, + "cosmos.staking.v1beta1.Query/Validator"], + "an account address is rejected where a validator operator address belongs", + "grpc/index.mdx", + ) + else: + print(" SKIP cosmos.staking.v1beta1.Query/Validator (crossed spaces) " + "no cosmos1 address fixture") + + expect_error( + "cosmos.bank.v1beta1.Msg/Send", + ["-d", "{}", grpc, "cosmos.bank.v1beta1.Msg/Send"], + "Msg is not served on the gRPC query port", + "grpc/index.mdx", + ) + + rest_checks = [ + ("/cosmos/mint/v1beta1/params", "a decimal is always a decimal string over REST"), + ] + if address: + rest_checks.append(( + f"/cosmos/bank/v1beta1/balances/{address}", + "a REST path parameter takes a bech32 address", + )) + else: + print(" SKIP GET /cosmos/bank/v1beta1/balances/{address} " + "no cosmos1 address fixture") + + for path, claim in rest_checks: + try: + with urllib.request.urlopen(f"{rest}{path}", timeout=20) as response: + json.load(response) + counts["pass"] += 1 + print(f" PASS GET {path:48} ok") + except Exception as error: # noqa: BLE001 + items.append(findings.Finding( + page="index.mdx", anchor="", method=f"GET {path}", claim=claim, + sent=None, response=str(error), verdict="page-defect", manifest_entry=None)) + print(f" FAIL GET {path:48} {error}") + + return items + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--version", default="latest", choices=["latest", "next"]) + parser.add_argument("--grpc", default="localhost:9090") + parser.add_argument("--rest", default="http://localhost:1317") + parser.add_argument("--findings", default="findings-query-onchain.json") + args = parser.parse_args() + + try: + values = fixtures(args.rest) + except Exception as error: # noqa: BLE001 + print(f"could not reach the chain: {error}", file=sys.stderr) + print("start a local simapp with its API and gRPC servers enabled", file=sys.stderr) + return 1 + + commands = {} + for path, page in pagefill.pages_for(args.version): + for target, block in pagefill.queries_on(page): + commands[target] = (page, block) + + try: + pagefill.assert_complete(args.version, commands, "queries") + except pagefill.Incomplete as reason: + print(f"\n{reason}", file=sys.stderr) + return 1 + + try: + entries = manifest.load(HERE / "query-coverage.toml", manifest.QUERY_VOCABULARY) + errors = manifest.load_errors(HERE / "query-coverage.toml") + except manifest.Invalid as reason: + print(reason, file=sys.stderr) + return 1 + + counts = {"pass": 0, "known": 0, "environmental": 0} + items = [] + + # An orphan is a finding, not a printed aside. Inside release-check this + # runner's output is one of several multi-minute logs, and a list that + # scrolls past a step reporting ok is not the visible trace the manifest + # diff is supposed to leave. Recording it here puts it in the findings file + # and makes the run exit non-zero. + for name in manifest.orphans(entries, commands): + counts.setdefault("stale entry", 0) + counts["stale entry"] += 1 + items.append(findings.Finding( + page="query-coverage.toml", anchor="", method=name, + claim=entries[name].get("note", ""), sent=None, + response="the manifest names a method the pages no longer document; " + "delete the entry", + verdict="stale-manifest-entry", manifest_entry=name, + )) + print(f" STALE {name:52} no matching method, delete the entry") + + for target in sorted(commands): + page, block = commands[target] + entry = entries.get(target, {}) + + try: + payload = pagefill.fill(block["example"] or {}, page, values, block["fields"]) + except pagefill.Unfillable as reason: + if entry.get("expect") == "unfillable": + counts["known"] += 1 + print(f" KNOWN {target:52} {entry.get('note', '')[:56]}") + else: + claim = reason.note + items.append(findings.Finding( + page=page["name"], anchor=block["anchor"], method=target, claim=claim, + sent=None, response=str(reason), verdict="unfillable", + manifest_entry=target if entry else None, + )) + print(f" UNFILL {target:52} {reason}") + continue + + if entry.get("expect") == "unfillable": + # The manifest says a reader cannot fill this query, and it just + # filled. Running it anyway would pass and hide the drift, which is + # usually upstream supplying the form the page was missing. What is + # wrong now is the recorded expectation, so that is what is reported. + counts.setdefault("stale entry", 0) + counts["stale entry"] += 1 + items.append(findings.Finding( + page=page["name"], anchor=block["anchor"], method=target, + claim=entry.get("note", ""), sent=payload, + response="the manifest records this as unfillable, but the page filled it; " + "delete the entry or give it an outcome", + verdict="stale-manifest-entry", manifest_entry=target, + )) + print(f" STALE {target:52} recorded unfillable, but it filled") + continue + + command = ["grpcurl", "-plaintext"] + if block["example"] is not None: + command += ["-d", json.dumps(payload)] + command += [args.grpc, target] + + result = subprocess.run(command, capture_output=True, text=True, timeout=60) + output = (result.stdout + result.stderr).strip() + + verdict = manifest.classify(output, errors) + + if result.returncode == 0 and verdict != "malformed": + if entry.get("expect") == "known-failure": + # Recorded as failing, and it succeeded. Counting it as a plain + # PASS would leave a stale exception in the manifest forever, + # understating what the documentation already gets right. + counts.setdefault("stale entry", 0) + counts["stale entry"] += 1 + items.append(findings.Finding( + page=page["name"], anchor=block["anchor"], method=target, + claim=entry.get("note", ""), sent=payload if block["example"] is not None else None, + response="the manifest records this as a known failure, but it succeeded; " + "delete the entry", + verdict="stale-manifest-entry", manifest_entry=target, + )) + print(f" STALE {target:52} recorded known-failure, but it succeeded") + continue + counts["pass"] += 1 + print(f" PASS {target:52} ok") + elif verdict == "environmental": + counts["environmental"] += 1 + print(f" SKIP {target:52} chain state or module not registered") + elif entry.get("expect") == "known-failure": + counts["known"] += 1 + print(f" KNOWN {target:52} {entry.get('note', '')[:56]}") + else: + sent = payload if block["example"] is not None else None + items.append(findings.Finding( + page=page["name"], anchor=block["anchor"], method=target, + claim=findings.claim_for(block["fields"], sent), + sent=sent, + response=output.splitlines()[-1][:150], + verdict="page-defect" if verdict == "malformed" else "unclassified", + manifest_entry=target if entry else None, + )) + label = "UNCLASS" if verdict == "unclassified" else "FAIL" + print(f" {label:7} {target:52} {output.splitlines()[-1][:56]}") + + items.extend(assertions(args.grpc, args.rest, values, counts)) + + repository, sha, ref = pagefill.generated_from(args.version) + document = findings.document(args.version, repository, ref, sha, "query-onchain", counts, items) + findings.write(args.findings, document) + print() + print(findings.render(document)) + return 1 if document["totals"]["findings"] else 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/api-reference/release-check.py b/scripts/api-reference/release-check.py new file mode 100755 index 00000000..8befa8f7 --- /dev/null +++ b/scripts/api-reference/release-check.py @@ -0,0 +1,247 @@ +#!/usr/bin/env python3 +"""The release gate: regenerate, verify offline, then execute every documented +call against a chain built from the same commit. + +Run before a freeze. This is the only thing that proves the pages a reader will +copy actually work, so a freeze should not proceed while it is failing. + + python3 release-check.py --version next --ref release/v0.54.x + python3 release-check.py --version next --dry-run + +The chain is built from the commit the pages record, not pointed at a public +endpoint, because version skew produces false failures that cost more to +discount than the build costs to run. It also runs on its own ports, so a +developer chain already up on this machine is neither disturbed nor mistaken +for the one under test. +""" + +import argparse +import os +import difflib +import shutil +import subprocess +import sys +import tempfile +from pathlib import Path + +import chain +import pagefill + +HERE = Path(__file__).resolve().parent +REPO_ROOT = HERE.parent.parent + + +# What the generator writes, and therefore what a dry run has to put back. +def generated_paths(version: str) -> list: + return [REPO_ROOT / "sdk" / version / "api-reference", REPO_ROOT / "docs.json"] + + +def step(name: str, args: list, **kwargs) -> bool: + # flush, always: the runners write straight to the terminal while this + # script's own output sits in a pipe buffer, and an unflushed banner lands + # after the output it was supposed to label. + print(f"\n=== {name}", flush=True) + result = subprocess.run(args, cwd=str(HERE), **kwargs) + ok = result.returncode == 0 + print(f"=== {name}: {'ok' if ok else 'FAILED'}", flush=True) + return ok + + +def preflight(tools: list) -> bool: + """Fail before the expensive part, naming what is missing. + + A gate that skips a check because its tool is absent is how a green run stops + meaning anything, so a missing tool is fatal rather than a warning. + """ + hints = { + "go": "install Go 1.25 or later", + "schemathesis": "pip install schemathesis", + "node": "install Node 20 or later", + "git": "install git", + } + missing = [tool for tool in tools if shutil.which(tool) is None] + for tool in missing: + hint = hints.get(tool, "not on PATH") + print(f"missing: {tool} ({hint})", file=sys.stderr) + + # Not a tool, but the same class of problem. The generator makes exactly one + # authenticated request, resolving a branch name to a commit SHA, so it is + # never rate-limited by its own volume. Unauthenticated api.github.com + # allows 60 requests an hour per IP, which a shared CI runner can have + # already spent, and then that one request 403s. Checked here so the + # operator reads "missing: GITHUB_TOKEN" rather than a 403 from a URL that + # looks unrelated to the credential they forgot. + if not os.environ.get("GITHUB_TOKEN"): + print( + "missing: GITHUB_TOKEN (export GITHUB_TOKEN=$(gh auth token))", + file=sys.stderr, + ) + missing = missing + ["GITHUB_TOKEN"] + + return not missing + + +def snapshot(paths: list, into: Path) -> dict: + """Copy the generated tree aside, verbatim. + + Not `git checkout`: the working tree during a release commonly holds other + uncommitted work, and restoring from the index would take that with it. + """ + saved = {} + for index, path in enumerate(paths): + if not path.exists(): + continue + target = into / f"{index}-{path.name}" + if path.is_dir(): + shutil.copytree(path, target) + else: + shutil.copy2(path, target) + saved[path] = target + return saved + + +def restore(saved: dict) -> None: + for path, target in saved.items(): + if path.is_dir(): + shutil.rmtree(path) + shutil.copytree(target, path) + else: + shutil.copy2(target, path) + + +def report_diff(saved: dict) -> None: + """What a real run would have changed, per file.""" + changed = 0 + for path, target in saved.items(): + for before, after in _pairs(target, path): + plus, minus = _line_delta(before, after) + if plus or minus: + changed += 1 + name = after.relative_to(REPO_ROOT) if after.exists() else before.name + print(f" {name}: +{plus} -{minus}") + print(f" {changed} file(s) would change" if changed else " nothing would change") + + +def _pairs(before: Path, after: Path): + """Walk both sides together, so a file added or removed on either is seen.""" + if before.is_dir() or after.is_dir(): + names = set() + for side in (before, after): + if side.is_dir(): + names.update(child.name for child in side.iterdir()) + for name in sorted(names): + yield from _pairs(before / name, after / name) + return + yield before, after + + +def _line_delta(before: Path, after: Path) -> tuple: + old = before.read_text().splitlines() if before.is_file() else [] + new = after.read_text().splitlines() if after.is_file() else [] + plus = minus = 0 + for line in difflib.unified_diff(old, new, n=0, lineterm=""): + if line.startswith("+++") or line.startswith("---"): + continue + if line.startswith("+"): + plus += 1 + elif line.startswith("-"): + minus += 1 + return plus, minus + + +def dry_run(version: str, sync: list) -> int: + scratch = Path(tempfile.mkdtemp(prefix="release-check-")) + saved = snapshot(generated_paths(version), scratch) + # Named before anything is overwritten. The regeneration happens in place + # and the originals live only here until restore() puts them back, so an + # interrupt the finally cannot cover (SIGKILL, a lost terminal, a crash) + # leaves the operator with the only copy and no way to find it. + print(f"Originals copied to {scratch}. Restored on exit; if this run is killed " + f"outright, copy them back from there.", flush=True) + try: + if not step("regenerate (dry run)", sync): + return 1 + print("\nWhat a real run would change:") + report_diff(saved) + finally: + restore(saved) + shutil.rmtree(scratch, ignore_errors=True) + print("\nDry run: the working tree is back as it was. Nothing above was kept.") + return 0 + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--version", default="next", choices=["next", "latest"]) + parser.add_argument("--ref", default=None, + help="upstream ref to generate from; the release branch before a freeze") + parser.add_argument("--dry-run", action="store_true", + help="regenerate into a scratch copy and report the diff, changing nothing") + parser.add_argument("--workdir", default="/tmp/docs-release-check") + args = parser.parse_args() + + sync = ["node", "sync-sdk-api-reference.js", "--version", args.version] + if args.ref: + sync += ["--ref", args.ref] + + if args.dry_run: + if not preflight(["git", "node"]): + return 1 + return dry_run(args.version, sync) + + if not preflight(["git", "node", "go", "schemathesis"]): + return 1 + + if not step("regenerate", sync): + return 1 + + offline = [ + ("unit tests", ["npm", "test"]), + ("python unit tests", ["npm", "run", "test-py"]), + ("example encoding", ["python3", "verify-transaction-examples.py"]), + ] + for name, command in offline: + if not step(name, command): + return 1 + + repository, sha, ref = pagefill.generated_from(args.version) + print(f"\nBuilding a chain at {repository}@{sha[:12]} ({ref})", flush=True) + + failed = [] + with chain.running(repository, sha, Path(args.workdir)) as node: + print(f"Chain up: rpc {node['node']}, rest {node['rest']}, grpc {node['grpc']}", + flush=True) + onchain = [ + ("REST conformance", ["python3", "conformance.py", + "--version", args.version, "--url", node["rest"]]), + ("documented queries", ["python3", "query-onchain.py", "--version", args.version, + "--grpc", node["grpc"], "--rest", node["rest"]]), + ("documented transactions", ["python3", "tx-onchain.py", "--version", args.version, + "--simd", node["simd"], "--home", node["home"], + "--chain-id", node["chain_id"], "--node", node["node"], + "--rest", node["rest"], "--from", node["key"], + "--second-key", node["second_key"], + # The gentx was signed by the primary key, + # so that account operates the validator. + "--validator-key", node["key"]]), + ] + failed = [name for name, command in onchain if not step(name, command)] + + if failed: + print(f"\n{len(failed)} check(s) failed: {', '.join(failed)}") + print("Findings are in findings-*.json. Do not freeze until these are resolved or recorded.") + return 1 + + # The gate proves the pages work. It never reads them as English, so the + # prose pass is the step that catches a correct example beside a sentence + # that misleads. Naming it here because a step nobody is reminded of is a + # step nobody runs. + print("\nAll checks passed.") + print("Last step before freezing: read the generated prose.") + print(" Use the review-generated-prose skill on the regenerated pages.") + print(" Do not edit a generated page: fixes go in lib/render.js or upstream.") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/api-reference/sync-sdk-api-reference.js b/scripts/api-reference/sync-sdk-api-reference.js new file mode 100644 index 00000000..4e9498d2 --- /dev/null +++ b/scripts/api-reference/sync-sdk-api-reference.js @@ -0,0 +1,301 @@ +#!/usr/bin/env node + +/** + * sync-sdk-api-reference.js + * + * Generates the Cosmos SDK API reference for one documented version: + * + * sdk/<version>/api-reference/grpc/<module>.mdx from the proto descriptor + * sdk/<version>/api-reference/rest/openapi.yaml from upstream's gateway spec + * + * and rewrites its own groups in docs.json so a module that appears upstream + * gets a page and a navigation entry in the same run. + * + * Nothing here is a hand-maintained list. The upstream repository and the + * released version come from versions.json; the module set, the service set and + * the ordering come from the descriptor. The ref is resolved to a commit SHA + * before anything is generated, so the output records exactly what it was built + * from and regenerating at that SHA produces the same bytes. + * + * Usage: + * node sync-sdk-api-reference.js --version next + * node sync-sdk-api-reference.js --version latest --modules auth,bank + */ + +import fs from 'fs'; +import path from 'path'; +import os from 'os'; +import { execFileSync } from 'child_process'; +import { fileURLToPath } from 'url'; +import yaml from 'js-yaml'; + +import { parseArgs, resolveRef } from './lib/refs.js'; +import { parseDescriptor } from './lib/descriptor.js'; +import { renderModulePage, buildMethodHeadings } from './lib/render.js'; +import { buildInventory } from './lib/inventory.js'; +import { + checkScalarAnnotationsDocumented, + dropFullyDeprecatedModules, + pruneRemovedModulePages, + checkWellKnownTypesHandled, + checkTxEnvelopeDocumented, +} from './lib/checks.js'; +import { + convertToOpenApi3, + joinSpecToDescriptor, + applyServers, + dropIdenticalPathTemplates, + useProtoFieldNames, + requireDeclaredFields, + allowGatewayNulls, + correctResponseSchemas, + findSchemaDrift, + applyInfo, + moduleFromPath, +} from './lib/openapi.js'; + +const HERE = path.dirname(fileURLToPath(import.meta.url)); +const REPO_ROOT = path.resolve(HERE, '../..'); +const PRODUCT = 'sdk'; +const BUF = path.join(HERE, 'node_modules/.bin/buf'); + +const SWAGGER_PATH = 'client/docs/swagger-ui/swagger.yaml'; + +async function fetchJson(url) { + const response = await fetch(url, { + headers: { + Accept: 'application/vnd.github+json', + 'User-Agent': 'cosmos-docs-api-reference', + ...(process.env.GITHUB_TOKEN ? { Authorization: `Bearer ${process.env.GITHUB_TOKEN}` } : {}), + }, + }); + if (!response.ok) throw new Error(`${response.status} from ${url}`); + return response.json(); +} + +async function fetchText(url) { + const response = await fetch(url, { headers: { 'User-Agent': 'cosmos-docs-api-reference' } }); + if (!response.ok) throw new Error(`${response.status} from ${url}`); + return response.text(); +} + +async function resolveSha(repository, ref) { + const commit = await fetchJson(`https://api.github.com/repos/${repository}/commits/${ref}`); + return commit.sha; +} + +function buildDescriptor(repository, sha) { + const out = path.join(os.tmpdir(), `sdk-descriptor-${sha.slice(0, 12)}.json`); + const input = `https://github.com/${repository}.git#ref=${sha},subdir=proto`; + execFileSync(BUF, ['build', input, '-o', out], { stdio: ['ignore', 'ignore', 'inherit'] }); + return JSON.parse(fs.readFileSync(out, 'utf8')); +} + +function writeFile(target, contents) { + fs.mkdirSync(path.dirname(target), { recursive: true }); + fs.writeFileSync(target, contents); +} + +/** + * The generator owns its groups in docs.json. A generated page with no + * navigation entry is unreachable, which is worse than not generating it, so + * the two are written together and this stays idempotent. + */ +function updateDocsJson(version, moduleNames) { + const docsPath = path.join(REPO_ROOT, 'docs.json'); + const docs = JSON.parse(fs.readFileSync(docsPath, 'utf8')); + + const dropdown = docs.navigation.dropdowns.find((d) => d.dropdown === 'Cosmos SDK'); + if (!dropdown) throw new Error('docs.json has no Cosmos SDK dropdown'); + + // Version entries are labelled with the display version, so the latest/ entry + // reads "v0.55" and is renamed at every freeze. The directory its pages point + // at is the stable identifier. + const prefix = `"${PRODUCT}/${version}/`; + const entry = dropdown.versions.find((v) => JSON.stringify(v).includes(prefix)); + if (!entry) throw new Error(`no Cosmos SDK version entry serving ${PRODUCT}/${version}/`); + + const base = `${PRODUCT}/${version}/api-reference`; + const tab = { + tab: 'API Reference', + groups: [ + { group: 'Overview', pages: [`${base}/index`, `${base}/transactions`] }, + { + group: 'gRPC Services', + pages: [`${base}/grpc/index`, ...moduleNames.map((m) => `${base}/grpc/${m}`)], + }, + { + group: 'REST (gRPC Gateway)', + openapi: { source: `${base}/rest/openapi.yaml`, directory: `${base}/rest` }, + }, + ], + }; + + const existing = entry.tabs.findIndex((t) => t.tab === 'API Reference'); + if (existing >= 0) entry.tabs[existing] = tab; + else entry.tabs.push(tab); + + fs.writeFileSync(docsPath, `${JSON.stringify(docs, null, 2)}\n`); +} + +function filterSpecToModules(spec, moduleNames) { + const allowed = new Set(moduleNames); + for (const routePath of Object.keys(spec.paths ?? {})) { + if (!allowed.has(moduleFromPath(routePath))) delete spec.paths[routePath]; + } + return spec; +} + +async function main() { + const args = parseArgs(process.argv.slice(2)); + const { repository, ref, displayVersion } = resolveRef(args.version, { ref: args.ref }); + + console.log(`Resolving ${repository}@${ref}`); + const sha = await resolveSha(repository, ref); + const context = { repository, ref, sha, displayVersion, version: args.version }; + console.log(` ${sha}`); + + console.log('Building proto descriptor'); + const descriptor = buildDescriptor(repository, sha); + const { modules, types } = parseDescriptor(descriptor); + + let selected = args.modules + ? modules.filter((m) => args.modules.includes(m.name)) + : modules; + if (args.modules && selected.length !== args.modules.length) { + const found = selected.map((m) => m.name); + throw new Error(`unknown modules: ${args.modules.filter((m) => !found.includes(m)).join(', ')}`); + } + const { kept, dropped: fullyDeprecated } = dropFullyDeprecatedModules(selected); + if (fullyDeprecated.length) { + console.log( + ` dropped ${fullyDeprecated.length} module(s) whose every method is deprecated: ${fullyDeprecated.join(', ')}`, + ); + } + selected = kept; + + console.log(` ${selected.length} modules, ${types.messages.size} message types`); + + // One source of truth for method headings, shared by the module pages and + // the REST cross-links, so an anchor cannot drift from what it points at. + const headings = buildMethodHeadings(selected); + + const outputRoot = path.join(REPO_ROOT, PRODUCT, args.version, 'api-reference'); + + checkWellKnownTypesHandled(types); + checkTxEnvelopeDocumented(types, outputRoot); + const annotations = checkScalarAnnotationsDocumented(types, outputRoot); + console.log(` ${annotations.length} scalar annotations, all documented`); + + console.log('Rendering module pages'); + for (const module of selected) { + writeFile(path.join(outputRoot, 'grpc', `${module.name}.mdx`), renderModulePage(module, types, context, headings)); + } + + const inventory = buildInventory(selected); + writeFile( + path.join(outputRoot, 'inventory.json'), + `${JSON.stringify(inventory, null, 2)}\n`, + ); + console.log(` ${inventory.queries.length} query methods, ${inventory.messages.length} messages`); + + console.log('Converting gateway spec'); + const swaggerUrl = `https://raw.githubusercontent.com/${repository}/${sha}/${SWAGGER_PATH}`; + const swagger = yaml.load(await fetchText(swaggerUrl)); + let spec = await convertToOpenApi3(swagger); + if (args.modules) spec = filterSpecToModules(spec, args.modules); + + const { spec: joined, problems, unrepresented } = joinSpecToDescriptor(spec, selected, { + grpcPagePath: `/${PRODUCT}/${args.version}/api-reference/grpc`, + headings, + }); + + if (unrepresented.length) { + console.warn(` ${unrepresented.length} annotated methods absent from upstream's REST spec:`); + for (const entry of unrepresented) console.warn(` ${entry}`); + } + + if (problems.length) { + console.error(`\n${problems.length} join problems:`); + for (const problem of problems) console.error(` ${problem}`); + throw new Error('descriptor and REST spec disagree; refusing to emit a reference with unverified cross-links'); + } + + const { renamed } = useProtoFieldNames(joined, types); + console.log(` ${renamed} schema properties renamed to proto field names`); + + // Map each operation to the message its 200 response carries, so the inline + // schemas the validator actually reads get corrected. + const outputByMethod = new Map(); + for (const module of selected) { + for (const service of module.services) { + for (const method of service.methods) { + outputByMethod.set(`${service.fullName}/${method.name}`, method.outputType); + } + } + } + // Measured before the correction runs, so it names what upstream lags on. + // Worth keeping visible: it is the signal that upstream's swagger and its own + // protos have drifted, and it is worth raising there. + const drift = findSchemaDrift(joined, types, outputByMethod); + if (drift.length) { + console.log( + ` ${drift.length} response fields upstream's spec omits, added from the protos:`, + ); + for (const entry of drift.slice(0, 12)) console.log(` ${entry}`); + if (drift.length > 12) console.log(` ... and ${drift.length - 12} more`); + } + + const inline = correctResponseSchemas(joined, types, outputByMethod); + console.log( + ` inline responses: ${inline.marked} nullable, ${inline.strict} strict, ${inline.added} added`, + ); + + // A repaired field the descriptor could not fully describe becomes an open + // object, which conformance accepts unconditionally and the drift check below + // reports nothing about, because the property does exist. Under-describing is + // not a build failure, but it must not be silent. + if (inline.declined.length) { + console.warn(` ${inline.declined.length} repaired fields left under-described:`); + for (const entry of inline.declined) console.warn(` ${entry}`); + } + + // The repair has to close the gap it just reported, or a conformance run + // fails on a response the generator already knew it was not describing. + const remaining = findSchemaDrift(joined, types, outputByMethod); + if (remaining.length) { + throw new Error( + `${remaining.length} response fields still absent after the repair: ${remaining.join(', ')}`, + ); + } + + const { marked } = allowGatewayNulls(joined, types); + const { strict, exempt } = requireDeclaredFields(joined, types); + console.log( + ` ${strict} schemas made strict, ${exempt} exempt for carrying an Any, ` + + `${marked} properties marked nullable`, + ); + + const { dropped } = dropIdenticalPathTemplates(joined); + if (dropped.length) { + console.warn(` dropped ${dropped.length} routes that OpenAPI cannot represent alongside their siblings:`); + for (const routePath of dropped) console.warn(` ${routePath}`); + } + + applyInfo(applyServers(joined), context); + writeFile(path.join(outputRoot, 'rest', 'openapi.yaml'), yaml.dump(joined, { lineWidth: 100, noRefs: true })); + console.log(` ${Object.keys(joined.paths).length} REST paths`); + + const pruned = pruneRemovedModulePages(outputRoot, selected.map((m) => m.name)); + if (pruned.length) console.log(` pruned ${pruned.length} page(s) for modules no longer documented: ${pruned.join(', ')}`); + + updateDocsJson(args.version, selected.map((m) => m.name)); + console.log(`\nWrote ${outputRoot}`); +} + +if (process.argv[1] === fileURLToPath(import.meta.url)) { + main().catch((error) => { + console.error(`\n${error.message}`); + process.exit(1); + }); +} diff --git a/scripts/api-reference/test/fixtures.js b/scripts/api-reference/test/fixtures.js new file mode 100644 index 00000000..1c9fdb79 --- /dev/null +++ b/scripts/api-reference/test/fixtures.js @@ -0,0 +1,245 @@ +// Builders for synthetic FileDescriptorSet fragments. +// +// The tests fabricate upstream instead of downloading it. That keeps them fast +// and offline, and more importantly it lets a test express a change that has not +// happened yet: a module removed, a method added, a new scalar annotation. Those +// are exactly the cases a fixture captured from the real SDK cannot cover. + +/** A field, in the shape buf emits. */ +export function field(name, options = {}) { + const { + type = 'TYPE_STRING', + typeName = null, + repeated = false, + deprecated = false, + scalar = null, + number = 1, + } = options; + + return { + name, + number, + label: repeated ? 'LABEL_REPEATED' : 'LABEL_OPTIONAL', + type, + jsonName: name.replace(/_([a-z])/g, (_, c) => c.toUpperCase()), + ...(typeName ? { typeName: `.${typeName}` } : {}), + options: { + ...(deprecated ? { deprecated: true } : {}), + ...(scalar ? { '[cosmos_proto.scalar]': scalar } : {}), + }, + }; +} + +export function message(name, fields = [], options = {}) { + const { signer = null, aminoName = null } = options; + return { + name, + field: fields, + options: { + ...(signer ? { '[cosmos.msg.v1.signer]': [signer] } : {}), + ...(aminoName ? { '[amino.name]': aminoName } : {}), + }, + }; +} + +export function enumType(name, values) { + return { name, value: values.map((v) => ({ name: v })) }; +} + +export function method(name, inputType, outputType, options = {}) { + const { http = null } = options; + return { + name, + inputType: `.${inputType}`, + outputType: `.${outputType}`, + options: http ? { '[google.api.http]': { [http.verb]: http.path } } : {}, + }; +} + +export function service(name, methods) { + return { name, method: methods }; +} + +export function file({ name, pkg, messages = [], enums = [], services = [] }) { + return { + name, + package: pkg, + messageType: messages, + enumType: enums, + service: services, + sourceCodeInfo: { location: [] }, + }; +} + +export function descriptor(files) { + return { file: files }; +} + +/** + * A miniature but structurally faithful SDK: one module with a Query and a Msg + * service, an enum, a nested type, a deprecated field, and a scalar annotation. + * Tests mutate a copy of this to represent an upstream change. + */ +export function baseDescriptor() { + return descriptor([ + file({ + name: 'cosmos/base/v1beta1/coin.proto', + pkg: 'cosmos.base.v1beta1', + messages: [ + message('Coin', [ + field('denom', { number: 1 }), + field('amount', { number: 2, scalar: 'cosmos.Int' }), + ]), + ], + }), + file({ + name: 'cosmos/bank/v1beta1/query.proto', + pkg: 'cosmos.bank.v1beta1', + messages: [ + message('QueryBalanceRequest', [ + field('address', { number: 1, scalar: 'cosmos.AddressString' }), + field('denom', { number: 2 }), + ]), + message('QueryBalanceResponse', [ + field('balance', { number: 1, type: 'TYPE_MESSAGE', typeName: 'cosmos.base.v1beta1.Coin' }), + ]), + ], + services: [ + service('Query', [ + method( + 'Balance', + 'cosmos.bank.v1beta1.QueryBalanceRequest', + 'cosmos.bank.v1beta1.QueryBalanceResponse', + { http: { verb: 'get', path: '/cosmos/bank/v1beta1/balances/{address}/by_denom' } }, + ), + ]), + ], + }), + file({ + name: 'cosmos/bank/v1beta1/tx.proto', + pkg: 'cosmos.bank.v1beta1', + messages: [ + message( + 'MsgSend', + [ + field('from_address', { number: 1, scalar: 'cosmos.AddressString' }), + field('to_address', { number: 2, scalar: 'cosmos.AddressString' }), + field('amount', { + number: 3, + type: 'TYPE_MESSAGE', + typeName: 'cosmos.base.v1beta1.Coin', + repeated: true, + }), + ], + { signer: 'from_address', aminoName: 'cosmos-sdk/MsgSend' }, + ), + message('MsgSendResponse', []), + ], + services: [ + service('Msg', [ + method('Send', 'cosmos.bank.v1beta1.MsgSend', 'cosmos.bank.v1beta1.MsgSendResponse'), + ]), + ], + }), + ]); +} + +/** A second module, used to represent one being added or removed upstream. */ +export function govModule() { + return [ + file({ + name: 'cosmos/gov/v1/gov.proto', + pkg: 'cosmos.gov.v1', + enums: [ + enumType('VoteOption', [ + 'VOTE_OPTION_UNSPECIFIED', + 'VOTE_OPTION_YES', + 'VOTE_OPTION_NO', + ]), + ], + }), + file({ + name: 'cosmos/gov/v1/tx.proto', + pkg: 'cosmos.gov.v1', + messages: [ + message( + 'MsgVote', + [ + field('proposal_id', { number: 1, type: 'TYPE_UINT64' }), + field('voter', { number: 2, scalar: 'cosmos.AddressString' }), + field('option', { number: 3, type: 'TYPE_ENUM', typeName: 'cosmos.gov.v1.VoteOption' }), + ], + { signer: 'voter', aminoName: 'cosmos-sdk/v1/MsgVote' }, + ), + message('MsgVoteResponse', []), + ], + services: [ + service('Msg', [ + method('Vote', 'cosmos.gov.v1.MsgVote', 'cosmos.gov.v1.MsgVoteResponse'), + ]), + ], + }), + ]; +} + +/** The same gov module at a second package version, to force heading collisions. */ +export function govV1Beta1() { + return [ + file({ + name: 'cosmos/gov/v1beta1/query.proto', + pkg: 'cosmos.gov.v1beta1', + messages: [ + message('QueryProposalsRequest', [field('depositor', { number: 1 })]), + message('QueryProposalsResponse', [field('total', { number: 1, type: 'TYPE_UINT64' })]), + ], + services: [ + service('Query', [ + method( + 'Proposals', + 'cosmos.gov.v1beta1.QueryProposalsRequest', + 'cosmos.gov.v1beta1.QueryProposalsResponse', + { http: { verb: 'get', path: '/cosmos/gov/v1beta1/proposals' } }, + ), + ]), + ], + }), + file({ + name: 'cosmos/gov/v1/query.proto', + pkg: 'cosmos.gov.v1', + messages: [ + message('QueryProposalsRequest', [field('depositor', { number: 1 })]), + message('QueryProposalsResponse', [field('total', { number: 1, type: 'TYPE_UINT64' })]), + ], + services: [ + service('Query', [ + method( + 'Proposals', + 'cosmos.gov.v1.QueryProposalsRequest', + 'cosmos.gov.v1.QueryProposalsResponse', + { http: { verb: 'get', path: '/cosmos/gov/v1/proposals' } }, + ), + ]), + ], + }), + ]; +} + +/** A minimal Swagger 2.0 document matching a set of routes. */ +export function swagger(paths) { + return { + swagger: '2.0', + info: { title: 'test', version: '1.0.0' }, + paths: Object.fromEntries( + Object.entries(paths).map(([route, { verb = 'get', operationId, summary }]) => [ + route, + { + [verb]: { + operationId, + summary, + responses: { 200: { description: 'ok', schema: { type: 'object' } } }, + }, + }, + ]), + ), + }; +} diff --git a/scripts/api-reference/test/generator.test.js b/scripts/api-reference/test/generator.test.js new file mode 100644 index 00000000..600ce83e --- /dev/null +++ b/scripts/api-reference/test/generator.test.js @@ -0,0 +1,609 @@ +// End-to-end tests for the API reference generator. +// +// These run against synthetic descriptors rather than the network, so they are +// fast, offline, and able to describe upstream changes that have not happened: +// a module removed, a method added, a new scalar annotation, a new proto +// version appearing beside an old one. +// +// The encoding cases are regression tests. Every one of them shipped wrong at +// some point and was caught only by calling a real chain: enums as {}, Any as +// {typeUrl,value}, Duration as {seconds,nanos}, bytes as an unparseable +// placeholder. They are cheap to assert and expensive to rediscover. + +import { test, describe } from 'node:test'; +import assert from 'node:assert/strict'; +import fs from 'fs'; +import os from 'os'; +import path from 'path'; + +import { parseDescriptor } from '../lib/descriptor.js'; +import { renderModulePage, buildMethodHeadings } from '../lib/render.js'; +import { buildInventory } from '../lib/inventory.js'; +import { + convertToOpenApi3, + joinSpecToDescriptor, + useProtoFieldNames, + dropIdenticalPathTemplates, +} from '../lib/openapi.js'; +import { + pruneRemovedModulePages, + checkScalarAnnotationsDocumented, + checkWellKnownTypesHandled, + dropFullyDeprecatedModules, +} from '../lib/checks.js'; +import { + baseDescriptor, + govModule, + govV1Beta1, + descriptor, + file, + message, + field, + method, + service, + swagger, +} from './fixtures.js'; + +const CONTEXT = { + repository: 'cosmos/cosmos-sdk', + ref: 'release/v0.55.x', + sha: 'abc123def456abc123def456abc123def456abcd', + displayVersion: 'v0.55', + version: 'latest', +}; + +function render(desc, moduleName) { + const { modules, types } = parseDescriptor(desc); + const module = modules.find((m) => m.name === moduleName); + assert.ok(module, `fixture has no ${moduleName} module`); + return renderModulePage(module, types, CONTEXT, buildMethodHeadings(modules)); +} + +function tempDir() { + return fs.mkdtempSync(path.join(os.tmpdir(), 'api-ref-test-')); +} + +describe('modules appearing and disappearing upstream', () => { + test('a module added upstream is discovered with no code change', () => { + const before = parseDescriptor(baseDescriptor()).modules.map((m) => m.name); + assert.deepEqual(before, ['bank']); + + const after = parseDescriptor( + descriptor([...baseDescriptor().file, ...govModule()]), + ).modules.map((m) => m.name); + assert.deepEqual(after, ['bank', 'gov'], 'new module should appear, alphabetically'); + }); + + test('a module removed upstream has its page deleted from disk', () => { + const dir = tempDir(); + fs.mkdirSync(path.join(dir, 'grpc'), { recursive: true }); + for (const name of ['bank.mdx', 'gov.mdx', 'index.mdx']) { + fs.writeFileSync(path.join(dir, 'grpc', name), 'x'); + } + + const removed = pruneRemovedModulePages(dir, ['bank']); + + assert.deepEqual(removed, ['gov.mdx']); + assert.ok(fs.existsSync(path.join(dir, 'grpc', 'bank.mdx')), 'kept module survives'); + assert.ok(fs.existsSync(path.join(dir, 'grpc', 'index.mdx')), 'hand-written index is exempt'); + assert.ok(!fs.existsSync(path.join(dir, 'grpc', 'gov.mdx')), 'removed module is deleted'); + }); + + test('a method added upstream appears on the page', () => { + const desc = baseDescriptor(); + const queryFile = desc.file.find((f) => f.name === 'cosmos/bank/v1beta1/query.proto'); + queryFile.messageType.push(message('QueryParamsRequest', [])); + queryFile.messageType.push(message('QueryParamsResponse', [])); + queryFile.service[0].method.push( + method( + 'Params', + 'cosmos.bank.v1beta1.QueryParamsRequest', + 'cosmos.bank.v1beta1.QueryParamsResponse', + ), + ); + + const page = render(desc, 'bank'); + assert.match(page, /### Params/); + assert.match(page, /cosmos\.bank\.v1beta1\.Query\/Params/); + }); + + test('a method removed upstream disappears from the page', () => { + const desc = baseDescriptor(); + const txFile = desc.file.find((f) => f.name === 'cosmos/bank/v1beta1/tx.proto'); + txFile.service[0].method = []; + + const page = render(desc, 'bank'); + assert.doesNotMatch(page, /### Send/); + assert.doesNotMatch(page, /## Transaction messages/, 'empty section is omitted entirely'); + }); + + test('a module with only transaction messages renders no Queries section', () => { + const desc = descriptor( + baseDescriptor().file.filter((f) => f.name !== 'cosmos/bank/v1beta1/query.proto'), + ); + const page = render(desc, 'bank'); + assert.doesNotMatch(page, /## Queries/); + assert.match(page, /## Transaction messages/); + }); +}); + +describe('JSON encodings, each a regression found against a live chain', () => { + test('an enum renders as a quoted value, never as an empty object', () => { + const page = render(descriptor([...baseDescriptor().file, ...govModule()]), 'gov'); + assert.match(page, /"option": "VOTE_OPTION_YES"/); + assert.doesNotMatch(page, /"option": \{\}/); + }); + + test('the enum example skips the UNSPECIFIED zero value that handlers reject', () => { + const page = render(descriptor([...baseDescriptor().file, ...govModule()]), 'gov'); + assert.doesNotMatch(page, /"option": "VOTE_OPTION_UNSPECIFIED"/); + }); + + test('an enum is documented in Types with all of its values', () => { + const page = render(descriptor([...baseDescriptor().file, ...govModule()]), 'gov'); + assert.match(page, /### cosmos\.gov\.v1\.VoteOption/); + assert.match(page, /VOTE_OPTION_YES/); + assert.match(page, /Zero value\. Handlers reject it\./); + }); + + test('Any is inlined with @type, not expanded to typeUrl and value', () => { + const desc = baseDescriptor(); + const txFile = desc.file.find((f) => f.name === 'cosmos/bank/v1beta1/tx.proto'); + txFile.messageType[0].field.push( + field('extra', { number: 4, type: 'TYPE_MESSAGE', typeName: 'google.protobuf.Any' }), + ); + + const page = render(desc, 'bank'); + assert.match(page, /"@type": "\/cosmos\.example\.v1\.MsgExample"/); + assert.doesNotMatch(page, /"type_url"/); + }); + + test('Duration renders as a string, not as seconds and nanos', () => { + const desc = baseDescriptor(); + const txFile = desc.file.find((f) => f.name === 'cosmos/bank/v1beta1/tx.proto'); + txFile.messageType[0].field.push( + field('period', { number: 4, type: 'TYPE_MESSAGE', typeName: 'google.protobuf.Duration' }), + ); + + const page = render(desc, 'bank'); + assert.match(page, /"period": "0s"/); + assert.doesNotMatch(page, /"nanos"/); + }); + + test('bytes renders as valid base64, since a placeholder fails to decode', () => { + const desc = baseDescriptor(); + const queryFile = desc.file.find((f) => f.name === 'cosmos/bank/v1beta1/query.proto'); + queryFile.messageType[0].field.push(field('key', { number: 3, type: 'TYPE_BYTES' })); + + const page = render(desc, 'bank'); + // Compact in the grpcurl payload, spaced in the pretty-printed transaction + // JSON. Either way it must be valid base64, and the empty string is. + assert.match(page, /"key": ?""/); + assert.doesNotMatch(page, /<bytes>/); + }); + + test('64-bit integers render as quoted strings', () => { + const page = render(descriptor([...baseDescriptor().file, ...govModule()]), 'gov'); + assert.match(page, /"proposal_id": "\d+"/, 'uint64 is a string in protobuf JSON'); + }); + + test('64-bit integer examples avoid zero, which many handlers reject', () => { + // proposal_id 0 and height 0 are legal in the type system and errors on + // chain, and they were the values the page's own examples used. + const page = render(descriptor([...baseDescriptor().file, ...govModule()]), 'gov'); + assert.doesNotMatch(page, /"proposal_id": "0"/); + }); + + test('a cosmos.Dec names which of its three wire forms a field uses', () => { + const desc = baseDescriptor(); + const coin = desc.file.find((f) => f.name === 'cosmos/base/v1beta1/coin.proto'); + coin.messageType.push( + message('DecPair', [ + { ...field('scaled', { number: 1, scalar: 'cosmos.Dec' }), + options: { '[cosmos_proto.scalar]': 'cosmos.Dec', + '[gogoproto.customtype]': 'cosmossdk.io/math.LegacyDec' } }, + field('formatted', { number: 2, scalar: 'cosmos.Dec' }), + ]), + ); + const queryFile = desc.file.find((f) => f.name === 'cosmos/bank/v1beta1/query.proto'); + queryFile.messageType[1].field.push( + field('pair', { number: 2, type: 'TYPE_MESSAGE', typeName: 'cosmos.base.v1beta1.DecPair' }), + ); + + const page = render(desc, 'bank'); + assert.match(page, /`scaled`.*integer string scaled by 10\^18/); + assert.match(page, /`formatted`.*a decimal string/); + }); + + test('example keys use proto field names, matching the field tables', () => { + const page = render(baseDescriptor(), 'bank'); + assert.match(page, /"from_address"/); + assert.doesNotMatch(page, /"fromAddress"/); + }); + + test('only one member of a oneof appears in an example', () => { + // A message with several oneof members set is rejected by the parser with + // "should not have multiple oneof fields", so such an example can never work. + const desc = baseDescriptor(); + const coin = desc.file.find((f) => f.name === 'cosmos/base/v1beta1/coin.proto'); + coin.messageType.push({ + name: 'Choice', + field: [ + { ...field('first', { number: 1 }), oneofIndex: 0 }, + { ...field('second', { number: 2 }), oneofIndex: 0 }, + field('always', { number: 3 }), + ], + oneofDecl: [{ name: 'kind' }], + options: {}, + }); + const queryFile = desc.file.find((f) => f.name === 'cosmos/bank/v1beta1/query.proto'); + queryFile.messageType[0].field.push( + field('choice', { number: 5, type: 'TYPE_MESSAGE', typeName: 'cosmos.base.v1beta1.Choice' }), + ); + + const page = render(desc, 'bank'); + const example = page.match(/grpcurl -plaintext -d '(\{.*?\})'/s)[1]; + assert.match(example, /"first"/); + assert.doesNotMatch(example, /"second"/, 'a second oneof member must not be set'); + assert.match(example, /"always"/, 'fields outside the oneof are unaffected'); + }); + + test('a deprecated field is documented but kept out of runnable examples', () => { + const desc = baseDescriptor(); + const queryFile = desc.file.find((f) => f.name === 'cosmos/bank/v1beta1/query.proto'); + queryFile.messageType[0].field.push(field('old_id', { number: 9, deprecated: true })); + + const page = render(desc, 'bank'); + assert.match(page, /`old_id`/, 'still in the field table'); + assert.doesNotMatch(page, /"old_id"/, 'omitted from the example payload'); + }); +}); + +describe('queries and transaction messages are presented differently', () => { + test('a query gets a grpcurl example', () => { + const page = render(baseDescriptor(), 'bank'); + const queries = page.slice(page.indexOf('## Queries'), page.indexOf('## Transaction messages')); + assert.match(queries, /grpcurl/); + }); + + test('a transaction message gets no grpcurl example', () => { + const page = render(baseDescriptor(), 'bank'); + const txs = page.slice(page.indexOf('## Transaction messages'), page.indexOf('## Types')); + assert.doesNotMatch(txs, /grpcurl/, 'Msg is not served by the gRPC query router'); + assert.match(txs, /Type URL/); + }); + + test('the signer is shown, and authority carries the governance warning', () => { + const desc = baseDescriptor(); + const txFile = desc.file.find((f) => f.name === 'cosmos/bank/v1beta1/tx.proto'); + txFile.messageType[0].options['[cosmos.msg.v1.signer]'] = ['authority']; + + const page = render(desc, 'bank'); + assert.match(page, /\| Signer \| `authority` \|/); + assert.match(page, /only through a passed governance proposal/); + }); + + test('a message with no amino name says so rather than omitting the row', () => { + const desc = baseDescriptor(); + const txFile = desc.file.find((f) => f.name === 'cosmos/bank/v1beta1/tx.proto'); + delete txFile.messageType[0].options['[amino.name]']; + + const page = render(desc, 'bank'); + // The row must still appear, so absence is unambiguous. It must not claim + // the message cannot be Amino-signed: that was disproved on chain, where two + // such messages signed with --sign-mode amino-json and executed with code 0. + assert.match(page, /\| Amino name \| none registered \|/); + assert.doesNotMatch(page, /cannot be signed/); + }); +}); + +describe('headings stay unique as upstream adds proto versions', () => { + test('a single version needs no qualification', () => { + const headings = buildMethodHeadings(parseDescriptor(baseDescriptor()).modules); + assert.equal(headings.get('cosmos.bank.v1beta1.Query/Balance').label, 'Balance'); + }); + + test('two package versions of one module are disambiguated', () => { + const { modules } = parseDescriptor(descriptor([...baseDescriptor().file, ...govV1Beta1()])); + const headings = buildMethodHeadings(modules); + + assert.equal(headings.get('cosmos.gov.v1.Query/Proposals').label, 'Proposals (v1)'); + assert.equal(headings.get('cosmos.gov.v1beta1.Query/Proposals').label, 'Proposals (v1beta1)'); + }); + + test('a name colliding across services in one version also gets the service', () => { + const files = [...baseDescriptor().file, ...govV1Beta1()]; + // gov v1 gains a Msg service with a method named like its query. + files.push( + file({ + name: 'cosmos/gov/v1/tx2.proto', + pkg: 'cosmos.gov.v1', + messages: [message('MsgProposals', []), message('MsgProposalsResponse', [])], + services: [ + service('Msg', [ + method('Proposals', 'cosmos.gov.v1.MsgProposals', 'cosmos.gov.v1.MsgProposalsResponse'), + ]), + ], + }), + ); + + const headings = buildMethodHeadings(parseDescriptor(descriptor(files)).modules); + assert.equal(headings.get('cosmos.gov.v1.Query/Proposals').label, 'Proposals (Query, v1)'); + assert.equal(headings.get('cosmos.gov.v1.Msg/Proposals').label, 'Proposals (Msg, v1)'); + }); + + test('every heading on a page is unique, so no anchor is ambiguous', () => { + const page = render(descriptor([...baseDescriptor().file, ...govV1Beta1()]), 'gov'); + const headings = [...page.matchAll(/^### (.+)$/gm)].map((m) => m[1]); + assert.equal(new Set(headings).size, headings.length, `duplicate heading in: ${headings}`); + }); +}); + +describe('the join between the descriptor and upstream REST spec', () => { + const grpcPagePath = '/sdk/latest/api-reference/grpc'; + + async function join(desc, spec) { + const { modules } = parseDescriptor(desc); + const converted = await convertToOpenApi3(spec); + return joinSpecToDescriptor(converted, modules, { + grpcPagePath, + headings: buildMethodHeadings(modules), + }); + } + + test('a REST operation with no descriptor method is a hard failure', async () => { + const spec = swagger({ + '/cosmos/bank/v1beta1/balances/{address}/by_denom': { operationId: 'Balance' }, + '/cosmos/bank/v1beta1/invented': { operationId: 'Invented' }, + }); + const { problems } = await join(baseDescriptor(), spec); + assert.ok( + problems.some((p) => p.includes('/cosmos/bank/v1beta1/invented')), + 'an unexplained route must stop the build', + ); + }); + + test('an annotated method absent from the REST spec warns but does not fail', async () => { + const spec = swagger({}); + const { problems, unrepresented } = await join(baseDescriptor(), spec); + assert.deepEqual(problems, [], 'upstream omitting a module is not a disagreement'); + assert.ok(unrepresented.some((u) => u.includes('Query/Balance'))); + }); + + test('operation ids are derived, so upstream duplicates cannot collide pages', async () => { + // Upstream really does assign one id to two different gov routes. + const spec = swagger({ + '/cosmos/gov/v1/proposals': { operationId: 'GovV1Proposal' }, + '/cosmos/gov/v1beta1/proposals': { operationId: 'GovV1Proposal' }, + }); + const { spec: joined, problems } = await join( + descriptor([...baseDescriptor().file, ...govV1Beta1()]), + spec, + ); + + assert.deepEqual(problems, [], 'derived ids should resolve upstream collision'); + const ids = Object.values(joined.paths).map((p) => p.get.operationId); + assert.equal(new Set(ids).size, ids.length, `ids still collide: ${ids}`); + }); + + test('path parameter naming differences do not break the join', async () => { + // The annotation says {address}; protoc-gen-openapiv2 may emit the JSON name. + const spec = swagger({ + '/cosmos/bank/v1beta1/balances/{address}/by_denom': { operationId: 'Balance' }, + }); + const { problems } = await join(baseDescriptor(), spec); + assert.deepEqual(problems, []); + }); + + test('each REST operation links to its gRPC method by a real anchor', async () => { + const desc = descriptor([...baseDescriptor().file, ...govV1Beta1()]); + const spec = swagger({ + '/cosmos/gov/v1beta1/proposals': { operationId: 'Proposals' }, + }); + const { spec: joined } = await join(desc, spec); + + const description = joined.paths['/cosmos/gov/v1beta1/proposals'].get.description; + const anchor = description.match(/#([a-z0-9-]+)\)/)[1]; + + const page = render(desc, 'gov'); + const anchors = [...page.matchAll(/^### (.+)$/gm)].map((m) => + m[1].toLowerCase().replace(/[(),]/g, '').trim().replace(/\s+/g, '-'), + ); + assert.ok(anchors.includes(anchor), `${anchor} is not a heading on the gov page`); + }); + + test('schema properties are renamed to the names the gateway actually emits', () => { + const { types } = parseDescriptor(baseDescriptor()); + const spec = { + components: { + schemas: { + 'cosmos.bank.v1beta1.MsgSend': { + properties: { fromAddress: {}, toAddress: {}, amount: {} }, + required: ['fromAddress'], + }, + }, + }, + paths: {}, + }; + + const { renamed } = useProtoFieldNames(spec, types); + const schema = spec.components.schemas['cosmos.bank.v1beta1.MsgSend']; + + assert.equal(renamed, 2); + assert.deepEqual(Object.keys(schema.properties), ['from_address', 'to_address', 'amount']); + assert.deepEqual(schema.required, ['from_address']); + }); + + test('paths differing only by parameter name are reduced to one', () => { + const spec = { + paths: { + '/cosmos/auth/v1beta1/bech32/{addressBytes}': { get: {} }, + '/cosmos/auth/v1beta1/bech32/{addressString}': { get: {} }, + '/cosmos/auth/v1beta1/accounts': { get: {} }, + }, + }; + const { dropped } = dropIdenticalPathTemplates(spec); + + assert.equal(dropped.length, 1, 'OpenAPI forbids both templates in one document'); + assert.equal(Object.keys(spec.paths).length, 2); + }); +}); + +describe('guards over the hand-written half', () => { + test('a new scalar annotation upstream stops the build and names it', () => { + const desc = baseDescriptor(); + const queryFile = desc.file.find((f) => f.name === 'cosmos/bank/v1beta1/query.proto'); + queryFile.messageType[0].field.push( + field('novel', { number: 8, scalar: 'cosmos.SomethingNew' }), + ); + const { types } = parseDescriptor(desc); + + const dir = tempDir(); + fs.mkdirSync(path.join(dir, 'grpc'), { recursive: true }); + fs.writeFileSync( + path.join(dir, 'grpc', 'index.mdx'), + '| `cosmos.Int` | ... |\n| `cosmos.AddressString` | ... |\n', + ); + + assert.throws( + () => checkScalarAnnotationsDocumented(types, dir), + /cosmos\.SomethingNew/, + 'an undefined encoding must fail loudly', + ); + }); + + test('the guard names a field using the annotation, so it can be looked up', () => { + const desc = baseDescriptor(); + const { types } = parseDescriptor(desc); + const dir = tempDir(); + fs.mkdirSync(path.join(dir, 'grpc'), { recursive: true }); + fs.writeFileSync(path.join(dir, 'grpc', 'index.mdx'), 'nothing documented here'); + + assert.throws(() => checkScalarAnnotationsDocumented(types, dir), /used by cosmos\./); + }); + + test('the guard passes when every annotation is documented', () => { + const { types } = parseDescriptor(baseDescriptor()); + const dir = tempDir(); + fs.mkdirSync(path.join(dir, 'grpc'), { recursive: true }); + fs.writeFileSync( + path.join(dir, 'grpc', 'index.mdx'), + '| `cosmos.Int` | ... |\n| `cosmos.AddressString` | ... |\n', + ); + + assert.deepEqual( + checkScalarAnnotationsDocumented(types, dir).sort(), + ['cosmos.AddressString', 'cosmos.Int'], + ); + }); + + test('an unhandled specification-defined JSON type stops the build', () => { + const desc = baseDescriptor(); + const queryFile = desc.file.find((f) => f.name === 'cosmos/bank/v1beta1/query.proto'); + queryFile.messageType[0].field.push( + field('mask', { number: 7, type: 'TYPE_MESSAGE', typeName: 'google.protobuf.FieldMask' }), + ); + const { types } = parseDescriptor(desc); + + // FieldMask is handled, so this must pass. + assert.doesNotThrow(() => checkWellKnownTypesHandled(types)); + }); + + test('an ordinary google.protobuf message is not treated as special', () => { + const desc = baseDescriptor(); + const queryFile = desc.file.find((f) => f.name === 'cosmos/bank/v1beta1/query.proto'); + queryFile.messageType[0].field.push( + field('descriptor', { + number: 6, + type: 'TYPE_MESSAGE', + typeName: 'google.protobuf.DescriptorProto', + }), + ); + const { types } = parseDescriptor(desc); + + assert.doesNotThrow( + () => checkWellKnownTypesHandled(types), + 'DescriptorProto expands correctly and must not trip the guard', + ); + }); +}); + +describe('output stability', () => { + test('rendering twice from one descriptor is byte-identical', () => { + const desc = descriptor([...baseDescriptor().file, ...govModule()]); + assert.equal(render(desc, 'bank'), render(desc, 'bank')); + assert.equal(render(desc, 'gov'), render(desc, 'gov')); + }); + + test('the page records the commit it was generated from', () => { + const page = render(baseDescriptor(), 'bank'); + assert.match(page, /abc123def456/, 'the resolved SHA must be on the page'); + assert.match(page, /release\/v0\.55\.x/); + assert.doesNotMatch(page, /\d{4}-\d{2}-\d{2}T/, 'no timestamp: it would churn every run'); + }); + + test('modules and their methods come out in a stable order', () => { + const shuffled = descriptor([...govModule(), ...baseDescriptor().file]); + assert.deepEqual( + parseDescriptor(shuffled).modules.map((m) => m.name), + ['bank', 'gov'], + 'ordering must not depend on descriptor file order', + ); + }); +}); + +describe('inventory', () => { + test('lists every query method and transaction message, sorted', () => { + const { modules } = parseDescriptor(descriptor([...baseDescriptor().file, ...govModule()])); + const inventory = buildInventory(modules); + + assert.ok(inventory.queries.includes('cosmos.bank.v1beta1.Query/Balance')); + assert.ok(inventory.messages.includes('cosmos.gov.v1.MsgVote')); + assert.deepEqual(inventory.queries, [...inventory.queries].sort()); + assert.deepEqual(inventory.messages, [...inventory.messages].sort()); + }); + + test('a method added upstream appears without any other edit', () => { + const { modules } = parseDescriptor(descriptor([...baseDescriptor().file, ...govModule()])); + const before = buildInventory(modules).messages.length; + + const service = modules + .find((m) => m.name === 'gov').services + .find((s) => s.fullName === 'cosmos.gov.v1.Msg'); + service.methods.push({ name: 'Deposit', inputType: 'cosmos.gov.v1.MsgDeposit', outputType: 'cosmos.gov.v1.MsgDepositResponse' }); + + assert.equal(buildInventory(modules).messages.length, before + 1); + }); +}); + +describe('fully deprecated modules', () => { + const moduleWith = (name, methods) => ({ name, services: [{ methods }] }); + + test('drops a module whose every method is deprecated', () => { + const { kept, dropped } = dropFullyDeprecatedModules([ + moduleWith('app', [{ name: 'Config', deprecated: true }]), + ]); + assert.deepEqual(dropped, ['app']); + assert.equal(kept.length, 0); + }); + + test('keeps a module with a deprecated method beside a live one', () => { + const { kept, dropped } = dropFullyDeprecatedModules([ + moduleWith('upgrade', [ + { name: 'UpgradedConsensusState', deprecated: true }, + { name: 'CurrentPlan' }, + ]), + ]); + assert.deepEqual(dropped, []); + assert.equal(kept[0].services[0].methods.length, 2); + }); + + // A module defining only types has no methods, so "every method is + // deprecated" is vacuously true. Dropping it would delete a page for a + // reason that does not apply. + test('keeps a module that defines no methods at all', () => { + const { kept, dropped } = dropFullyDeprecatedModules([moduleWith('typesonly', [])]); + assert.deepEqual(dropped, []); + assert.equal(kept.length, 1); + }); +}); diff --git a/scripts/api-reference/test/golden/query-findings.json b/scripts/api-reference/test/golden/query-findings.json new file mode 100644 index 00000000..6f88a72c --- /dev/null +++ b/scripts/api-reference/test/golden/query-findings.json @@ -0,0 +1,28 @@ +{ + "version": "next", + "repository": "cosmos/cosmos-sdk", + "ref": "release/v0.54.x", + "sha": "2086680", + "runner": "query-onchain", + "totals": { + "pass": 80, + "environmental": 25, + "known": 18, + "findings": 1 + }, + "findings": [ + { + "page": "bank.mdx", + "anchor": "#balance", + "method": "cosmos.bank.v1beta1.Query/Balance", + "claim": "Encoded as cosmos.AddressString.", + "sent": { + "address": "cosmos1abc", + "denom": "stake" + }, + "response": "rpc error: code = InvalidArgument", + "verdict": "page-defect", + "manifest_entry": null + } + ] +} diff --git a/scripts/api-reference/test/schema-repair.test.js b/scripts/api-reference/test/schema-repair.test.js new file mode 100644 index 00000000..47241532 --- /dev/null +++ b/scripts/api-reference/test/schema-repair.test.js @@ -0,0 +1,316 @@ +// Tests for the repair of response fields upstream's spec omits. +// +// Upstream's gateway swagger is generated separately from the protos and lags +// them, so the generator adds a field the descriptor defines and the spec does +// not. That runs against every response schema in a 47,000-line published +// document, and a wrong shape there is a wrong shape for every client generated +// from it, so each proto type class is pinned here rather than left to one +// end-to-end conformance run. +// +// The shapes asserted are the ones upstream itself emits for the same types +// elsewhere in this document: 64-bit integers as strings, 32-bit as integers, +// unsigned 32-bit widened because it does not fit an int32, bytes base64, +// enums as their value names. + +import { test, describe } from 'node:test'; +import assert from 'node:assert/strict'; + +import { + schemaForField, + correctResponseSchemas, + findSchemaDrift, +} from '../lib/openapi.js'; + +function field(overrides) { + return { + name: 'f', repeated: false, type: null, typeName: null, comment: '', ...overrides, + }; +} + +function message(fullName, fields, extra = {}) { + return { fullName, name: fullName.split('.').pop(), fields, isMapEntry: false, ...extra }; +} + +const COIN = message('cosmos.base.v1beta1.Coin', [ + field({ name: 'denom', type: 'string' }), + field({ name: 'amount', type: 'string' }), +]); + +// map<string, string>: a repeated synthetic entry message, which is how the +// descriptor represents every map. +const STRING_MAP_ENTRY = message('cosmos.demo.v1.Thing.LabelsEntry', [ + field({ name: 'key', type: 'string' }), + field({ name: 'value', type: 'string' }), +], { isMapEntry: true }); + +const BOND_STATUS = { + fullName: 'cosmos.staking.v1beta1.BondStatus', + values: [ + { name: 'BOND_STATUS_UNSPECIFIED' }, + { name: 'BOND_STATUS_UNBONDED' }, + { name: 'BOND_STATUS_BONDED' }, + ], +}; + +const types = { + messages: new Map([ + [COIN.fullName, COIN], + [STRING_MAP_ENTRY.fullName, STRING_MAP_ENTRY], + ]), + enums: new Map([[BOND_STATUS.fullName, BOND_STATUS]]), +}; + +function shapeOf(overrides) { + const declined = []; + const schema = schemaForField(field(overrides), types, declined, 'p'); + return { schema, declined }; +} + +describe('schemaForField: scalars', () => { + const cases = [ + ['int64 is a string, because JSON numbers lose precision past 2^53', + 'int64', { type: 'string', format: 'int64' }], + ['uint64 likewise', 'uint64', { type: 'string', format: 'uint64' }], + ['sfixed64 is an int64 in the same encoding', 'sfixed64', { type: 'string', format: 'int64' }], + ['int32 fits a JSON number', 'int32', { type: 'integer', format: 'int32' }], + ['uint32 is widened: it does not fit an int32', 'uint32', { type: 'integer', format: 'int64' }], + ['fixed32 is widened for the same reason', 'fixed32', { type: 'integer', format: 'int64' }], + ['bytes is base64', 'bytes', { type: 'string', format: 'byte' }], + ['bool', 'bool', { type: 'boolean' }], + ['string', 'string', { type: 'string' }], + ['double', 'double', { type: 'number', format: 'double' }], + ]; + + for (const [name, type, expected] of cases) { + test(name, () => { + const { schema, declined } = shapeOf({ type }); + assert.deepEqual(schema, expected); + assert.deepEqual(declined, []); + }); + } +}); + +describe('schemaForField: named types', () => { + test('an enum lists its value names and defaults to the unspecified one', () => { + const { schema, declined } = shapeOf({ typeName: BOND_STATUS.fullName }); + assert.deepEqual(schema, { + type: 'string', + enum: ['BOND_STATUS_UNSPECIFIED', 'BOND_STATUS_UNBONDED', 'BOND_STATUS_BONDED'], + default: 'BOND_STATUS_UNSPECIFIED', + }); + assert.deepEqual(declined, []); + }); + + test('a nested message is an empty shell the recursion fills', () => { + const { schema } = shapeOf({ typeName: COIN.fullName }); + assert.deepEqual(schema, { type: 'object', properties: {} }); + }); + + test('a Timestamp is a date-time string, not its proto fields', () => { + const { schema } = shapeOf({ typeName: 'google.protobuf.Timestamp' }); + assert.deepEqual(schema, { type: 'string', format: 'date-time' }); + }); + + test('an Any stays open: it is inlined with @type', () => { + const { schema } = shapeOf({ typeName: 'google.protobuf.Any' }); + assert.deepEqual(schema, { type: 'object', properties: { '@type': { type: 'string' } } }); + assert.equal(schema.additionalProperties, undefined); + }); +}); + +describe('schemaForField: repetition', () => { + test('a repeated scalar is an array of that scalar', () => { + const { schema } = shapeOf({ repeated: true, type: 'string' }); + assert.deepEqual(schema, { type: 'array', items: { type: 'string' } }); + }); + + test('a repeated message is an array of shells', () => { + const { schema } = shapeOf({ repeated: true, typeName: COIN.fullName }); + assert.deepEqual(schema, { type: 'array', items: { type: 'object', properties: {} } }); + }); + + test("a map is an object, not an array of the descriptor's synthetic entries", () => { + // The descriptor marks a map field LABEL_REPEATED, so anything that trusts + // `repeated` alone emits an array of {key, value} pairs for what JSON + // renders as a plain object. + const { schema, declined } = shapeOf({ + name: 'labels', repeated: true, typeName: STRING_MAP_ENTRY.fullName, + }); + assert.equal(schema.type, 'object'); + assert.notEqual(schema.type, 'array'); + assert.deepEqual(schema.additionalProperties, { type: 'string' }); + assert.deepEqual(declined, []); + }); + + test('a map of messages keys onto the value shell', () => { + const entry = message('cosmos.demo.v1.Thing.CoinsEntry', [ + field({ name: 'key', type: 'string' }), + field({ name: 'value', typeName: COIN.fullName }), + ], { isMapEntry: true }); + const local = { messages: new Map([...types.messages, [entry.fullName, entry]]), enums: types.enums }; + const schema = schemaForField( + field({ name: 'coins', repeated: true, typeName: entry.fullName }), local, [], 'p', + ); + assert.deepEqual(schema, { + type: 'object', + additionalProperties: { type: 'object', properties: {} }, + }); + }); + + test("a description goes on the array, not on its items, as upstream writes it", () => { + const { schema } = shapeOf({ repeated: true, type: 'string', comment: ' what it holds. ' }); + assert.equal(schema.description, 'what it holds.'); + assert.equal(schema.items.description, undefined); + }); +}); + +describe('schemaForField: what it declines to describe', () => { + test('a type with no precedent is left open and said so', () => { + const { schema, declined } = shapeOf({ name: 'x', typeName: 'some.unknown.Type' }); + assert.deepEqual(schema, { type: 'object' }); + assert.equal(declined.length, 1); + assert.match(declined[0], /some\.unknown\.Type/); + assert.match(declined[0], /open object/); + }); + + test('an unrecognised scalar falls back to a string and is reported', () => { + const { schema, declined } = shapeOf({ type: 'quaternion' }); + assert.deepEqual(schema, { type: 'string' }); + assert.equal(declined.length, 1); + assert.match(declined[0], /quaternion/); + }); + + test('a field that is neither scalar nor named is reported', () => { + const { declined } = shapeOf({}); + assert.equal(declined.length, 1); + }); + + test('a well-described field reports nothing', () => { + assert.deepEqual(shapeOf({ type: 'uint64' }).declined, []); + assert.deepEqual(shapeOf({ typeName: COIN.fullName }).declined, []); + }); +}); + +// A miniature of the real thing: upstream's spec describes one field of a +// two-field response, exactly the v0.55 case that made the gate unpassable. +function fixture() { + const params = message('cosmos.demo.v1.Params', [ + field({ name: 'known', type: 'string' }), + field({ name: 'added_upstream', type: 'uint64' }), + field({ name: 'fee', typeName: COIN.fullName, comment: 'the fee.' }), + ]); + const response = message('cosmos.demo.v1.QueryParamsResponse', [ + field({ name: 'params', typeName: params.fullName }), + ]); + const local = { + messages: new Map([...types.messages, [params.fullName, params], [response.fullName, response]]), + enums: types.enums, + }; + const spec = { + paths: { + '/cosmos/demo/v1/params': { + get: { + 'x-grpc-method': 'cosmos.demo.v1.Query/Params', + responses: { + 200: { + content: { + '*/*': { + schema: { + type: 'object', + properties: { + params: { type: 'object', properties: { known: { type: 'string' } } }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }; + const byOperation = new Map([['cosmos.demo.v1.Query/Params', response.fullName]]); + return { spec, types: local, byOperation }; +} + +describe('correctResponseSchemas repairs what upstream omits', () => { + test('a field the protos define and the spec omits is added', () => { + const { spec, types: local, byOperation } = fixture(); + const result = correctResponseSchemas(spec, local, byOperation); + const params = spec.paths['/cosmos/demo/v1/params'].get + .responses[200].content['*/*'].schema.properties.params; + + assert.deepEqual(params.properties.added_upstream, { type: 'string', format: 'uint64' }); + assert.equal(params.properties.fee.type, 'object'); + assert.deepEqual(params.properties.fee.properties.denom, { type: 'string' }); + assert.equal(params.properties.fee.nullable, true); + assert.equal(params.properties.fee.additionalProperties, false); + // added_upstream, fee, and the two fields of the Coin the recursion filled. + assert.equal(result.added, 4); + assert.deepEqual(result.declined, []); + }); + + test('a field upstream did describe is left as upstream wrote it', () => { + const { spec, types: local, byOperation } = fixture(); + correctResponseSchemas(spec, local, byOperation); + const params = spec.paths['/cosmos/demo/v1/params'].get + .responses[200].content['*/*'].schema.properties.params; + assert.deepEqual(params.properties.known, { type: 'string' }); + }); + + test('the drift the repair was for is gone afterwards', () => { + const { spec, types: local, byOperation } = fixture(); + assert.equal(findSchemaDrift(spec, local, byOperation).length, 2); + correctResponseSchemas(spec, local, byOperation); + assert.deepEqual(findSchemaDrift(spec, local, byOperation), []); + }); + + test('an Any is never expanded into type_url and value', () => { + const any = message('google.protobuf.Any', [ + field({ name: 'type_url', type: 'string' }), + field({ name: 'value', type: 'bytes' }), + ]); + const response = message('cosmos.demo.v1.Wrapped', [ + field({ name: 'content', typeName: 'google.protobuf.Any' }), + ]); + const local = { + messages: new Map([[any.fullName, any], [response.fullName, response]]), + enums: new Map(), + }; + const schema = { + type: 'object', + properties: { content: { type: 'object', properties: { '@type': { type: 'string' } } } }, + }; + const spec = { + paths: { + '/x': { + get: { + 'x-grpc-method': 'm', + responses: { 200: { content: { '*/*': { schema } } } }, + }, + }, + }, + }; + correctResponseSchemas(spec, local, new Map([['m', response.fullName]])); + assert.deepEqual(Object.keys(schema.properties.content.properties), ['@type']); + // A message carrying an Any must stay open: the concrete type's own fields + // are inlined beside @type. + assert.equal(schema.additionalProperties, undefined); + }); + + test('a field it could not describe is reported rather than left silent', () => { + const response = message('cosmos.demo.v1.Odd', [ + field({ name: 'mystery', typeName: 'not.in.The Descriptor' }), + ]); + const local = { messages: new Map([[response.fullName, response]]), enums: new Map() }; + const schema = { type: 'object', properties: {} }; + const spec = { + paths: { + '/x': { get: { 'x-grpc-method': 'm', responses: { 200: { content: { '*/*': { schema } } } } } }, + }, + }; + const result = correctResponseSchemas(spec, local, new Map([['m', response.fullName]])); + assert.equal(result.declined.length, 1); + assert.match(result.declined[0], /cosmos\.demo\.v1\.Odd\.mystery/); + }); +}); diff --git a/scripts/api-reference/test/test_findings.py b/scripts/api-reference/test/test_findings.py new file mode 100644 index 00000000..84824fe9 --- /dev/null +++ b/scripts/api-reference/test/test_findings.py @@ -0,0 +1,142 @@ +"""Tests for the findings document.""" + +import json +import tempfile +import unittest +from pathlib import Path + +import findings + + +def one(**overrides) -> findings.Finding: + defaults = dict( + page="bank.mdx", + anchor="#balance", + method="cosmos.bank.v1beta1.Query/Balance", + claim="Encoded as cosmos.AddressString.", + sent={"address": "cosmos1abc", "denom": "stake"}, + response="rpc error: code = InvalidArgument", + verdict="page-defect", + manifest_entry=None, + ) + return findings.Finding(**{**defaults, **overrides}) + + +class Document(unittest.TestCase): + def test_carries_the_run_identity_so_a_finding_can_be_reproduced(self): + document = findings.document("next", "cosmos/cosmos-sdk", "release/v0.54.x", "2086680", + "query-onchain", {"pass": 80}, [one()]) + self.assertEqual(document["version"], "next") + self.assertEqual(document["repository"], "cosmos/cosmos-sdk") + self.assertEqual(document["ref"], "release/v0.54.x") + self.assertEqual(document["sha"], "2086680") + self.assertEqual(document["runner"], "query-onchain") + + def test_totals_count_the_findings_it_actually_carries(self): + document = findings.document("next", "cosmos/cosmos-sdk", "main", "abc", + "query-onchain", {"pass": 80}, [one(), one(method="x")]) + self.assertEqual(document["totals"]["findings"], 2) + + def test_rejects_a_verdict_outside_the_schema(self): + with self.assertRaises(ValueError): + findings.document("next", "cosmos/cosmos-sdk", "main", "abc", "query-onchain", + {}, [one(verdict="bad")]) + + def test_round_trips_through_json(self): + document = findings.document("next", "cosmos/cosmos-sdk", "main", "abc", + "query-onchain", {}, [one()]) + path = Path(tempfile.mkdtemp()) / "findings.json" + findings.write(path, document) + self.assertEqual(json.loads(path.read_text()), document) + + def test_matches_the_golden_document(self): + document = findings.document("next", "cosmos/cosmos-sdk", "release/v0.54.x", "2086680", + "query-onchain", {"pass": 80, "environmental": 25, "known": 18}, + [one()]) + golden = json.loads((Path(__file__).parent / "golden" / "query-findings.json").read_text()) + self.assertEqual(document, golden) + + +class StaleManifestEntry(unittest.TestCase): + """The verdict for manifest rot, which no other test reaches. + + Both runners emit it from branches that only fire against a live chain, so + without this the schema could reject the verdict and nothing offline would + notice until a release run. + """ + + def test_the_document_accepts_it_and_counts_it_as_a_finding(self): + stale = one( + page="query-coverage.toml", + anchor="", + claim="no stated form for denom", + sent=None, + response="the manifest names a method the pages no longer document; " + "delete the entry", + verdict="stale-manifest-entry", + manifest_entry="cosmos.bank.v1beta1.Query/Balance", + ) + document = findings.document("next", "cosmos/cosmos-sdk", "main", "abc", + "query-onchain", {"pass": 80}, [stale]) + self.assertEqual(document["totals"]["findings"], 1) + self.assertEqual(document["findings"][0]["verdict"], "stale-manifest-entry") + + def test_it_survives_a_round_trip_to_disk(self): + document = findings.document("next", "cosmos/cosmos-sdk", "main", "abc", + "tx-onchain", {"success": 40}, + [one(verdict="stale-manifest-entry")]) + path = Path(tempfile.mkdtemp()) / "findings.json" + findings.write(path, document) + self.assertEqual(json.loads(path.read_text()), document) + + def test_render_names_the_verdict_so_a_reader_sees_why_the_run_failed(self): + text = findings.render(findings.document( + "next", "cosmos/cosmos-sdk", "main", "abc", "tx-onchain", {}, + [one(verdict="stale-manifest-entry")])) + self.assertIn("stale-manifest-entry", text) + + +class ClaimFor(unittest.TestCase): + """A page-defect finding has to carry what the page told the reader. + + Without it a repair step reading the file knows the chain rejected + something but not what the page claimed, which is the half it needs. + """ + + FIELDS = { + "address": ("The address to query balances for. Encoded as cosmos.AddressString.", ""), + "denom": ("The coin denomination.", ""), + "pagination": ("", ""), + } + + def test_joins_the_notes_for_the_fields_actually_sent(self): + claim = findings.claim_for(self.FIELDS, {"address": "cosmos1abc", "denom": "stake"}) + self.assertIn("address: The address to query balances for.", claim) + self.assertIn("denom: The coin denomination.", claim) + + def test_omits_a_field_the_payload_does_not_carry(self): + claim = findings.claim_for(self.FIELDS, {"denom": "stake"}) + self.assertNotIn("address", claim) + + def test_skips_a_field_the_page_says_nothing_about(self): + self.assertEqual(findings.claim_for(self.FIELDS, {"pagination": {}}), "") + + def test_is_empty_when_nothing_was_sent(self): + self.assertEqual(findings.claim_for(self.FIELDS, None), "") + self.assertEqual(findings.claim_for({}, {"address": "cosmos1abc"}), "") + + +class Render(unittest.TestCase): + def test_names_the_page_and_anchor_a_reader_would_land_on(self): + text = findings.render(findings.document("next", "cosmos/cosmos-sdk", "main", "abc", + "query-onchain", {"pass": 1}, [one()])) + self.assertIn("bank.mdx#balance", text) + + def test_says_so_plainly_when_there_is_nothing_to_report(self): + text = findings.render(findings.document("next", "cosmos/cosmos-sdk", "main", "abc", + "query-onchain", {"pass": 123}, [])) + self.assertIn("no findings", text) + + +if __name__ == "__main__": + unittest.main() diff --git a/scripts/api-reference/test/test_manifest.py b/scripts/api-reference/test/test_manifest.py new file mode 100644 index 00000000..7c8a1202 --- /dev/null +++ b/scripts/api-reference/test/test_manifest.py @@ -0,0 +1,125 @@ +"""Tests for the unified coverage manifest.""" + +import tempfile +import unittest +from pathlib import Path + +import manifest + + +def write(text: str) -> Path: + path = Path(tempfile.mkdtemp()) / "coverage.toml" + path.write_text(text) + return path + + +class Load(unittest.TestCase): + def test_applies_the_default_expect_when_an_entry_omits_it(self): + path = write(''' +[cases."cosmos.authz.v1beta1.MsgExec"] +note = "needs a grant first" +requires = ["cosmos.authz.v1beta1.MsgGrant"] +''') + entries = manifest.load(path, manifest.TX_VOCABULARY, default="success") + self.assertEqual(entries["cosmos.authz.v1beta1.MsgExec"]["expect"], "success") + + def test_an_ordering_only_entry_needs_no_note(self): + path = write(''' +[cases."cosmos.gov.v1.MsgVote"] +requires = ["cosmos.gov.v1.MsgSubmitProposal"] +''') + manifest.load(path, manifest.TX_VOCABULARY, default="success") + + def test_reads_cases_keyed_by_qualified_name(self): + path = write(""" +[cases."cosmos.bank.v1beta1.Query/Balance"] +expect = "unfillable" +note = "no stated form for denom" +""") + entries = manifest.load(path, manifest.QUERY_VOCABULARY) + self.assertEqual(entries["cosmos.bank.v1beta1.Query/Balance"]["expect"], "unfillable") + self.assertEqual(entries["cosmos.bank.v1beta1.Query/Balance"]["note"], "no stated form for denom") + + def test_carries_requires_and_signer_through(self): + path = write(""" +[cases."cosmos.authz.v1beta1.MsgExec"] +expect = "success" +note = "needs a grant first" +requires = ["cosmos.authz.v1beta1.MsgGrant"] +signer = "second" +""") + entry = manifest.load(path, manifest.TX_VOCABULARY)["cosmos.authz.v1beta1.MsgExec"] + self.assertEqual(entry["requires"], ["cosmos.authz.v1beta1.MsgGrant"]) + self.assertEqual(entry["signer"], "second") + + def test_rejects_an_expect_value_outside_the_vocabulary(self): + path = write(""" +[cases."cosmos.bank.v1beta1.Query/Balance"] +expect = "state-error" +note = "wrong vocabulary for a query" +""") + with self.assertRaises(manifest.Invalid) as caught: + manifest.load(path, manifest.QUERY_VOCABULARY) + self.assertIn("state-error", str(caught.exception)) + + def test_requires_a_note_when_an_entry_claims_more_than_ordering(self): + path = write(""" +[cases."cosmos.bank.v1beta1.Query/Balance"] +expect = "unfillable" +""") + with self.assertRaises(manifest.Invalid): + manifest.load(path, manifest.QUERY_VOCABULARY) + + def test_rejects_a_legacy_table_rather_than_ignoring_it(self): + path = write(""" +[queries."cosmos.bank.v1beta1.Query/Balance"] +expect = "unfillable" +note = "old shape" +""") + with self.assertRaises(manifest.Invalid) as caught: + manifest.load(path, manifest.QUERY_VOCABULARY) + self.assertIn("cases", str(caught.exception)) + + +class Orphans(unittest.TestCase): + def test_reports_an_entry_with_nothing_documented(self): + self.assertEqual( + manifest.orphans({"a": {}, "b": {}}, {"a"}), + ["b"], + ) + + def test_is_quiet_when_every_entry_matches(self): + self.assertEqual(manifest.orphans({"a": {}}, {"a", "b"}), []) + + +class Classify(unittest.TestCase): + ERRORS = {"malformed": ["invalid character", "unknown field"], + "environmental": ["not found", "no delegation"]} + + def test_a_malformed_error_is_a_documentation_defect(self): + self.assertEqual( + manifest.classify("rpc error: invalid character 'x'", self.ERRORS), + "malformed", + ) + + def test_an_environmental_error_is_not(self): + self.assertEqual(manifest.classify("validator not found", self.ERRORS), "environmental") + + def test_malformed_wins_when_both_match(self): + self.assertEqual( + manifest.classify("unknown field, and not found", self.ERRORS), + "malformed", + ) + + def test_an_unrecognised_error_is_unclassified_rather_than_guessed(self): + self.assertEqual( + manifest.classify("something upstream reworded", self.ERRORS), + "unclassified", + ) + + def test_matching_ignores_case(self): + self.assertEqual(manifest.classify("INVALID CHARACTER", self.ERRORS), "malformed") + + +if __name__ == "__main__": + unittest.main() diff --git a/scripts/api-reference/test/test_pagefill.py b/scripts/api-reference/test/test_pagefill.py new file mode 100644 index 00000000..8928dd23 --- /dev/null +++ b/scripts/api-reference/test/test_pagefill.py @@ -0,0 +1,162 @@ +"""Tests for the shared page filler and its guards.""" + +import json +import tempfile +import unittest +from pathlib import Path + +import pagefill + + +class CompletenessGuard(unittest.TestCase): + def setUp(self): + self.root = Path(tempfile.mkdtemp()) + directory = self.root / "sdk" / "next" / "api-reference" + directory.mkdir(parents=True) + (directory / "inventory.json").write_text(json.dumps({ + "queries": ["cosmos.bank.v1beta1.Query/Balance", + "cosmos.bank.v1beta1.Query/AllBalances"], + "messages": ["cosmos.bank.v1beta1.MsgSend"], + })) + self._saved = pagefill.REPO_ROOT + pagefill.REPO_ROOT = self.root + + def tearDown(self): + pagefill.REPO_ROOT = self._saved + + def test_passes_when_the_parse_covers_the_inventory(self): + pagefill.assert_complete("next", [ + "cosmos.bank.v1beta1.Query/Balance", + "cosmos.bank.v1beta1.Query/AllBalances", + ], "queries") + + def test_fails_and_names_a_method_the_parse_missed(self): + with self.assertRaises(pagefill.Incomplete) as caught: + pagefill.assert_complete("next", ["cosmos.bank.v1beta1.Query/Balance"], "queries") + self.assertIn("AllBalances", str(caught.exception)) + + def test_an_extra_parsed_name_is_not_a_failure(self): + pagefill.assert_complete("next", [ + "cosmos.bank.v1beta1.Query/Balance", + "cosmos.bank.v1beta1.Query/AllBalances", + "cosmos.bank.v1beta1.Query/SomethingElse", + ], "queries") + + def test_a_missing_inventory_is_a_failure_not_a_pass(self): + (self.root / "sdk" / "next" / "api-reference" / "inventory.json").unlink() + with self.assertRaises(pagefill.Incomplete): + pagefill.assert_complete("next", [], "queries") + + +class GeneratedFrom(unittest.TestCase): + def setUp(self): + self.root = Path(tempfile.mkdtemp()) + self.directory = self.root / "sdk" / "next" / "api-reference" / "rest" + self.directory.mkdir(parents=True) + self._saved = pagefill.REPO_ROOT + pagefill.REPO_ROOT = self.root + + def tearDown(self): + pagefill.REPO_ROOT = self._saved + + def test_returns_the_sha_and_ref_recorded_by_the_generator(self): + (self.directory / "openapi.yaml").write_text( + "info:\n description: >-\n Generated from cosmos/cosmos-sdk at commit " + "2086680ff8b08fd269ee653e087ea577bab79534 on ref\n `main`.\n" + ) + repository, sha, ref = pagefill.generated_from("next") + self.assertEqual(repository, "cosmos/cosmos-sdk") + self.assertEqual(sha, "2086680ff8b08fd269ee653e087ea577bab79534") + self.assertEqual(ref, "main") + + def test_a_ref_containing_a_slash_is_captured_whole(self): + (self.directory / "openapi.yaml").write_text( + "info:\n description: >-\n Generated from cosmos/cosmos-sdk at commit " + "2086680ff8b08fd269ee653e087ea577bab79534 on ref\n `release/v0.55.x`.\n" + ) + _, _, ref = pagefill.generated_from("next") + self.assertEqual(ref, "release/v0.55.x") + + def test_raises_incomplete_when_the_line_is_absent(self): + (self.directory / "openapi.yaml").write_text("info:\n description: nothing here\n") + with self.assertRaises(pagefill.Incomplete): + pagefill.generated_from("next") + + +class UnfillableCarriesTheField(unittest.TestCase): + """`claim` in a findings.Finding comes from this: the exception must carry + the field it failed on, and the page's own note for it, resolved at the + raise site. A caller reading `.note` must never fall back to re-deriving + it from a table of its own choosing, because `fill()` rebinds the field + table when it recurses into a nested type: a caller that resolved the + note itself from the top-level table would either miss a nested field + entirely or, worse, match an unrelated same-named field at the top level. + """ + + def blank_page(self): + return {"name": "x.mdx", "text": "", "types": {}, "enums": {}, "by_anchor": {}, + "dec_decimal": False} + + def test_a_constrained_placeholder_names_its_field_and_note(self): + with self.assertRaises(pagefill.Unfillable) as caught: + pagefill.fill_value("<string>", "must match a hex string", "`string`", + self.blank_page(), {}, "memo_hash") + self.assertEqual(caught.exception.field, "memo_hash") + self.assertEqual(caught.exception.note, "must match a hex string") + + def test_an_unstated_dec_encoding_names_its_field_and_note(self): + with self.assertRaises(pagefill.Unfillable) as caught: + pagefill.fill_value("<string>", "Encoded as cosmos.Dec", "`string`", + self.blank_page(), {}, "amount") + self.assertEqual(caught.exception.field, "amount") + self.assertEqual(caught.exception.note, "Encoded as cosmos.Dec") + + def test_an_any_with_no_concrete_type_names_its_field_and_note(self): + body = {"grantee": {"@type": "/cosmos.example.Authorization"}} + with self.assertRaises(pagefill.Unfillable) as caught: + pagefill.fill(body, self.blank_page(), {}, {"grantee": ("names no concrete type", "")}) + self.assertEqual(caught.exception.field, "grantee") + self.assertEqual(caught.exception.note, "names no concrete type") + + def test_a_nested_fields_note_does_not_leak_from_a_same_named_top_level_field(self): + """The regression this exists to catch. `grant.expiration` is + unfillable because its own (nested) note requires an RFC 3339 form + the page never states, but the top-level example also happens to + carry an `expiration` key, documented completely differently. A + caller that resolved the note from the top-level table would report + the wrong field's note as the reason. + """ + page = self.blank_page() + page["by_anchor"] = {"cosmos-authz-v1beta1-grant": "cosmos.authz.v1beta1.Grant"} + page["types"] = { + "cosmos.authz.v1beta1.Grant": { + "expiration": ("Written as an RFC 3339 timestamp; this page states no example form.", + "`google.protobuf.Timestamp`"), + }, + } + top_level_fields = { + "grant": ("the authorization being granted", "[`Grant`](#cosmos-authz-v1beta1-grant)"), + # A same-named, unrelated top-level field with a different note. + # If the runner-level lookup ever regresses to consulting this + # table instead of the exception, this is what it would wrongly + # report. + "expiration": ("an unrelated top-level field that happens to share a name", "`string`"), + } + body = {"grant": {"expiration": "<string>"}} + + with self.assertRaises(pagefill.Unfillable) as caught: + pagefill.fill(body, page, {}, top_level_fields) + + self.assertEqual(caught.exception.field, "expiration") + self.assertEqual( + caught.exception.note, + "Written as an RFC 3339 timestamp; this page states no example form.", + ) + self.assertNotEqual( + caught.exception.note, + "an unrelated top-level field that happens to share a name", + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/scripts/api-reference/test/test_refs.test.js b/scripts/api-reference/test/test_refs.test.js new file mode 100644 index 00000000..dbeca592 --- /dev/null +++ b/scripts/api-reference/test/test_refs.test.js @@ -0,0 +1,40 @@ +import { test, describe } from 'node:test'; +import assert from 'node:assert/strict'; +import { parseArgs, resolveRef } from '../lib/refs.js'; + +describe('parseArgs', () => { + test('accepts a ref override', () => { + const args = parseArgs(['--version', 'next', '--ref', 'release/v0.54.x']); + assert.equal(args.version, 'next'); + assert.equal(args.ref, 'release/v0.54.x'); + }); + + test('leaves ref null when not given', () => { + assert.equal(parseArgs(['--version', 'latest']).ref, null); + }); + + test('rejects a version that is not next or latest', () => { + assert.throws(() => parseArgs(['--version', 'v0.53']), /must be next or latest/); + }); +}); + +describe('resolveRef', () => { + test('next resolves to main by default', () => { + assert.equal(resolveRef('next', {}).ref, 'main'); + }); + + test('latest resolves to the release branch from versions.json', () => { + assert.match(resolveRef('latest', {}).ref, /^release\/v\d+\.\d+\.x$/); + }); + + test('an override wins over the derived ref for either version', () => { + assert.equal(resolveRef('next', { ref: 'release/v0.54.x' }).ref, 'release/v0.54.x'); + assert.equal(resolveRef('latest', { ref: 'v0.54.0' }).ref, 'v0.54.0'); + }); + + test('an override does not change the version stamp on the pages', () => { + const derived = resolveRef('next', {}); + const overridden = resolveRef('next', { ref: 'release/v0.54.x' }); + assert.equal(overridden.displayVersion, derived.displayVersion); + }); +}); diff --git a/scripts/api-reference/tx-coverage.toml b/scripts/api-reference/tx-coverage.toml new file mode 100644 index 00000000..74a8bc0d --- /dev/null +++ b/scripts/api-reference/tx-coverage.toml @@ -0,0 +1,167 @@ +# Exceptions for the on-chain transaction runner. +# +# The runner derives everything it can. The message list, the signer, and the +# governance-gated classification all come from the descriptor, so a message +# added upstream is exercised with no entry here. This file records only what +# cannot be derived: which messages need state set up first, which cannot +# succeed on a fresh chain, which fields a reader cannot fill from the page, +# and why. +# +# Every run diffs this file against the descriptor and reports entries with no +# matching message, so a removed message leaves a visible orphan rather than a +# silent no-op. +# +# expect: +# success code 0. The strong assertion: a wrong documented value fails here. +# unauthorized rejected because the signer is the governance module account. +# Derived from the signer field; stated anyway so a change shows up. +# state-error the encoding is checked but the chain lacks what the message needs. +# Use sparingly: it is the weak assertion, since it passes on any +# failure after the ante handler rather than a specific one. +# success means the chain executed it, not that it accepted it. The runner +# broadcasts with --broadcast-mode sync and then reads the delivered +# result back by transaction hash, so a message that pays its fee, +# passes signature checks, and then fails in its module handler is +# a failure here, as it should be. +# skip not attempted, with a reason. Still probed, and an unexpected +# success is reported, so a skip cannot quietly go stale. +# unfillable the page cannot give a reader a usable value for some field, so the +# message is never broadcast: a case that cannot be filled never +# reaches the point where its outcome matters. +# +# signer: +# "validator" the account operating the chain's validator, which the runner +# resolves from --validator-key. A key name out of one machine's +# keyring would make this file work only on that machine. +# +# An entry is a statement that we know this cannot work as written. Where the +# reason is fixable it should be fixed instead of recorded. + +[cases."cosmos.authz.v1beta1.MsgExec"] +requires = ["cosmos.authz.v1beta1.MsgGrant"] +note = "executes a message on behalf of a granter, so a grant must exist first" + +[cases."cosmos.authz.v1beta1.MsgRevoke"] +expect = "unfillable" +requires = ["cosmos.authz.v1beta1.MsgGrant"] +note = "revokes an existing grant, but msg_type_url has no example upstream to fill it from" + +[cases."cosmos.feegrant.v1beta1.MsgRevokeAllowance"] +requires = ["cosmos.feegrant.v1beta1.MsgGrantAllowance"] +note = "revokes an existing allowance; granter and grantee must differ, which the page does not state, as for the grant message" +expect = "state-error" + +[cases."cosmos.staking.v1beta1.MsgUndelegate"] +requires = ["cosmos.staking.v1beta1.MsgDelegate"] +note = "needs an existing delegation" + +[cases."cosmos.staking.v1beta1.MsgBeginRedelegate"] +expect = "state-error" +note = "needs two validators with a delegation on the source; a single-validator chain cannot" + +[cases."cosmos.staking.v1beta1.MsgCancelUnbondingDelegation"] +expect = "state-error" +requires = ["cosmos.staking.v1beta1.MsgUndelegate"] +note = "needs an unbonding entry at a known creation height" + +[cases."cosmos.staking.v1beta1.MsgCreateValidator"] +expect = "unfillable" +note = "needs a consensus keypair this harness does not generate, and pubkey has no cosmos.crypto.PubKey implementation registered in the descriptor to fill it with" + +[cases."cosmos.staking.v1beta1.MsgRotateConsPubKey"] +expect = "unfillable" +note = "needs a new consensus key, and the rotation fee, on an existing validator; new_pubkey has the same missing cosmos.crypto.PubKey implementation as MsgCreateValidator's pubkey" + +[cases."cosmos.slashing.v1beta1.MsgUnjail"] +expect = "state-error" +note = "the validator is not jailed on a healthy test chain, so the message is well formed and fails in execution. The encoding is what this asserts" + +[cases."cosmos.evidence.v1beta1.MsgSubmitEvidence"] +expect = "unfillable" +note = "needs real equivocation evidence, and cosmos.evidence.v1beta1.Evidence has no implementations registered in the descriptor to construct one from" + +[cases."cosmos.gov.v1.MsgDeposit"] +requires = ["cosmos.gov.v1.MsgSubmitProposal"] +expect = "state-error" +note = "needs an existing proposal in a deposit period; none can be created here because MsgSubmitProposal is unfillable" + +[cases."cosmos.gov.v1.MsgVote"] +requires = ["cosmos.gov.v1.MsgSubmitProposal"] +expect = "state-error" +note = "needs a proposal in a voting period; proposal 1 does not exist on a fresh chain" + +[cases."cosmos.gov.v1.MsgVoteWeighted"] +requires = ["cosmos.gov.v1.MsgSubmitProposal"] +expect = "state-error" +note = "the chain requires option weights to sum to 1.00 and no field description says so, so a reader filling one option with any single weight is rejected. An upstream comment gap" + +[cases."cosmos.gov.v1.MsgCancelProposal"] +requires = ["cosmos.gov.v1.MsgSubmitProposal"] +note = "only the proposer may cancel, and only before voting ends; needs an existing proposal, which cannot be created here" +expect = "state-error" + +[cases."cosmos.gov.v1beta1.MsgDeposit"] +note = "v1beta1 proposals are submitted through v1 on a modern chain; needs an existing proposal in a deposit period, as for the v1 message" +expect = "state-error" + +[cases."cosmos.gov.v1beta1.MsgVote"] +expect = "state-error" +note = "needs a proposal in a voting period, as for the v1 message" + +[cases."cosmos.gov.v1beta1.MsgVoteWeighted"] +expect = "state-error" +note = "weights must sum to 1.00, unstated on the page, as for the v1 message" + +[cases."cosmos.gov.v1beta1.MsgSubmitProposal"] +note = "v1beta1 content is registered on simapp, so this succeeds; the legacy message accepts only registered legacy content types, and the page's Any example names CommunityPoolSpend, which is not one" +expect = "state-error" + +[cases."cosmos.gov.v1.MsgExecLegacyContent"] +expect = "unfillable" +note = "signer is the governance authority, and this page does not say how to find that address (the transactions page does)" + +[cases."cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission"] +signer = "validator" +note = "signed by the account behind the validator operator address, not an arbitrary account" + +[cases."cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool"] +note = "requires an existing validator rewards pool" + +[cases."cosmos.counter.v1.MsgIncreaseCounter"] +expect = "skip" +note = "test module, not registered by simapp's interface registry" + +[cases."cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount"] +expect = "unfillable" +note = "creates an account, so the recipient must not already exist; from_address and to_address both leave their description empty upstream with no address annotation to fill them from" + +[cases."cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount"] +expect = "unfillable" +note = "creates an account, so the recipient must not already exist, and from_address leaves its description empty upstream with no address annotation to fill it from" + +[cases."cosmos.vesting.v1beta1.MsgCreateVestingAccount"] +note = "creates an account, so the recipient must not already exist; creates an account, so the recipient must not already exist; every address the page can supply does" +expect = "state-error" + +[cases."cosmos.staking.v1beta1.MsgEditValidator"] +signer = "validator" +note = "only the validator's own account may edit it; commission cannot change more than once in 24h, and the harness edits the validator it just created" + +# --------------------------------------------------------------------------- +# Messages with no precondition of their own above: the only thing known about +# them is that the page cannot fill a field they need. Where the reason is +# upstream, it is worth raising with cosmos-sdk. +# --------------------------------------------------------------------------- +expect = "state-error" + +[cases."cosmos.authz.v1beta1.MsgGrant"] +expect = "unfillable" +note = "expiration's placeholder names RFC 3339 but the page gives no example timestamp" + +[cases."cosmos.gov.v1.MsgSubmitProposal"] +expect = "unfillable" +note = "messages accepts any Msg; the page states the interface but names no example type URL" + +[cases."cosmos.feegrant.v1beta1.MsgGrantAllowance"] +expect = "state-error" +note = "granter and grantee must differ, which the page does not state; the only address a reader is given for both is their own. An upstream comment gap" diff --git a/scripts/api-reference/tx-onchain.py b/scripts/api-reference/tx-onchain.py new file mode 100644 index 00000000..041173fd --- /dev/null +++ b/scripts/api-reference/tx-onchain.py @@ -0,0 +1,394 @@ +#!/usr/bin/env python3 +"""Broadcast every documented transaction message, filling values the way a reader would. + +The other checks read the descriptor. This one reads the page, which is the +point: it fills each field from what the documentation actually tells a reader, +so a page whose guidance is well-formed and wrong fails here rather than passing. + +That distinction is not theoretical. Filling `cosmos.Dec` from the proto +annotation produced a green check while the page told gRPC readers to write a +value the chain rejects. A filler that reads the page instead cannot be right +when the page is wrong. + +Three outcomes per field: + + the page states the value or its form use it, and let the chain judge the page + the value is genuinely the reader's supply it: an address, an amount + the page says nothing a finding, not a pass + +Everything derivable is derived. The message list, the signer, and the +governance-gated classification come from the descriptor, so a message added +upstream is exercised without touching tx-coverage.toml. That file records only +preconditions and expected outcomes, and every run reports entries that no longer +match a message. + +Usage: + python3 tx-onchain.py --home ~/.simapp --chain-id my-chain --from alice +""" + +import argparse +import json +import re +import subprocess +import sys +import urllib.request +from pathlib import Path + +import findings +import manifest +import pagefill + +HERE = Path(__file__).resolve().parent +REPO_ROOT = HERE.parent.parent + +def discover(rest: str, signer: str, second: str, validator: str) -> dict: + with urllib.request.urlopen(f"{rest}/cosmos/staking/v1beta1/params", timeout=20) as r: + denom = json.load(r)["params"]["bond_denom"] + return { + "cosmos.AddressString": signer, + "cosmos.ValidatorAddressString": validator, + "cosmos.ConsensusAddressString": validator, + "cosmos.Int": "1000", + "denom": denom, + "recipient": second, + } + + +def wait_for_sequence(rest: str, address: str, previous: int, attempts: int = 20) -> int: + """Block until the account's sequence advances past the last broadcast. + + Without this every message after the first fails on a sequence mismatch, + which says nothing about the documentation and hides what does. + """ + import time + + for _ in range(attempts): + try: + with urllib.request.urlopen( + f"{rest}/cosmos/auth/v1beta1/account_info/{address}", timeout=10 + ) as response: + info = json.load(response).get("info", {}) + current = int(info.get("sequence", 0)) + if current > previous: + return current + except Exception: # noqa: BLE001 - a transient read should not end the run + pass + time.sleep(1) + return previous + + +def current_sequence(rest: str, address: str) -> int: + try: + with urllib.request.urlopen( + f"{rest}/cosmos/auth/v1beta1/account_info/{address}", timeout=10 + ) as response: + return int(json.load(response).get("info", {}).get("sequence", 0)) + except Exception: # noqa: BLE001 + return 0 + + +def broadcast(simd, home, chain_id, key, node, message, denom) -> tuple[int, str]: + """Build, sign and broadcast one message, exactly as the transactions page describes.""" + # The fee denom is the chain's, not a constant: a hardcoded one turns every + # message on a chain that names its stake token differently into a fee + # failure, which reads as a documentation defect and is not one. + document = { + "body": {"messages": [message], "memo": "", "timeout_height": "0", + "extension_options": [], "non_critical_extension_options": []}, + "auth_info": {"signer_infos": [], + "fee": {"amount": [{"denom": denom, "amount": "5000"}], + "gas_limit": "400000", "payer": "", "granter": ""}}, + "signatures": [], + } + unsigned = Path("/tmp/tx-onchain-unsigned.json") + unsigned.write_text(json.dumps(document)) + + common = ["--home", home, "--keyring-backend", "test", "--node", node] + signed = subprocess.run( + [simd, "tx", "sign", str(unsigned), "--from", key, "--chain-id", chain_id, + "--output-document", "/tmp/tx-onchain-signed.json", *common], + capture_output=True, text=True, + ) + if signed.returncode != 0: + return -1, (signed.stderr or signed.stdout).strip().splitlines()[-1][:160] + + sent = subprocess.run( + [simd, "tx", "broadcast", "/tmp/tx-onchain-signed.json", "--broadcast-mode", "sync", *common], + capture_output=True, text=True, + ) + output = sent.stdout + sent.stderr + code = re.search(r'"?code"?:\s*(\d+)', output) + raw = re.search(r'raw_log:\s*(.*)', output) + check_code = int(code.group(1)) if code else -1 + check_log = raw.group(1).strip()[:160] if raw else output.strip()[:160] + + # A sync broadcast reports the ante handler's verdict, nothing more. A + # message that pays its fee and carries a valid signature reaches code 0 + # here and then fails in its module handler, so trusting this number marks + # a documented example that does not work as one that does. The delivered + # result is the assertion worth making, and it only exists after inclusion. + if check_code != 0: + return check_code, check_log + found = re.search(r'"?txhash"?:\s*"?([0-9A-Fa-f]{64})', output) + if not found: + return check_code, f"accepted, but no txhash to confirm delivery: {check_log}" + return delivered(simd, node, found.group(1), home) + + +def delivered(simd, node, txhash, home, attempts: int = 20) -> tuple[int, str]: + """The result the chain recorded for a transaction, once it is in a block. + + Polled rather than waited on, because inclusion takes a block and the query + reports not found until then. + """ + import time + + for _ in range(attempts): + out = subprocess.run( + [simd, "query", "tx", txhash, "--node", node, "--home", home, "--output", "json"], + capture_output=True, text=True, + ) + if out.returncode == 0 and out.stdout.strip(): + try: + result = json.loads(out.stdout) + except json.JSONDecodeError: + time.sleep(1) + continue + return int(result.get("code", 0)), str(result.get("raw_log", ""))[:160] + time.sleep(1) + return -1, f"broadcast accepted but {txhash[:12]} was not in a block within {attempts}s" + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--version", default="latest", choices=["latest", "next"]) + parser.add_argument("--simd", required=True) + parser.add_argument("--home", required=True) + parser.add_argument("--chain-id", required=True) + parser.add_argument("--from", dest="key", default="alice") + parser.add_argument("--second-key", default="bob") + parser.add_argument("--validator-key", default=None, + help="key behind the validator operator account; defaults to --from") + parser.add_argument("--node", default="tcp://localhost:26657") + parser.add_argument("--rest", default="http://localhost:1317") + parser.add_argument("--only", default=None, help="substring filter, for iterating") + parser.add_argument("--findings", default="findings-tx-onchain.json") + args = parser.parse_args() + + def address_of(name, bech="acc"): + out = subprocess.run( + [args.simd, "keys", "show", name, "-a", "--bech", bech, + "--keyring-backend", "test", "--home", args.home], + capture_output=True, text=True) + return out.stdout.strip() + + with urllib.request.urlopen( + f"{args.rest}/cosmos/staking/v1beta1/validators?pagination.limit=1", timeout=20 + ) as r: + validators = json.load(r).get("validators", []) + validator = validators[0]["operator_address"] if validators else "" + + fixtures = discover(args.rest, address_of(args.key), address_of(args.second_key), validator) + + def resolve_validator_key() -> str: + """The key behind the validator operator address, verified, not assumed. + + Two entries exist precisely to assert that a validator-only message is + signed by the validator's own account and not an arbitrary one. Quietly + falling back to --from would sign them with an arbitrary account, and + they would be recorded as page defects when the page is fine. So the + claim is checked against the chain and a mismatch is fatal. + """ + candidate = args.validator_key or args.key + if not validator: + raise SystemExit( + "the coverage file uses signer = \"validator\" but the chain reports no " + "validator; point --rest at a chain that has one" + ) + if address_of(candidate, bech="val") != validator: + raise SystemExit( + f"--validator-key {candidate!r} is not the account behind {validator}. " + "Two entries assert that a validator-only message is signed by the " + "validator's own account; signing them with another account would " + "record a page defect that is not one. Pass the operator's key." + ) + return candidate + + def signer_for(entry): + """Which key signs, given the manifest may name a role rather than a key. + + A validator-only message has to be signed by whoever operates the + validator, and that is a fact about the chain under test, not about the + page. Naming the role keeps a key from one machine's keyring out of the + manifest. + """ + name = entry.get("signer") + if name is None: + return args.key + if name == "validator": + return resolve_validator_key() + return name + + pages = {} + for path, page in pagefill.pages_for(args.version): + for type_url, block in pagefill.transactions_on(page, path): + pages[type_url] = {**block, "page": page} + + try: + pagefill.assert_complete(args.version, pages, "messages") + except pagefill.Incomplete as reason: + print(f"\n{reason}", file=sys.stderr) + return 1 + + try: + entries = manifest.load(HERE / "tx-coverage.toml", manifest.TX_VOCABULARY, + default="success") + except manifest.Invalid as reason: + print(reason, file=sys.stderr) + return 1 + + counts = {"success": 0, "unauthorized": 0, "state-error": 0, "skip": 0} + items = [] + + # Drift both ways. A message added upstream is exercised with defaults; an + # entry whose message is gone is a finding rather than a printed aside. + # Inside release-check this runner's output is one of several multi-minute + # logs, and a list that scrolls past a step reporting ok is not the visible + # trace the manifest diff is supposed to leave, so recording it here puts it + # in the findings file and makes the run exit non-zero. + for name in manifest.orphans(entries, pages): + counts.setdefault("stale entry", 0) + counts["stale entry"] += 1 + items.append(findings.Finding( + page="tx-coverage.toml", anchor="", method=name, + claim=entries[name].get("note", ""), sent=None, + response="the manifest names a message the pages no longer document; " + "delete the entry", + verdict="stale-manifest-entry", manifest_entry=name, + )) + print(f" STALE {name:52} no matching message, delete the entry") + + order = [] + for name in sorted(pages): + for prerequisite in entries.get(name, {}).get("requires", []): + if prerequisite in pages and prerequisite not in order: + order.append(prerequisite) + if name not in order: + order.append(name) + + # Resolved before anything is broadcast, not lazily inside the loop. A + # mismatch raises SystemExit, and raising it partway through would abandon + # the run after messages had already gone to the chain, with findings.write + # never reached: release-check would then point the operator at a findings + # file still holding the previous run's contents. + selected = [name for name in order if not args.only or args.only in name] + if any(entries.get(name, {}).get("signer") == "validator" for name in selected): + resolve_validator_key() + + for name in order: + if args.only and args.only not in name: + continue + page, entry = pages[name], entries.get(name, {}) + # A page that tells a reader the governance module account signs is + # telling them they cannot send this directly. Assert what the page + # claims, unless the manifest states otherwise for a stated reason, so + # a message that becomes governance gated upstream classifies itself. + if page.get("governance_gated") and name not in entries: + expect = "unauthorized" + else: + expect = entry.get("expect", "success") + + try: + body = pagefill.fill(page["example"], page["page"], fixtures, page["fields"]) + except pagefill.Unfillable as reason: + if entry.get("expect") == "unfillable": + counts.setdefault("known gap", 0) + counts["known gap"] += 1 + print(f" KNOWN GAP {name:52} {entry.get('note', '')[:52]}") + else: + claim = reason.note + items.append(findings.Finding( + page=page["page"]["name"], anchor=page["anchor"], method=name, claim=claim, + sent=None, response=str(reason), verdict="unfillable", + manifest_entry=name if entry else None, + )) + print(f" UNFILLABLE {name:52} {reason}") + continue + + if expect == "unfillable": + # The manifest says a reader cannot fill this message, and it just + # filled. That is the drift the manifest exists to surface, usually + # upstream adding the example the page was missing. Reported rather + # than broadcast: the recorded expectation is what is now wrong. + counts.setdefault("stale entry", 0) + counts["stale entry"] += 1 + items.append(findings.Finding( + page=page["page"]["name"], anchor=page["anchor"], method=name, + claim=entry.get("note", ""), sent=body, + response="the manifest records this as unfillable, but the page filled it; " + "delete the entry or give it an outcome", + verdict="stale-manifest-entry", manifest_entry=name, + )) + print(f" STALE {name:52} recorded unfillable, but it filled") + continue + + if expect == "skip": + # Probed anyway. A skip states that something cannot be attempted + # here; if it turns out it can, the entry is stale and saying so is + # the whole point of recording it. Both this file's header and + # DESIGN.md promise this, so the promise has to be true. + signer = signer_for(entry) + before = current_sequence(args.rest, address_of(signer)) + code, log = broadcast(args.simd, args.home, args.chain_id, signer, args.node, body, + fixtures["denom"]) + if code == 0: + wait_for_sequence(args.rest, address_of(signer), before) + items.append(findings.Finding( + page=page["page"]["name"], anchor=page["anchor"], method=name, + claim=findings.claim_for(page["fields"], body), sent=body, + response="recorded as skip, but it succeeded; delete the entry", + verdict="stale-manifest-entry", manifest_entry=name, + )) + print(f" STALE {name:52} recorded skip, but it succeeded") + else: + counts["skip"] += 1 + print(f" SKIP {name:52} {entry.get('note', '')[:60]}") + continue + + signer = signer_for(entry) + signer_address = address_of(signer) + before = current_sequence(args.rest, signer_address) + code, log = broadcast(args.simd, args.home, args.chain_id, signer, args.node, body, + fixtures["denom"]) + if code == 0: + wait_for_sequence(args.rest, signer_address, before) + unauthorized = "unauthorized" in log or "invalid authority" in log + + if expect == "success": + ok = code == 0 + elif expect == "unauthorized": + ok = unauthorized + else: + ok = code != 0 and not unauthorized + + counts[expect] = counts.get(expect, 0) + ok + verdict = "PASS" if ok else "FAIL" + print(f" {verdict:11} {name:52} code={code} {log[:60]}") + if not ok: + items.append(findings.Finding( + page=page["page"]["name"], anchor=page["anchor"], method=name, + claim=findings.claim_for(page["fields"], body), + sent=body, response=f"expected {expect}, got code {code}: {log}", + verdict="page-defect", manifest_entry=name if entry else None, + )) + + repository, sha, ref = pagefill.generated_from(args.version) + document = findings.document(args.version, repository, ref, sha, "tx-onchain", counts, items) + findings.write(args.findings, document) + print() + print(findings.render(document)) + return 1 if document["totals"]["findings"] else 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/api-reference/verify-transaction-examples.py b/scripts/api-reference/verify-transaction-examples.py new file mode 100644 index 00000000..e5b7b558 --- /dev/null +++ b/scripts/api-reference/verify-transaction-examples.py @@ -0,0 +1,423 @@ +#!/usr/bin/env python3 +"""Verify that every generated transaction JSON example is a valid message. + +The module pages show, for each transaction message, the JSON body you put in a +transaction. If one of those is wrong, a reader copies it, signs it, broadcasts +it, and pays a fee for a transaction the chain rejects. Several have been wrong: +enums rendered as {}, Any rendered with typeUrl/value, Duration as +{seconds,nanos}, bytes as an unparseable placeholder. + +This parses each example against the protobuf definitions it was generated from, +using google.protobuf.json_format, which rejects unknown fields including inside +an Any. That matters because the SDK is strict in the same place: its decoder +calls unknownproto.RejectUnknownFieldsStrict, which traverses into Any and +rejects unknown fields there, and Cosmos Msg bodies live inside Any. + +`buf convert` is deliberately not used. It silently drops unknown fields and +exits 0, so a completely misspelled example passes. + +The descriptor is built at the exact commit each page records, so the check runs +against the same protos that produced the examples rather than whatever is on a +branch today. + +Usage: + python3 verify-transaction-examples.py --version latest + python3 verify-transaction-examples.py --version latest --version next +""" + +import argparse +import json +import os +import re +import subprocess +import sys +from pathlib import Path + +from google.protobuf import descriptor_pb2, descriptor_pool, json_format, message_factory + +# What a placeholder becomes before the chain binary decodes it. The SDK's custom +# types parse their own strings, so "<string>" is not a legal cosmos.Int, and a +# template cannot be decoded until each placeholder is filled with something of +# the right kind. Values here only have to be well-formed, not meaningful. +SCALAR_FILLERS = { + "cosmos.Int": "1", + "cosmos.Dec": "0.05", + "cosmos.AddressString": "cosmos1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5lzv7xu", + "cosmos.ValidatorAddressString": "cosmosvaloper1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5vhwaqp", + "cosmos.ConsensusAddressString": "cosmosvalcons1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5qmz6ln", +} +PLACEHOLDER_TEXT = "<string>" + +HERE = Path(__file__).resolve().parent +REPO_ROOT = HERE.parent.parent +BUF = HERE / "node_modules" / ".bin" / "buf" +REPOSITORY = "cosmos/cosmos-sdk" + +# The renderer emits this in place of a concrete message inside an Any, because +# an Any can carry anything and the example cannot guess which. It is correct +# documentation and deliberately not a real message, so substitute something +# real before parsing rather than skipping the example and losing the coverage. +ANY_PLACEHOLDER_TYPE = "/cosmos.example.v1.MsgExample" +ANY_SUBSTITUTE_TYPE = "/cosmos.bank.v1beta1.MsgSend" +ANY_ELLIPSIS_KEY = "..." + +# Placeholders that are deliberately not parseable values. A Timestamp cannot use +# the <string> convention the other scalars use, and an epoch-zero placeholder was +# worse: it looks real and the chain rejects it ("expiration must be after the +# current block time"). Substituted here so the rest of the example is still checked. +PLACEHOLDER_VALUES = {"<RFC 3339 timestamp>": "2030-01-01T00:00:00Z"} + +SHA_PATTERN = re.compile(r"/tree/([0-9a-f]{40})/proto") +EXAMPLE_PATTERN = re.compile(r"In a transaction:\n\n```json\n(.*?)\n```", re.DOTALL) +# The -d payload of a generated grpcurl example, with the method it targets. +GRPCURL_PATTERN = re.compile( + r"```bash\ngrpcurl -plaintext -d '(.*?)' \\\n localhost:9090 ([\w.]+)/(\w+)\n```" +) + + +def build_descriptor(sha: str) -> descriptor_pb2.FileDescriptorSet: + """Build a FileDescriptorSet from the cosmos-sdk protos at one commit.""" + cache = Path(f"/tmp/sdk-image-{sha[:12]}.binpb") + if not cache.exists(): + source = f"https://github.com/{REPOSITORY}.git#ref={sha},subdir=proto" + subprocess.run([str(BUF), "build", source, "-o", str(cache)], check=True) + + fds = descriptor_pb2.FileDescriptorSet() + fds.ParseFromString(cache.read_bytes()) + return fds + + +def build_pool(fds: descriptor_pb2.FileDescriptorSet) -> descriptor_pool.DescriptorPool: + """A pool holding every file, added dependencies-first.""" + pool = descriptor_pool.DescriptorPool() + by_name = {f.name: f for f in fds.file} + added = set() + + def add(name: str) -> None: + if name in added or name not in by_name: + return + added.add(name) + for dependency in by_name[name].dependency: + add(dependency) + pool.Add(by_name[name]) + + for name in by_name: + add(name) + return pool + + +def substitute_any_placeholders(node): + """Replace the documentation placeholder for an Any with a real message.""" + if isinstance(node, list): + return [substitute_any_placeholders(item) for item in node] + if isinstance(node, str): + return PLACEHOLDER_VALUES.get(node, node) + if not isinstance(node, dict): + return node + + out = {} + for key, value in node.items(): + if key == ANY_ELLIPSIS_KEY: + continue + if key == "@type" and value == ANY_PLACEHOLDER_TYPE: + out[key] = ANY_SUBSTITUTE_TYPE + continue + out[key] = substitute_any_placeholders(value) + return out + + +def transaction_examples_in(page: Path): + """Every transaction JSON example on a page, with its declared type. + + The top-level @type selects which message to parse into. It is a discriminator + rather than a field, so it is removed before parsing; a nested @type inside an + Any stays, because that is where protojson expects it. + """ + for block in EXAMPLE_PATTERN.findall(page.read_text()): + body = json.loads(block) + type_name = body.pop("@type", "").lstrip("/") + yield "In a transaction", type_name, body + + +def query_examples_in(page: Path, request_types): + """Every generated grpcurl payload, with the request message it must satisfy.""" + for payload, service, method in GRPCURL_PATTERN.findall(page.read_text()): + type_name = request_types.get(f"{service}/{method}") + if not type_name: + continue + yield "grpcurl -d", type_name, json.loads(payload) + + +def request_types_from(fds): + """Map every service method to the message its request must parse as.""" + mapping = {} + for file in fds.file: + for service in file.service: + for method in service.method: + key = f"{file.package}.{service.name}/{method.name}" + mapping[key] = method.input_type.lstrip(".") + return mapping + + +# A minimal transaction envelope. `simd tx encode` decodes the whole document +# with the SDK's own ProtoCodec and interface registry, so wrapping a message in +# this exercises exactly the code path a node runs, offline and without keys. +TX_ENVELOPE = { + "body": {"messages": [], "memo": "", "timeout_height": "0", + "extension_options": [], "non_critical_extension_options": []}, + "auth_info": {"signer_infos": [], + "fee": {"amount": [], "gas_limit": "200000", "payer": "", "granter": ""}}, + "signatures": [], +} + + +# A placeholder reaching a gogoproto custom type is a property of the example +# being a fillable template, not a defect: cosmos.Int and cosmos.Dec parse their +# own strings, and "<string>" is not one. The binary pass skips those and still +# checks what only it can: type-URL resolution and unknown fields. +TEMPLATE_ARTIFACTS = ( + "into a *big.Int", + "decimal string cannot be empty", + "failed to set decimal string", + "invalid character", + # protojson demands base64 for a bytes field; the transaction decoder wants + # a decimal string for a bytes-typed cosmos.Dec, and the page documents what + # the chain accepts. + "Failed to parse", + # The Any placeholder is substituted with a real message so the outer shape + # can be checked, but the substitute does not implement the interface the + # field accepts. The concrete options are listed on the page itself; the + # binary cannot validate a field whose value the example deliberately leaves + # open. + "no concrete type registered for type URL", + # A module present in the protos but not registered by this particular app, + # which is a property of the binary rather than of the documentation. + "unable to resolve type URL", +) + + +def fill_placeholders(body, descriptor, scalar_of, accepts_of=None, implementations=None): + """Replace <string> placeholders with a value of the kind that field expects. + + Walks the message descriptor alongside the JSON so each substitution is driven + by the field's own cosmos_proto.scalar annotation rather than by guesswork. + """ + if not isinstance(body, dict): + return body + + fields = {f.name: f for f in descriptor.fields} + out = {} + for key, value in body.items(): + field = fields.get(key) + if field is None: + out[key] = value + continue + + nested = field.message_type + + # An Any field carries a documentation placeholder for its type URL. The + # interface it accepts names which concrete messages are legal, so fill it + # with one the registry can resolve rather than skipping the example. + if nested and nested.full_name == "google.protobuf.Any" and accepts_of: + accepted = accepts_of(field) + concrete = (implementations or {}).get(accepted) if accepted else None + if concrete: + replacement = {"@type": f"/{concrete}"} + out[key] = [replacement] if isinstance(value, list) else replacement + continue + + if isinstance(value, list): + out[key] = [ + fill_placeholders(item, nested, scalar_of, accepts_of, implementations) + if nested else item + for item in value + ] + elif isinstance(value, dict) and nested: + out[key] = fill_placeholders(value, nested, scalar_of, accepts_of, implementations) + elif value == PLACEHOLDER_TEXT: + out[key] = SCALAR_FILLERS.get(scalar_of(field), PLACEHOLDER_TEXT) + else: + out[key] = value + return out + + +def encode_with_chain_binary(simd: Path, type_url: str, body: dict, tmp: Path): + """Ask the chain binary to decode this message, as a node would. + + Stricter than protojson in one way that matters: the SDK's interface registry + is an exact lookup on "/<fullName>", so a host-prefixed type URL such as + "type.googleapis.com/cosmos.bank.v1beta1.MsgSend" is accepted by protojson + and rejected by a node. + """ + document = json.loads(json.dumps(TX_ENVELOPE)) + document["body"]["messages"] = [{"@type": f"/{type_url}", **body}] + tmp.write_text(json.dumps(document)) + + result = subprocess.run( + [str(simd), "tx", "encode", str(tmp)], capture_output=True, text=True + ) + if result.returncode == 0 and not result.stdout.startswith("Usage:"): + return None + + combined = f"{result.stderr}\n{result.stdout}" + message = next( + (line.strip() for line in combined.splitlines() if "unmarshal" in line or "error" in line.lower() and "--" not in line), + "rejected by the chain binary", + ) + if any(artifact in message for artifact in TEMPLATE_ARTIFACTS): + return "SKIP" + return message[:160] + + +def verify_version(version: str) -> int: + pages_dir = REPO_ROOT / "sdk" / version / "api-reference" / "grpc" + pages = sorted(p for p in pages_dir.glob("*.mdx") if p.name != "index.mdx") + if not pages: + print(f"no generated pages under {pages_dir}", file=sys.stderr) + return 1 + + sha_match = SHA_PATTERN.search(pages[0].read_text()) + if not sha_match: + print(f"{pages[0]} records no commit to verify against", file=sys.stderr) + return 1 + sha = sha_match.group(1) + + print(f"{version}: verifying against {REPOSITORY}@{sha[:12]}") + fds = build_descriptor(sha) + pool = build_pool(fds) + + # cosmos_proto.scalar has to be read through the same pool the descriptors + # came from, or the extension does not match the options message. + scalar_ext = pool.FindExtensionByName("cosmos_proto.scalar") + FieldOptions = message_factory.GetMessageClass( + pool.FindMessageTypeByName("google.protobuf.FieldOptions") + ) + + accepts_ext = pool.FindExtensionByName("cosmos_proto.accepts_interface") + implements_ext = pool.FindExtensionByName("cosmos_proto.implements_interface") + MessageOptions = message_factory.GetMessageClass( + pool.FindMessageTypeByName("google.protobuf.MessageOptions") + ) + + def scalar_of(field): + options = FieldOptions() + options.ParseFromString(field.GetOptions().SerializeToString()) + return options.Extensions[scalar_ext] if options.HasExtension(scalar_ext) else None + + def accepts_of(field): + options = FieldOptions() + options.ParseFromString(field.GetOptions().SerializeToString()) + return options.Extensions[accepts_ext] if options.HasExtension(accepts_ext) else None + + # interface name -> a concrete message that implements it, so an Any field can + # be filled with something the interface registry will actually resolve. + implementations = {} + for file in fds.file: + for message in file.message_type: + options = MessageOptions() + options.ParseFromString(message.options.SerializeToString()) + for name in options.Extensions[implements_ext]: + implementations.setdefault(name, f"{file.package}.{message.name}") + request_types = request_types_from(fds) + + simd = os.environ.get("SIMD_BINARY") + simd = Path(simd) if simd and Path(simd).exists() else None + encoded = 0 + skipped = 0 + tmp = Path(f"/tmp/verify-tx-{version}.json") + + counts = {"In a transaction": 0, "grpcurl -d": 0} + substituted = 0 + failures = [] + + for page in pages: + examples = list(transaction_examples_in(page)) + list( + query_examples_in(page, request_types) + ) + for kind, type_name, body in examples: + counts[kind] += 1 + payload = substitute_any_placeholders(body) + if payload != body: + substituted += 1 + + try: + descriptor = pool.FindMessageTypeByName(type_name) + except KeyError: + failures.append((page.name, kind, type_name, "no such message in the descriptor")) + continue + + # protojson accepts "type.googleapis.com/cosmos..." because it + # truncates at the last slash, but the SDK's interface registry is an + # exact lookup on "/" + fullName and rejects the host-prefixed form. + # A parser-only check would pass an example a node refuses. + for url in re.findall(r'"@type":\s*"([^"]+)"', json.dumps(payload)): + if not url.startswith("/"): + failures.append( + (page.name, kind, type_name, + f'type URL "{url}" is host-prefixed; a node resolves only "/<fullName>"') + ) + + message = message_factory.GetMessageClass(descriptor)() + try: + # ignore_unknown_fields defaults to False, which is the point: + # an unrecognised field name is an error, as it is on a node. + # The pool must be passed explicitly, or Any type URLs resolve + # against the default pool, which knows nothing about these protos. + json_format.ParseDict(payload, message, descriptor_pool=pool) + except json_format.ParseError as error: + failures.append((page.name, kind, type_name, str(error).split("\n")[0])) + continue + + # Transaction bodies get a second, authoritative pass through the + # chain's own decoder when a binary is available. + if simd and kind == "In a transaction": + encoded += 1 + filled = fill_placeholders( + payload, descriptor, scalar_of, accepts_of, implementations + ) + reason = encode_with_chain_binary(simd, type_name, filled, tmp) + if reason == "SKIP": + encoded -= 1 + skipped += 1 + if os.environ.get("VERBOSE_SKIPS"): + print(f" skipped: {type_name}") + elif reason: + failures.append((page.name, "simd tx encode", type_name, reason)) + + print( + f" {counts['In a transaction']} transaction bodies and " + f"{counts['grpcurl -d']} grpcurl payloads checked, " + f"{substituted} with an Any placeholder substituted" + ) + if simd: + print( + f" {encoded} of those also decoded by the chain binary" + f"{f', {skipped} skipped: a placeholder reaches a custom type' if skipped else ''}" + ) + else: + print(" set SIMD_BINARY to also decode them with the chain's own codec") + + if failures: + print(f"\n {len(failures)} INVALID:") + for page_name, kind, type_name, reason in failures: + print(f" {page_name} [{kind}] {type_name}") + print(f" {reason}") + return 1 + + print(" all valid") + return 0 + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--version", action="append", default=None, choices=["latest", "next"]) + args = parser.parse_args() + + status = 0 + for version in args.version or ["latest", "next"]: + status |= verify_version(version) + return status + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/scripts/sync-latest-to-next.js b/scripts/sync-latest-to-next.js index 8e3c1303..b71f2b3c 100755 --- a/scripts/sync-latest-to-next.js +++ b/scripts/sync-latest-to-next.js @@ -27,6 +27,30 @@ const REPO_ROOT = path.join(__dirname, '..'); const PRODUCTS = ['evm', 'sdk', 'hub', 'cometbft', 'ibc', 'skip-go', 'enterprise']; +// Paths, relative to <product>/latest/, where next/ is the canonical copy and +// syncing into it destroys content. Each refusal fired for real once. +const REFUSED = [ + { + prefix: 'tutorials/example/', + why: 'a bot syncs these from cosmos/example into next/, so next/ is canonical', + instead: 'node scripts/sync-next-to-latest.js <path>', + }, + { + prefix: 'api-reference/grpc/', + why: 'generated per version from a different upstream commit, so latest/ content under next/\'s version stamp would document the wrong version', + instead: 'cd scripts/api-reference && npm run sync -- --version next', + }, + { + prefix: 'api-reference/rest/', + why: 'generated per version from a different upstream commit', + instead: 'cd scripts/api-reference && npm run sync -- --version next', + }, +]; + +function refusalFor(subPath) { + return REFUSED.find((entry) => subPath.startsWith(entry.prefix)); +} + function usage() { console.error('Usage: node scripts/sync-latest-to-next.js <file> [file2 ...]'); console.error(' Files must be paths relative to the repo root, e.g.:'); @@ -76,6 +100,16 @@ function syncFile(relPath) { return false; } + const refusal = refusalFor(subPath); + if (refusal) { + console.error(`✗ ${relPath}`); + console.error(` Refusing: this script runs the wrong way for these files.`); + console.error(` ${refusal.why}.`); + console.error(` Copying latest/ over next/ here reverts whatever next/ has that latest/ does not.`); + console.error(` Instead: ${refusal.instead}`); + return false; + } + const srcPath = path.join(REPO_ROOT, relPath); const destPath = path.join(REPO_ROOT, product, 'next', subPath); diff --git a/scripts/sync-next-to-latest.js b/scripts/sync-next-to-latest.js new file mode 100644 index 00000000..d671ca0c --- /dev/null +++ b/scripts/sync-next-to-latest.js @@ -0,0 +1,193 @@ +#!/usr/bin/env node + +/** + * sync-next-to-latest.js + * + * The opposite of sync-latest-to-next.js: copies files from a product's next/ + * directory into latest/, rewriting /<product>/next/ links to /<product>/latest/. + * + * Usage: + * node scripts/sync-next-to-latest.js <file|dir> [file2|dir2 ...] + * + * This direction exists for one narrow case, and using it anywhere else is + * almost certainly wrong. latest/ is a frozen snapshot of a released version, + * and rewriting it between releases publishes content the version stamp does + * not cover. + * + * The exception is the example chain tutorials. Those pages tell a reader to + * `git clone https://github.com/cosmos/example` and `git checkout main`, so + * they document whatever main is right now rather than a released version. + * Freezing a copy of them protects nothing: it just leaves latest/ describing + * code the reader is not running. They are synced from cosmos/example into + * next/ by a bot, and this script carries that same content into latest/. + * + * ALLOWED lists the paths where that reasoning applies. Anything else is + * refused rather than warned about, because the failure is silent: latest/ + * would look updated and start disagreeing with its own version stamp. + */ + +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const REPO_ROOT = path.join(__dirname, '..'); + +const PRODUCTS = ['evm', 'sdk', 'hub', 'cometbft', 'ibc', 'skip-go', 'enterprise']; + +// Paths, relative to <product>/next/, that may be carried forward into latest/. +// Each entry needs a reason that survives someone asking "why is this exempt +// from the freeze?" a year from now. +const ALLOWED = [ + { + prefix: 'tutorials/example/', + reason: 'the pages instruct `git checkout main`, so a frozen copy documents code the reader is not running', + }, +]; + +function usage() { + console.error('Usage: node scripts/sync-next-to-latest.js <file> [file2 ...]'); + console.error(' Files must be paths relative to the repo root, e.g.:'); + console.error(' sdk/next/tutorials/example/05-run-and-test.mdx'); + process.exit(1); +} + +function extractFrontMatter(content) { + const match = content.match(/^---\n[\s\S]*?\n---\n/); + return match ? match[0] : ''; +} + +function extractBody(content) { + const match = content.match(/^---\n[\s\S]*?\n---\n([\s\S]*)$/); + return match ? match[1] : content; +} + +function rewriteLinks(content, product) { + // Only rewrite this product's own next/ links. Cross-product links are left + // alone: a latest/ page legitimately points at another product's latest/. + const escapedProduct = product.replace(/-/g, '\\-'); + const re = new RegExp(`(https?:\\/\\/\\S+)|\\/${escapedProduct}\\/next\\/`, 'g'); + return content.replace(re, (match, externalUrl) => { + if (externalUrl) return externalUrl; + return `/${product}/latest/`; + }); +} + +function allowanceFor(subPath) { + return ALLOWED.find((entry) => subPath.startsWith(entry.prefix)); +} + +function syncFile(relPath) { + relPath = relPath.replace(/^\.\//, ''); + + const nextMatch = relPath.match(/^([^/]+)\/next\/(.+)$/); + if (!nextMatch) { + console.error(`✗ ${relPath}`); + console.error(" Path must be under a product's next/ directory."); + return false; + } + + const [, product, subPath] = nextMatch; + + if (!PRODUCTS.includes(product)) { + console.error(`✗ ${relPath}`); + console.error(` Unknown product "${product}". Expected one of: ${PRODUCTS.join(', ')}`); + return false; + } + + const allowance = allowanceFor(subPath); + if (!allowance) { + console.error(`✗ ${relPath}`); + console.error(' This direction is only for pages exempt from the version freeze.'); + console.error(' latest/ documents a released version; copying next/ over it publishes'); + console.error(' content that version stamp does not cover.'); + console.error(' Currently exempt:'); + for (const entry of ALLOWED) { + console.error(` <product>/next/${entry.prefix} ${entry.reason}`); + } + console.error(' If this page belongs on that list, add it with its reason.'); + return false; + } + + const srcPath = path.join(REPO_ROOT, relPath); + const destPath = path.join(REPO_ROOT, product, 'latest', subPath); + + if (!fs.existsSync(srcPath)) { + console.error(`✗ ${relPath}`); + console.error(` File not found: ${srcPath}`); + return false; + } + + const srcContent = fs.readFileSync(srcPath, 'utf8'); + const rewrittenBody = rewriteLinks(extractBody(srcContent), product); + + let rewritten; + if (fs.existsSync(destPath)) { + // Keep latest/'s own front matter. It carries the version label a reader + // sees under the page title, which next/'s copy does not have. + rewritten = extractFrontMatter(fs.readFileSync(destPath, 'utf8')) + rewrittenBody; + } else { + rewritten = rewriteLinks(srcContent, product); + } + + const destDir = path.dirname(destPath); + if (!fs.existsSync(destDir)) { + fs.mkdirSync(destDir, { recursive: true }); + console.log(` Created directory: ${path.relative(REPO_ROOT, destDir)}`); + } + + const destExists = fs.existsSync(destPath); + fs.writeFileSync(destPath, rewritten, 'utf8'); + + console.log( + `✓ ${relPath} → ${path.relative(REPO_ROOT, destPath)} ${destExists ? '(updated)' : '(created)'}`, + ); + return true; +} + +function collectFiles(argPath) { + const absPath = path.isAbsolute(argPath) ? argPath : path.join(REPO_ROOT, argPath); + + if (!fs.existsSync(absPath)) { + console.error(`✗ Not found: ${argPath}`); + return []; + } + + if (fs.statSync(absPath).isFile()) { + return [path.relative(REPO_ROOT, absPath)]; + } + + const files = []; + (function walk(dir) { + for (const entry of fs.readdirSync(dir, { withFileTypes: true })) { + const full = path.join(dir, entry.name); + if (entry.isDirectory()) walk(full); + else if (entry.name.endsWith('.mdx')) files.push(path.relative(REPO_ROOT, full)); + } + })(absPath); + return files; +} + +function main() { + const args = process.argv.slice(2); + if (!args.length) usage(); + + const files = args.flatMap(collectFiles); + if (!files.length) { + console.error('No .mdx files found in the given paths.'); + process.exit(1); + } + + let synced = 0; + let failed = 0; + for (const file of files) { + if (syncFile(file)) synced += 1; + else failed += 1; + } + + console.log(`\nDone. ${synced} file(s) synced to latest/.${failed ? ` ${failed} refused or failed.` : ''}`); + console.log('Review the diff before committing.'); + if (failed) process.exit(1); +} + +main(); diff --git a/scripts/test-sync-direction.sh b/scripts/test-sync-direction.sh new file mode 100755 index 00000000..07060bbd --- /dev/null +++ b/scripts/test-sync-direction.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +# +# Tests that the two sync scripts refuse to run in the wrong direction. +# +# Both directions are destructive when reversed: sync-latest-to-next.js run on +# the example tutorials reverts whatever the cosmos/example bot last brought in, +# and run on the generated API reference it publishes one version's content +# under another version's stamp. Both have a REFUSED or ALLOWED list, and this +# checks the lists are wired to an actual refusal rather than a warning. +# +# Every operation here is idempotent, so a clean tree stays clean. Run it from +# the repo root with nothing uncommitted in sdk/, or the identity checks will +# compare against your own edits. +# +# bash scripts/test-sync-direction.sh + +set -uo pipefail +cd "$(dirname "$0")/.." + +pass=0; fail=0 +check() { if [ "$2" = "$3" ]; then echo " ok $1"; pass=$((pass+1)); else echo " FAIL $1 (got $2, want $3)"; fail=$((fail+1)); fi; } + +# 1. Each refused prefix: non-zero exit AND target untouched. +for p in sdk/latest/tutorials/example/05-run-and-test.mdx \ + sdk/latest/api-reference/grpc/bank.mdx \ + sdk/latest/api-reference/rest/openapi.yaml; do + t=${p/\/latest\//\/next\/} + before=$([ -f "$t" ] && md5 -q "$t" || echo none) + node scripts/sync-latest-to-next.js "$p" >/tmp/g.log 2>&1; rc=$? + after=$([ -f "$t" ] && md5 -q "$t" || echo none) + check "refuses $(basename $(dirname $p))/$(basename $p)" "$rc" "1" + check " target untouched" "$before" "$after" +done + +# 2. A .yaml is not collected by the dir walk, so test the grpc dir form too. +node scripts/sync-latest-to-next.js sdk/latest/api-reference/grpc/ >/tmp/g2.log 2>&1 +check "refuses the whole grpc dir" "$(grep -c '✗' /tmp/g2.log)" "21" + +# 3. sync-next-to-latest refuses a non-exempt page, leaves it alone. +b=$(md5 -q sdk/latest/learn/concepts/encoding.mdx) +node scripts/sync-next-to-latest.js sdk/next/learn/concepts/encoding.mdx >/tmp/g3.log 2>&1; rc=$? +check "reverse refuses non-exempt" "$rc" "1" +check " target untouched" "$b" "$(md5 -q sdk/latest/learn/concepts/encoding.mdx)" + +# 4. Reverse sync is idempotent on the exempt path. +b=$(md5 -q sdk/latest/tutorials/example/04-counter-walkthrough.mdx) +node scripts/sync-next-to-latest.js sdk/next/tutorials/example/ >/dev/null 2>&1 +check "reverse is idempotent" "$b" "$(md5 -q sdk/latest/tutorials/example/04-counter-walkthrough.mdx)" + +# 5. Link direction is actually inverted, not copied. +check "latest has no /sdk/next/ links" "$(grep -c '/sdk/next/' sdk/latest/tutorials/example/05-run-and-test.mdx)" "0" +check "next has no /sdk/latest/ links" "$(grep -c '(/sdk/latest/' sdk/next/tutorials/example/05-run-and-test.mdx)" "0" + +# 6. latest kept its own front matter (no noindex leaking in from next). +check "latest has no noindex" "$(grep -c '^noindex:' sdk/latest/tutorials/example/00-overview.mdx)" "0" +check "next kept noindex" "$(grep -c '^noindex:' sdk/next/tutorials/example/00-overview.mdx)" "1" + +echo; echo "$pass passed, $fail failed" diff --git a/scripts/versioning/CLAUDE.md b/scripts/versioning/CLAUDE.md index f0fc3646..3b29e9d0 100644 --- a/scripts/versioning/CLAUDE.md +++ b/scripts/versioning/CLAUDE.md @@ -69,6 +69,8 @@ After every freeze, add a `latest` version entry to the product's dropdown in `d The freeze script does not do any of the following. None of it is caught by `npx mint broken-links`. +**Before anything else, for the SDK: the API reference gate.** `cd scripts/api-reference && npm run release-check -- --version next --ref release/v0.<N>.x` regenerates from the release branch and executes every documented query and transaction against a chain built at that commit. It blocks the freeze. Then read the regenerated prose with the `review-generated-prose` skill. Both steps, and the reason `--ref` is not optional, are in the [`release-version`](../../.claude/skills/release-version/SKILL.md) skill, which is the authoritative runbook for a release. This file covers only what the freeze script itself does and does not do. + Order matters. Items 2 and 4 are content that lives in the pages themselves, so do them in `next/` **before** freezing and the promotion carries them into `latest/` for free. Doing them afterwards means editing `latest/` and then running `scripts/sync-latest-to-next.js` on every file touched, which is the same work twice with a chance to miss a file. Item 1 can only be done after, and item 3 must be done after because the freeze is what strips the front matter. **1. `docs.json` navigation** (after) — see the section above. diff --git a/scripts/versioning/README.md b/scripts/versioning/README.md index 6db9fc3c..4d23e3aa 100644 --- a/scripts/versioning/README.md +++ b/scripts/versioning/README.md @@ -35,6 +35,21 @@ When a new release is ready to ship, run through these steps in order. Make sure `next/` contains everything that belongs in the new release. Merge any open PRs targeting `next/`. +### 1b. Run the pre-freeze checks + +The freeze script promotes `next/` to `latest/` unchanged. It does not verify anything, so whatever is wrong in `next/` becomes published under the new version number. Several things have to happen in `next/` before you run it, and the full ordered list lives in the [`release-version`](../../.claude/skills/release-version/SKILL.md) skill, which is the authoritative runbook. The steps below are the freeze script's own mechanics. + +For the SDK specifically, the API reference has a blocking gate: + +```bash +cd scripts/api-reference +npm run release-check -- --version next --ref release/v0.<N>.x +``` + +It regenerates from the release branch, then builds a chain at that commit and executes every documented query and transaction against it. Do not freeze while it fails. The `--ref` matters: without it `next` resolves to `main`, and the freeze publishes development content under the release's version number. + +Then read the regenerated pages with the [`review-generated-prose`](../../.claude/skills/review-generated-prose/SKILL.md) skill. The gate proves the examples work; it never reads the pages as English. + ### 2. Run the freeze script ```bash diff --git a/sdk/latest/api-reference/grpc/auth.mdx b/sdk/latest/api-reference/grpc/auth.mdx new file mode 100644 index 00000000..18a0af69 --- /dev/null +++ b/sdk/latest/api-reference/grpc/auth.mdx @@ -0,0 +1,384 @@ +--- +title: "Auth" +description: "gRPC queries and transaction messages defined by the auth module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### Account + +Account returns account details based on address. + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/Account` | +| REST | `GET /cosmos/auth/v1beta1/accounts/{address}` | + +Request `QueryAccountRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | address defines the address to query for. Encoded as cosmos.AddressString. | + +Response `QueryAccountResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `account` | `Any` | account defines the account of the corresponding address. One of: `/cosmos.auth.v1beta1.BaseAccount`. | + +```bash +grpcurl -plaintext -d '{"address":"<string>"}' \ + localhost:9090 cosmos.auth.v1beta1.Query/Account +``` + +### AccountAddressByID + +AccountAddressByID returns account address based on account number. + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/AccountAddressByID` | +| REST | `GET /cosmos/auth/v1beta1/address_by_id/{accountId}` | + +Request `QueryAccountAddressByIDRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `id` | `int64` | Deprecated, use account_id instead id is the account number of the address to be queried. This field should have been an uint64 (like all account numbers), and will be updated to uint64 in a future version of the auth query. Deprecated. | +| `account_id` | `uint64` | account_id is the account number of the address to be queried. | + +Response `QueryAccountAddressByIDResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `account_address` | `string` | Encoded as cosmos.AddressString. | + +```bash +grpcurl -plaintext -d '{"account_id":"1"}' \ + localhost:9090 cosmos.auth.v1beta1.Query/AccountAddressByID +``` + +### AccountInfo + +AccountInfo queries account info which is common to all account types. + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/AccountInfo` | +| REST | `GET /cosmos/auth/v1beta1/account_info/{address}` | + +Request `QueryAccountInfoRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | address is the account address string. Encoded as cosmos.AddressString. | + +Response `QueryAccountInfoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `info` | [`BaseAccount`](#cosmos-auth-v1beta1-baseaccount) | info is the account info which is represented by BaseAccount. | + +```bash +grpcurl -plaintext -d '{"address":"<string>"}' \ + localhost:9090 cosmos.auth.v1beta1.Query/AccountInfo +``` + +### Accounts + +Accounts returns all the existing accounts. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/Accounts` | +| REST | `GET /cosmos/auth/v1beta1/accounts` | + +Request `QueryAccountsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryAccountsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `accounts` | `Any`[] | accounts are the existing accounts One of: `/cosmos.auth.v1beta1.BaseAccount`. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.auth.v1beta1.Query/Accounts +``` + +### AddressBytesToString + +AddressBytesToString converts Account Address bytes to string + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/AddressBytesToString` | +| REST | `GET /cosmos/auth/v1beta1/bech32/{addressBytes}` | + +Request `AddressBytesToStringRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address_bytes` | `bytes` | | + +Response `AddressBytesToStringResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `address_string` | `string` | | + +```bash +grpcurl -plaintext -d '{"address_bytes":""}' \ + localhost:9090 cosmos.auth.v1beta1.Query/AddressBytesToString +``` + +### AddressStringToBytes + +AddressStringToBytes converts Address string to bytes + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/AddressStringToBytes` | +| REST | `GET /cosmos/auth/v1beta1/bech32/{addressString}` | + +Request `AddressStringToBytesRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address_string` | `string` | | + +Response `AddressStringToBytesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `address_bytes` | `bytes` | | + +```bash +grpcurl -plaintext -d '{"address_string":"<string>"}' \ + localhost:9090 cosmos.auth.v1beta1.Query/AddressStringToBytes +``` + +### Bech32Prefix + +Bech32Prefix queries bech32Prefix + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/Bech32Prefix` | +| REST | `GET /cosmos/auth/v1beta1/bech32` | + +Request `Bech32PrefixRequest`: + +This message has no fields. + +Response `Bech32PrefixResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `bech32_prefix` | `string` | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.auth.v1beta1.Query/Bech32Prefix +``` + +### ModuleAccountByName + +ModuleAccountByName returns the module account info by module name + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/ModuleAccountByName` | +| REST | `GET /cosmos/auth/v1beta1/module_accounts/{name}` | + +Request `QueryModuleAccountByNameRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `name` | `string` | | + +Response `QueryModuleAccountByNameResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `account` | `Any` | One of: `/cosmos.auth.v1beta1.ModuleAccount`. | + +```bash +grpcurl -plaintext -d '{"name":"<string>"}' \ + localhost:9090 cosmos.auth.v1beta1.Query/ModuleAccountByName +``` + +### ModuleAccounts + +ModuleAccounts returns all the existing module accounts. + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/ModuleAccounts` | +| REST | `GET /cosmos/auth/v1beta1/module_accounts` | + +Request `QueryModuleAccountsRequest`: + +This message has no fields. + +Response `QueryModuleAccountsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `accounts` | `Any`[] | One of: `/cosmos.auth.v1beta1.ModuleAccount`. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.auth.v1beta1.Query/ModuleAccounts +``` + +### Params + +Params queries all parameters. + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/Params` | +| REST | `GET /cosmos/auth/v1beta1/params` | + +Request `QueryParamsRequest`: + +This message has no fields. + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `params` | [`Params`](#cosmos-auth-v1beta1-params) | params defines the parameters of the module. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.auth.v1beta1.Query/Params +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/latest/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/latest/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/latest/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### UpdateParams + +UpdateParams defines a (governance) operation for updating the x/auth module parameters. The authority defaults to the x/gov module account. + +| | | +| --- | --- | +| Type URL | `/cosmos.auth.v1beta1.MsgUpdateParams` | +| Handler | `cosmos.auth.v1beta1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/x/auth/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `params` | [`Params`](#cosmos-auth-v1beta1-params) | params defines the x/auth parameters to update. NOTE: All parameters must be supplied. | + +In a transaction: + +```json +{ + "@type": "/cosmos.auth.v1beta1.MsgUpdateParams", + "authority": "<string>", + "params": { + "max_memo_characters": "1", + "tx_sig_limit": "1", + "tx_size_cost_per_byte": "1", + "sig_verify_cost_ed25519": "1", + "sig_verify_cost_secp256k1": "1", + "sig_verify_cost_mldsa65": "1" + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.auth.v1beta1.BaseAccount + +BaseAccount defines a base account type. It contains all the necessary fields for basic account functionality. Any custom account type should extend this type for additional functionality (e.g. vesting). + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | Encoded as cosmos.AddressString. | +| `pub_key` | `Any` | | +| `account_number` | `uint64` | | +| `sequence` | `uint64` | | + +### cosmos.auth.v1beta1.Params + +Params defines the parameters for the auth module. + +| Field | Type | Description | +| --- | --- | --- | +| `max_memo_characters` | `uint64` | | +| `tx_sig_limit` | `uint64` | | +| `tx_size_cost_per_byte` | `uint64` | | +| `sig_verify_cost_ed25519` | `uint64` | | +| `sig_verify_cost_secp256k1` | `uint64` | | +| `sig_verify_cost_mldsa65` | `uint64` | | + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + + diff --git a/sdk/latest/api-reference/grpc/authz.mdx b/sdk/latest/api-reference/grpc/authz.mdx new file mode 100644 index 00000000..19bc86e5 --- /dev/null +++ b/sdk/latest/api-reference/grpc/authz.mdx @@ -0,0 +1,279 @@ +--- +title: "Authz" +description: "gRPC queries and transaction messages defined by the authz module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### GranteeGrants + +GranteeGrants returns a list of `GrantAuthorization` by grantee. + +| | | +| --- | --- | +| gRPC | `cosmos.authz.v1beta1.Query/GranteeGrants` | +| REST | `GET /cosmos/authz/v1beta1/grants/grantee/{grantee}` | + +Request `QueryGranteeGrantsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `grantee` | `string` | Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines a pagination for the request. | + +Response `QueryGranteeGrantsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `grants` | [`GrantAuthorization`](#cosmos-authz-v1beta1-grantauthorization)[] | grants is a list of grants granted to the grantee. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines a pagination for the response. | + +```bash +grpcurl -plaintext -d '{"grantee":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.authz.v1beta1.Query/GranteeGrants +``` + +### GranterGrants + +GranterGrants returns list of `GrantAuthorization`, granted by granter. + +| | | +| --- | --- | +| gRPC | `cosmos.authz.v1beta1.Query/GranterGrants` | +| REST | `GET /cosmos/authz/v1beta1/grants/granter/{granter}` | + +Request `QueryGranterGrantsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines a pagination for the request. | + +Response `QueryGranterGrantsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `grants` | [`GrantAuthorization`](#cosmos-authz-v1beta1-grantauthorization)[] | grants is a list of grants granted by the granter. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines a pagination for the response. | + +```bash +grpcurl -plaintext -d '{"granter":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.authz.v1beta1.Query/GranterGrants +``` + +### Grants + +Returns list of `Authorization`, granted to the grantee by the granter. + +| | | +| --- | --- | +| gRPC | `cosmos.authz.v1beta1.Query/Grants` | +| REST | `GET /cosmos/authz/v1beta1/grants` | + +Request `QueryGrantsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | Encoded as cosmos.AddressString. | +| `grantee` | `string` | Encoded as cosmos.AddressString. | +| `msg_type_url` | `string` | Optional, msg_type_url, when set, will query only grants matching given msg type. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines a pagination for the request. | + +Response `QueryGrantsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `grants` | [`Grant`](#cosmos-authz-v1beta1-grant)[] | authorizations is a list of grants granted for grantee by granter. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines a pagination for the response. | + +```bash +grpcurl -plaintext -d '{"granter":"<string>","grantee":"<string>","msg_type_url":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.authz.v1beta1.Query/Grants +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/latest/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/latest/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/latest/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### Exec + +Exec attempts to execute the provided messages using authorizations granted to the grantee. Each message should have only one signer corresponding to the granter of the authorization. + +| | | +| --- | --- | +| Type URL | `/cosmos.authz.v1beta1.MsgExec` | +| Handler | `cosmos.authz.v1beta1.Msg/Exec` | +| Signer | `grantee` | +| Amino name | `cosmos-sdk/MsgExec` | + +| Field | Type | Description | +| --- | --- | --- | +| `grantee` | `string` | Encoded as cosmos.AddressString. | +| `msgs` | `Any`[] | Execute Msg. The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) triple and validate it. Accepts any message implementing cosmos.base.v1beta1.Msg. | + +In a transaction: + +```json +{ + "@type": "/cosmos.authz.v1beta1.MsgExec", + "grantee": "<string>", + "msgs": [ + { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + } + ] +} +``` + +Response `MsgExecResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `results` | `bytes`[] | | + +### Grant + +Grant grants the provided authorization to the grantee on the granter's account with the provided expiration time. If there is already a grant for the given (granter, grantee, Authorization) triple, then the grant will be overwritten. + +| | | +| --- | --- | +| Type URL | `/cosmos.authz.v1beta1.MsgGrant` | +| Handler | `cosmos.authz.v1beta1.Msg/Grant` | +| Signer | `granter` | +| Amino name | `cosmos-sdk/MsgGrant` | + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | Encoded as cosmos.AddressString. | +| `grantee` | `string` | Encoded as cosmos.AddressString. | +| `grant` | [`Grant`](#cosmos-authz-v1beta1-grant) | | + +In a transaction: + +```json +{ + "@type": "/cosmos.authz.v1beta1.MsgGrant", + "granter": "<string>", + "grantee": "<string>", + "grant": { + "authorization": { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + }, + "expiration": "<RFC 3339 timestamp>" + } +} +``` + +Response `MsgGrantResponse`: + +This message has no fields. + +### Revoke + +Revoke revokes any authorization corresponding to the provided method name on the granter's account that has been granted to the grantee. + +| | | +| --- | --- | +| Type URL | `/cosmos.authz.v1beta1.MsgRevoke` | +| Handler | `cosmos.authz.v1beta1.Msg/Revoke` | +| Signer | `granter` | +| Amino name | `cosmos-sdk/MsgRevoke` | + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | Encoded as cosmos.AddressString. | +| `grantee` | `string` | Encoded as cosmos.AddressString. | +| `msg_type_url` | `string` | | + +In a transaction: + +```json +{ + "@type": "/cosmos.authz.v1beta1.MsgRevoke", + "granter": "<string>", + "grantee": "<string>", + "msg_type_url": "<string>" +} +``` + +Response `MsgRevokeResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.authz.v1beta1.Grant + +Grant gives permissions to execute the provide method with expiration time. + +| Field | Type | Description | +| --- | --- | --- | +| `authorization` | `Any` | One of: `/cosmos.authz.v1beta1.GenericAuthorization`, `/cosmos.bank.v1beta1.SendAuthorization`, `/cosmos.staking.v1beta1.StakeAuthorization`. | +| `expiration` | `Timestamp` | time when the grant will expire and will be pruned. If null, then the grant doesn't have a time expiration (other conditions in `authorization` may apply to invalidate the grant) | + +### cosmos.authz.v1beta1.GrantAuthorization + +GrantAuthorization extends a grant with both the addresses of the grantee and granter. It is used in genesis.proto and query.proto + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | Encoded as cosmos.AddressString. | +| `grantee` | `string` | Encoded as cosmos.AddressString. | +| `authorization` | `Any` | One of: `/cosmos.authz.v1beta1.GenericAuthorization`, `/cosmos.bank.v1beta1.SendAuthorization`, `/cosmos.staking.v1beta1.StakeAuthorization`. | +| `expiration` | `Timestamp` | | + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + + diff --git a/sdk/latest/api-reference/grpc/autocli.mdx b/sdk/latest/api-reference/grpc/autocli.mdx new file mode 100644 index 00000000..286749ae --- /dev/null +++ b/sdk/latest/api-reference/grpc/autocli.mdx @@ -0,0 +1,48 @@ +--- +title: "Autocli" +description: "gRPC queries and transaction messages defined by the autocli module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### AppOptions + +AppOptions returns the autocli options for all of the modules in an app. + +| | | +| --- | --- | +| gRPC | `cosmos.autocli.v1.Query/AppOptions` | + +Request `AppOptionsRequest`: + +This message has no fields. + +Response `AppOptionsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `module_options` | `map<string, ModuleOptions>` | module_options is a map of module name to autocli module options. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.autocli.v1.Query/AppOptions +``` + diff --git a/sdk/latest/api-reference/grpc/bank.mdx b/sdk/latest/api-reference/grpc/bank.mdx new file mode 100644 index 00000000..fd8354ca --- /dev/null +++ b/sdk/latest/api-reference/grpc/bank.mdx @@ -0,0 +1,673 @@ +--- +title: "Bank" +description: "gRPC queries and transaction messages defined by the bank module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### AllBalances + +AllBalances queries the balance of all coins for a single account. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/AllBalances` | +| REST | `GET /cosmos/bank/v1beta1/balances/{address}` | + +Request `QueryAllBalancesRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | address is the address to query balances for. Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | +| `resolve_denom` | `bool` | resolve_denom is the flag to resolve the denom into a human-readable form from the metadata. | + +Response `QueryAllBalancesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `balances` | [`Coin`](#cosmos-base-v1beta1-coin)[] | balances is the balances of all the coins. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"address":"<string>","pagination":{"limit":"1"},"resolve_denom":false}' \ + localhost:9090 cosmos.bank.v1beta1.Query/AllBalances +``` + +### Balance + +Balance queries the balance of a single coin for a single account. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/Balance` | +| REST | `GET /cosmos/bank/v1beta1/balances/{address}/by_denom` | + +Request `QueryBalanceRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | address is the address to query balances for. Encoded as cosmos.AddressString. | +| `denom` | `string` | denom is the coin denom to query balances for. | + +Response `QueryBalanceResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `balance` | [`Coin`](#cosmos-base-v1beta1-coin) | balance is the balance of the coin. | + +```bash +grpcurl -plaintext -d '{"address":"<string>","denom":"<string>"}' \ + localhost:9090 cosmos.bank.v1beta1.Query/Balance +``` + +### DenomMetadata + +DenomMetadata queries the client metadata of a given coin denomination. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/DenomMetadata` | +| REST | `GET /cosmos/bank/v1beta1/denoms_metadata/{denom}` | + +Request `QueryDenomMetadataRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | denom is the coin denom to query the metadata for. | + +Response `QueryDenomMetadataResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `metadata` | [`Metadata`](#cosmos-bank-v1beta1-metadata) | metadata describes and provides all the client information for the requested token. | + +```bash +grpcurl -plaintext -d '{"denom":"<string>"}' \ + localhost:9090 cosmos.bank.v1beta1.Query/DenomMetadata +``` + +### DenomMetadataByQueryString + +DenomMetadataByQueryString queries the client metadata of a given coin denomination. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/DenomMetadataByQueryString` | +| REST | `GET /cosmos/bank/v1beta1/denoms_metadata_by_query_string` | + +Request `QueryDenomMetadataByQueryStringRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | denom is the coin denom to query the metadata for. | + +Response `QueryDenomMetadataByQueryStringResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `metadata` | [`Metadata`](#cosmos-bank-v1beta1-metadata) | metadata describes and provides all the client information for the requested token. | + +```bash +grpcurl -plaintext -d '{"denom":"<string>"}' \ + localhost:9090 cosmos.bank.v1beta1.Query/DenomMetadataByQueryString +``` + +### DenomOwners + +DenomOwners queries for all account addresses that own a particular token denomination. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/DenomOwners` | +| REST | `GET /cosmos/bank/v1beta1/denom_owners/{denom}` | + +Request `QueryDenomOwnersRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | denom defines the coin denomination to query all account holders for. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDenomOwnersResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `denom_owners` | [`DenomOwner`](#cosmos-bank-v1beta1-denomowner)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"denom":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.bank.v1beta1.Query/DenomOwners +``` + +### DenomOwnersByQuery + +DenomOwnersByQuery queries for all account addresses that own a particular token denomination. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/DenomOwnersByQuery` | +| REST | `GET /cosmos/bank/v1beta1/denom_owners_by_query` | + +Request `QueryDenomOwnersByQueryRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | denom defines the coin denomination to query all account holders for. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDenomOwnersByQueryResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `denom_owners` | [`DenomOwner`](#cosmos-bank-v1beta1-denomowner)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"denom":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.bank.v1beta1.Query/DenomOwnersByQuery +``` + +### DenomsMetadata + +DenomsMetadata queries the client metadata for all registered coin denominations. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/DenomsMetadata` | +| REST | `GET /cosmos/bank/v1beta1/denoms_metadata` | + +Request `QueryDenomsMetadataRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDenomsMetadataResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `metadatas` | [`Metadata`](#cosmos-bank-v1beta1-metadata)[] | metadata provides the client information for all the registered tokens. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.bank.v1beta1.Query/DenomsMetadata +``` + +### Params + +Params queries the parameters of x/bank module. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/Params` | +| REST | `GET /cosmos/bank/v1beta1/params` | + +Request `QueryParamsRequest`: + +This message has no fields. + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `params` | [`Params`](#cosmos-bank-v1beta1-params) | params provides the parameters of the bank module. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.bank.v1beta1.Query/Params +``` + +### SendEnabled + +SendEnabled queries for SendEnabled entries. + +This query only returns denominations that have specific SendEnabled settings. Any denomination that does not have a specific setting will use the default params.default_send_enabled, and will not be returned by this query. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/SendEnabled` | +| REST | `GET /cosmos/bank/v1beta1/send_enabled` | + +Request `QuerySendEnabledRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `denoms` | `string`[] | denoms is the specific denoms you want look up. Leave empty to get all entries. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. This field is only read if the denoms field is empty. | + +Response `QuerySendEnabledResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `send_enabled` | [`SendEnabled`](#cosmos-bank-v1beta1-sendenabled)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. This field is only populated if the denoms field in the request is empty. | + +```bash +grpcurl -plaintext -d '{"denoms":["<string>"],"pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.bank.v1beta1.Query/SendEnabled +``` + +### SpendableBalanceByDenom + +SpendableBalanceByDenom queries the spendable balance of a single denom for a single account. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/SpendableBalanceByDenom` | +| REST | `GET /cosmos/bank/v1beta1/spendable_balances/{address}/by_denom` | + +Request `QuerySpendableBalanceByDenomRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | address is the address to query balances for. Encoded as cosmos.AddressString. | +| `denom` | `string` | denom is the coin denom to query balances for. | + +Response `QuerySpendableBalanceByDenomResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `balance` | [`Coin`](#cosmos-base-v1beta1-coin) | balance is the balance of the coin. | + +```bash +grpcurl -plaintext -d '{"address":"<string>","denom":"<string>"}' \ + localhost:9090 cosmos.bank.v1beta1.Query/SpendableBalanceByDenom +``` + +### SpendableBalances + +SpendableBalances queries the spendable balance of all coins for a single account. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/SpendableBalances` | +| REST | `GET /cosmos/bank/v1beta1/spendable_balances/{address}` | + +Request `QuerySpendableBalancesRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | address is the address to query spendable balances for. Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QuerySpendableBalancesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `balances` | [`Coin`](#cosmos-base-v1beta1-coin)[] | balances is the spendable balances of all the coins. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"address":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.bank.v1beta1.Query/SpendableBalances +``` + +### SupplyOf + +SupplyOf queries the supply of a single coin. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/SupplyOf` | +| REST | `GET /cosmos/bank/v1beta1/supply/by_denom` | + +Request `QuerySupplyOfRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | denom is the coin denom to query balances for. | + +Response `QuerySupplyOfResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin) | amount is the supply of the coin. | + +```bash +grpcurl -plaintext -d '{"denom":"<string>"}' \ + localhost:9090 cosmos.bank.v1beta1.Query/SupplyOf +``` + +### TotalSupply + +TotalSupply queries the total supply of all coins. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/TotalSupply` | +| REST | `GET /cosmos/bank/v1beta1/supply` | + +Request `QueryTotalSupplyRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryTotalSupplyResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `supply` | [`Coin`](#cosmos-base-v1beta1-coin)[] | supply is the supply of the coins | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.bank.v1beta1.Query/TotalSupply +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/latest/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/latest/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/latest/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### MultiSend + +MultiSend defines a method for sending coins from some accounts to other accounts. + +| | | +| --- | --- | +| Type URL | `/cosmos.bank.v1beta1.MsgMultiSend` | +| Handler | `cosmos.bank.v1beta1.Msg/MultiSend` | +| Signer | `inputs` | +| Amino name | `cosmos-sdk/MsgMultiSend` | + +| Field | Type | Description | +| --- | --- | --- | +| `inputs` | [`Input`](#cosmos-bank-v1beta1-input)[] | Inputs, despite being `repeated`, only allows one sender input. This is checked in MsgMultiSend's ValidateBasic. | +| `outputs` | [`Output`](#cosmos-bank-v1beta1-output)[] | | + +In a transaction: + +```json +{ + "@type": "/cosmos.bank.v1beta1.MsgMultiSend", + "inputs": [ + { + "address": "<string>", + "coins": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] + } + ], + "outputs": [ + { + "address": "<string>", + "coins": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] + } + ] +} +``` + +Response `MsgMultiSendResponse`: + +This message has no fields. + +### Send + +Send defines a method for sending coins from one account to another account. + +| | | +| --- | --- | +| Type URL | `/cosmos.bank.v1beta1.MsgSend` | +| Handler | `cosmos.bank.v1beta1.Msg/Send` | +| Signer | `from_address` | +| Amino name | `cosmos-sdk/MsgSend` | + +| Field | Type | Description | +| --- | --- | --- | +| `from_address` | `string` | Encoded as cosmos.AddressString. | +| `to_address` | `string` | Encoded as cosmos.AddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +In a transaction: + +```json +{ + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "<string>", + "to_address": "<string>", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] +} +``` + +Response `MsgSendResponse`: + +This message has no fields. + +### SetSendEnabled + +SetSendEnabled is a governance operation for setting the SendEnabled flag on any number of Denoms. Only the entries to add or update should be included. Entries that already exist in the store, but that aren't included in this message, will be left unchanged. + +| | | +| --- | --- | +| Type URL | `/cosmos.bank.v1beta1.MsgSetSendEnabled` | +| Handler | `cosmos.bank.v1beta1.Msg/SetSendEnabled` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/MsgSetSendEnabled` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module. Encoded as cosmos.AddressString. | +| `send_enabled` | [`SendEnabled`](#cosmos-bank-v1beta1-sendenabled)[] | send_enabled is the list of entries to add or update. | +| `use_default_for` | `string`[] | use_default_for is a list of denoms that should use the params.default_send_enabled value. Denoms listed here will have their SendEnabled entries deleted. If a denom is included that doesn't have a SendEnabled entry, it will be ignored. | + +In a transaction: + +```json +{ + "@type": "/cosmos.bank.v1beta1.MsgSetSendEnabled", + "authority": "<string>", + "send_enabled": [ + { + "denom": "<string>", + "enabled": false + } + ], + "use_default_for": [ + "<string>" + ] +} +``` + +Response `MsgSetSendEnabledResponse`: + +This message has no fields. + +### UpdateParams + +UpdateParams defines a governance operation for updating the x/bank module parameters. The authority is defined in the keeper. + +| | | +| --- | --- | +| Type URL | `/cosmos.bank.v1beta1.MsgUpdateParams` | +| Handler | `cosmos.bank.v1beta1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/x/bank/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `params` | [`Params`](#cosmos-bank-v1beta1-params) | params defines the x/bank parameters to update. NOTE: All parameters must be supplied. | + +In a transaction: + +```json +{ + "@type": "/cosmos.bank.v1beta1.MsgUpdateParams", + "authority": "<string>", + "params": { + "default_send_enabled": false + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.bank.v1beta1.DenomOwner + +DenomOwner defines structure representing an account that owns or holds a particular denominated token. It contains the account address and account balance of the denominated token. + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | address defines the address that owns a particular denomination. Encoded as cosmos.AddressString. | +| `balance` | [`Coin`](#cosmos-base-v1beta1-coin) | balance is the balance of the denominated coin for an account. | + +### cosmos.bank.v1beta1.DenomUnit + +DenomUnit represents a struct that describes a given denomination unit of the basic token. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | denom represents the string name of the given denom unit (e.g uatom). | +| `exponent` | `uint32` | exponent represents power of 10 exponent that one must raise the base_denom to in order to equal the given DenomUnit's denom 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom). | +| `aliases` | `string`[] | aliases is a list of string aliases for the given denom | + +### cosmos.bank.v1beta1.Input + +Input models transaction input. + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | Encoded as cosmos.AddressString. | +| `coins` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +### cosmos.bank.v1beta1.Metadata + +Metadata represents a struct that describes a basic token. + +| Field | Type | Description | +| --- | --- | --- | +| `description` | `string` | | +| `denom_units` | [`DenomUnit`](#cosmos-bank-v1beta1-denomunit)[] | denom_units represents the list of DenomUnit's for a given coin | +| `base` | `string` | base represents the base denom (should be the DenomUnit with exponent = 0). | +| `display` | `string` | display indicates the suggested denom that should be displayed in clients. | +| `name` | `string` | name defines the name of the token (eg: Cosmos Atom) | +| `symbol` | `string` | symbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display. | +| `uri` | `string` | URI to a document (on or off-chain) that contains additional information. Optional. | +| `uri_hash` | `string` | URIHash is a sha256 hash of a document pointed by URI. It's used to verify that the document didn't change. Optional. | + +### cosmos.bank.v1beta1.Output + +Output models transaction outputs. + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | Encoded as cosmos.AddressString. | +| `coins` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +### cosmos.bank.v1beta1.Params + +Params defines the parameters for the bank module. + +| Field | Type | Description | +| --- | --- | --- | +| `send_enabled` | [`SendEnabled`](#cosmos-bank-v1beta1-sendenabled)[] | Deprecated: Use of SendEnabled in params is deprecated. For genesis, use the newly added send_enabled field in the genesis object. Storage, lookup, and manipulation of this information is now in the keeper. As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files. Deprecated. | +| `default_send_enabled` | `bool` | | + +### cosmos.bank.v1beta1.SendEnabled + +SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `enabled` | `bool` | | + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.base.v1beta1.Coin + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `amount` | `string` | Encoded as cosmos.Int. | + + diff --git a/sdk/latest/api-reference/grpc/base.mdx b/sdk/latest/api-reference/grpc/base.mdx new file mode 100644 index 00000000..f87c6ff0 --- /dev/null +++ b/sdk/latest/api-reference/grpc/base.mdx @@ -0,0 +1,771 @@ +--- +title: "Base" +description: "gRPC queries and transaction messages defined by the base module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +## cosmos.base.node.v1beta1.Service + +Service defines the gRPC querier service for node related queries. + +### Config + +Config queries for the operator configuration. + +| | | +| --- | --- | +| gRPC | `cosmos.base.node.v1beta1.Service/Config` | +| REST | `GET /cosmos/base/node/v1beta1/config` | + +Request `ConfigRequest`: + +This message has no fields. + +Response `ConfigResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `minimum_gas_price` | `string` | | +| `pruning_keep_recent` | `string` | | +| `pruning_interval` | `string` | | +| `halt_height` | `uint64` | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.node.v1beta1.Service/Config +``` + +### Status + +Status queries for the node status. + +| | | +| --- | --- | +| gRPC | `cosmos.base.node.v1beta1.Service/Status` | +| REST | `GET /cosmos/base/node/v1beta1/status` | + +Request `StatusRequest`: + +This message has no fields. + +Response `StatusResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `earliest_store_height` | `uint64` | | +| `height` | `uint64` | | +| `timestamp` | `Timestamp` | | +| `app_hash` | `bytes` | | +| `validator_hash` | `bytes` | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.node.v1beta1.Service/Status +``` + +## cosmos.base.reflection.v1beta1.ReflectionService + +ReflectionService defines a service for interface reflection. + +### ListAllInterfaces + +ListAllInterfaces lists all the interfaces registered in the interface registry. + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces` | +| REST | `GET /cosmos/base/reflection/v1beta1/interfaces` | + +Request `ListAllInterfacesRequest`: + +This message has no fields. + +Response `ListAllInterfacesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `interface_names` | `string`[] | interface_names is an array of all the registered interfaces. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces +``` + +### ListImplementations + +ListImplementations list all the concrete types that implement a given interface. + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations` | +| REST | `GET /cosmos/base/reflection/v1beta1/interfaces/{interfaceName}/implementations` | + +Request `ListImplementationsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `interface_name` | `string` | interface_name defines the interface to query the implementations for. | + +Response `ListImplementationsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `implementation_message_names` | `string`[] | | + +```bash +grpcurl -plaintext -d '{"interface_name":"<string>"}' \ + localhost:9090 cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations +``` + +## cosmos.base.reflection.v2alpha1.ReflectionService + +ReflectionService defines a service for application reflection. + +### GetAuthnDescriptor + +GetAuthnDescriptor returns information on how to authenticate transactions in the application NOTE: this RPC is still experimental and might be subject to breaking changes or removal in future releases of the cosmos-sdk. + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor` | +| REST | `GET /cosmos/base/reflection/v1beta1/app_descriptor/authn` | + +Request `GetAuthnDescriptorRequest`: + +This message has no fields. + +Response `GetAuthnDescriptorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `authn` | [`AuthnDescriptor`](#cosmos-base-reflection-v2alpha1-authndescriptor) | authn describes how to authenticate to the application when sending transactions | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor +``` + +### GetChainDescriptor + +GetChainDescriptor returns the description of the chain + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor` | +| REST | `GET /cosmos/base/reflection/v1beta1/app_descriptor/chain` | + +Request `GetChainDescriptorRequest`: + +This message has no fields. + +Response `GetChainDescriptorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `chain` | [`ChainDescriptor`](#cosmos-base-reflection-v2alpha1-chaindescriptor) | chain describes application chain information | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor +``` + +### GetCodecDescriptor + +GetCodecDescriptor returns the descriptor of the codec of the application + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor` | +| REST | `GET /cosmos/base/reflection/v1beta1/app_descriptor/codec` | + +Request `GetCodecDescriptorRequest`: + +This message has no fields. + +Response `GetCodecDescriptorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `codec` | [`CodecDescriptor`](#cosmos-base-reflection-v2alpha1-codecdescriptor) | codec describes the application codec such as registered interfaces and implementations | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor +``` + +### GetConfigurationDescriptor + +GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor` | +| REST | `GET /cosmos/base/reflection/v1beta1/app_descriptor/configuration` | + +Request `GetConfigurationDescriptorRequest`: + +This message has no fields. + +Response `GetConfigurationDescriptorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `config` | [`ConfigurationDescriptor`](#cosmos-base-reflection-v2alpha1-configurationdescriptor) | config describes the application's sdk.Config | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor +``` + +### GetQueryServicesDescriptor + +GetQueryServicesDescriptor returns the available gRPC queryable services of the application + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor` | +| REST | `GET /cosmos/base/reflection/v1beta1/app_descriptor/query_services` | + +Request `GetQueryServicesDescriptorRequest`: + +This message has no fields. + +Response `GetQueryServicesDescriptorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `queries` | [`QueryServicesDescriptor`](#cosmos-base-reflection-v2alpha1-queryservicesdescriptor) | queries provides information on the available queryable services | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor +``` + +### GetTxDescriptor + +GetTxDescriptor returns information on the used transaction object and available msgs that can be used + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor` | +| REST | `GET /cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor` | + +Request `GetTxDescriptorRequest`: + +This message has no fields. + +Response `GetTxDescriptorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx` | [`TxDescriptor`](#cosmos-base-reflection-v2alpha1-txdescriptor) | tx provides information on msgs that can be forwarded to the application alongside the accepted transaction protobuf type | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor +``` + +## cosmos.base.tendermint.v1beta1.Service + +Service defines the gRPC querier service for tendermint queries. + +### ABCIQuery + +ABCIQuery defines a query handler that supports ABCI queries directly to the application, bypassing Tendermint completely. The ABCI query must contain a valid and supported path, including app, custom, p2p, and store. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/ABCIQuery` | +| REST | `GET /cosmos/base/tendermint/v1beta1/abci_query` | + +Request `ABCIQueryRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `data` | `bytes` | | +| `path` | `string` | | +| `height` | `int64` | | +| `prove` | `bool` | | + +Response `ABCIQueryResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `code` | `uint32` | | +| `log` | `string` | | +| `info` | `string` | | +| `index` | `int64` | | +| `key` | `bytes` | | +| `value` | `bytes` | | +| `proof_ops` | [`ProofOps`](#cosmos-base-tendermint-v1beta1-proofops) | | +| `height` | `int64` | | +| `codespace` | `string` | | + +```bash +grpcurl -plaintext -d '{"data":"","path":"<string>","height":"1","prove":false}' \ + localhost:9090 cosmos.base.tendermint.v1beta1.Service/ABCIQuery +``` + +### GetBlockByHeight + +GetBlockByHeight queries block for given height. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight` | +| REST | `GET /cosmos/base/tendermint/v1beta1/blocks/{height}` | + +Request `GetBlockByHeightRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | | + +Response `GetBlockByHeightResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `block_id` | `BlockID` | | +| `block` | `Block` | Deprecated: please use `sdk_block` instead | +| `sdk_block` | [`Block`](#cosmos-base-tendermint-v1beta1-block) | | + +```bash +grpcurl -plaintext -d '{"height":"1"}' \ + localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight +``` + +### GetBlockResults + +GetBlockResults queries block results for given height. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetBlockResults` | +| REST | `GET /cosmos/base/tendermint/v1beta1/block_results/{height}` | + +Request `GetBlockResultsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | | + +Response `GetBlockResultsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | height is the block height. | +| `txs_results` | `ExecTxResult`[] | txs_results contains the results of each transaction execution. | +| `finalize_block_events` | `Event`[] | finalize_block_events contains consensus-level events emitted during block finalization, including slashing, jailing, and validator set updates. | +| `validator_updates` | `ValidatorUpdate`[] | validator_updates contains the validator updates for this block. | +| `consensus_param_updates` | `ConsensusParams` | consensus_param_updates contains any consensus parameter updates for this block. | +| `app_hash` | `bytes` | app_hash is the app hash after processing this block. | + +```bash +grpcurl -plaintext -d '{"height":"1"}' \ + localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetBlockResults +``` + +### GetLatestBlock + +GetLatestBlock returns the latest block. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetLatestBlock` | +| REST | `GET /cosmos/base/tendermint/v1beta1/blocks/latest` | + +Request `GetLatestBlockRequest`: + +This message has no fields. + +Response `GetLatestBlockResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `block_id` | `BlockID` | | +| `block` | `Block` | Deprecated: please use `sdk_block` instead | +| `sdk_block` | [`Block`](#cosmos-base-tendermint-v1beta1-block) | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetLatestBlock +``` + +### GetLatestBlockResults + +GetLatestBlockResults returns the block results for the latest block. Block results contain finalize_block_events which include consensus-level events like slashing, jailing, and validator set updates. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetLatestBlockResults` | +| REST | `GET /cosmos/base/tendermint/v1beta1/block_results/latest` | + +Request `GetLatestBlockResultsRequest`: + +This message has no fields. + +Response `GetLatestBlockResultsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | height is the block height. | +| `txs_results` | `ExecTxResult`[] | txs_results contains the results of each transaction execution. | +| `finalize_block_events` | `Event`[] | finalize_block_events contains consensus-level events emitted during block finalization, including slashing, jailing, and validator set updates. | +| `validator_updates` | `ValidatorUpdate`[] | validator_updates contains the validator updates for this block. | +| `consensus_param_updates` | `ConsensusParams` | consensus_param_updates contains any consensus parameter updates for this block. | +| `app_hash` | `bytes` | app_hash is the app hash after processing this block. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetLatestBlockResults +``` + +### GetLatestValidatorSet + +GetLatestValidatorSet queries latest validator-set. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet` | +| REST | `GET /cosmos/base/tendermint/v1beta1/validatorsets/latest` | + +Request `GetLatestValidatorSetRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an pagination for the request. | + +Response `GetLatestValidatorSetResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `block_height` | `int64` | | +| `validators` | [`Validator`](#cosmos-base-tendermint-v1beta1-validator)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines an pagination for the response. | + +```bash +grpcurl -plaintext -d '{"pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet +``` + +### GetNodeInfo + +GetNodeInfo queries the current node info. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetNodeInfo` | +| REST | `GET /cosmos/base/tendermint/v1beta1/node_info` | + +Request `GetNodeInfoRequest`: + +This message has no fields. + +Response `GetNodeInfoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `default_node_info` | `DefaultNodeInfo` | | +| `application_version` | [`VersionInfo`](#cosmos-base-tendermint-v1beta1-versioninfo) | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetNodeInfo +``` + +### GetSyncing + +GetSyncing queries node syncing. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetSyncing` | +| REST | `GET /cosmos/base/tendermint/v1beta1/syncing` | + +Request `GetSyncingRequest`: + +This message has no fields. + +Response `GetSyncingResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `syncing` | `bool` | | +| `earliest_block_height` | `int64` | earliest_block_height is the earliest block height available on this node. | +| `latest_block_height` | `int64` | latest_block_height is the latest block height available on this node. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetSyncing +``` + +### GetValidatorSetByHeight + +GetValidatorSetByHeight queries validator-set at a given height. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight` | +| REST | `GET /cosmos/base/tendermint/v1beta1/validatorsets/{height}` | + +Request `GetValidatorSetByHeightRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an pagination for the request. | + +Response `GetValidatorSetByHeightResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `block_height` | `int64` | | +| `validators` | [`Validator`](#cosmos-base-tendermint-v1beta1-validator)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines an pagination for the response. | + +```bash +grpcurl -plaintext -d '{"height":"1","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight +``` + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.base.reflection.v2alpha1.AuthnDescriptor + +AuthnDescriptor provides information on how to sign transactions without relying on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures + +| Field | Type | Description | +| --- | --- | --- | +| `sign_modes` | [`SigningModeDescriptor`](#cosmos-base-reflection-v2alpha1-signingmodedescriptor)[] | sign_modes defines the supported signature algorithm | + +### cosmos.base.reflection.v2alpha1.ChainDescriptor + +ChainDescriptor describes chain information of the application + +| Field | Type | Description | +| --- | --- | --- | +| `id` | `string` | id is the chain id | + +### cosmos.base.reflection.v2alpha1.CodecDescriptor + +CodecDescriptor describes the registered interfaces and provides metadata information on the types + +| Field | Type | Description | +| --- | --- | --- | +| `interfaces` | [`InterfaceDescriptor`](#cosmos-base-reflection-v2alpha1-interfacedescriptor)[] | interfaces is a list of the registered interfaces descriptors | + +### cosmos.base.reflection.v2alpha1.ConfigurationDescriptor + +ConfigurationDescriptor contains metadata information on the sdk.Config + +| Field | Type | Description | +| --- | --- | --- | +| `bech32_account_address_prefix` | `string` | bech32_account_address_prefix is the account address prefix | + +### cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor + +InterfaceAcceptingMessageDescriptor describes a protobuf message which contains an interface represented as a google.protobuf.Any + +| Field | Type | Description | +| --- | --- | --- | +| `fullname` | `string` | fullname is the protobuf fullname of the type containing the interface | +| `field_descriptor_names` | `string`[] | field_descriptor_names is a list of the protobuf name (not fullname) of the field which contains the interface as google.protobuf.Any (the interface is the same, but it can be in multiple fields of the same proto message) | + +### cosmos.base.reflection.v2alpha1.InterfaceDescriptor + +InterfaceDescriptor describes the implementation of an interface + +| Field | Type | Description | +| --- | --- | --- | +| `fullname` | `string` | fullname is the name of the interface | +| `interface_accepting_messages` | [`InterfaceAcceptingMessageDescriptor`](#cosmos-base-reflection-v2alpha1-interfaceacceptingmessagedescriptor)[] | interface_accepting_messages contains information regarding the proto messages which contain the interface as google.protobuf.Any field | +| `interface_implementers` | [`InterfaceImplementerDescriptor`](#cosmos-base-reflection-v2alpha1-interfaceimplementerdescriptor)[] | interface_implementers is a list of the descriptors of the interface implementers | + +### cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor + +InterfaceImplementerDescriptor describes an interface implementer + +| Field | Type | Description | +| --- | --- | --- | +| `fullname` | `string` | fullname is the protobuf queryable name of the interface implementer | +| `type_url` | `string` | type_url defines the type URL used when marshalling the type as any this is required so we can provide type safe google.protobuf.Any marshalling and unmarshalling, making sure that we don't accept just 'any' type in our interface fields | + +### cosmos.base.reflection.v2alpha1.MsgDescriptor + +MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction + +| Field | Type | Description | +| --- | --- | --- | +| `msg_type_url` | `string` | msg_type_url contains the TypeURL of a sdk.Msg. | + +### cosmos.base.reflection.v2alpha1.QueryMethodDescriptor + +QueryMethodDescriptor describes a queryable method of a query service no other info is provided beside method name and tendermint queryable path because it would be redundant with the grpc reflection service + +| Field | Type | Description | +| --- | --- | --- | +| `name` | `string` | name is the protobuf name (not fullname) of the method | +| `full_query_path` | `string` | full_query_path is the path that can be used to query this method via tendermint abci.Query | + +### cosmos.base.reflection.v2alpha1.QueryServiceDescriptor + +QueryServiceDescriptor describes a cosmos-sdk queryable service + +| Field | Type | Description | +| --- | --- | --- | +| `fullname` | `string` | fullname is the protobuf fullname of the service descriptor | +| `is_module` | `bool` | is_module describes if this service is actually exposed by an application's module | +| `methods` | [`QueryMethodDescriptor`](#cosmos-base-reflection-v2alpha1-querymethoddescriptor)[] | methods provides a list of query service methods | + +### cosmos.base.reflection.v2alpha1.QueryServicesDescriptor + +QueryServicesDescriptor contains the list of cosmos-sdk queryable services + +| Field | Type | Description | +| --- | --- | --- | +| `query_services` | [`QueryServiceDescriptor`](#cosmos-base-reflection-v2alpha1-queryservicedescriptor)[] | query_services is a list of cosmos-sdk QueryServiceDescriptor | + +### cosmos.base.reflection.v2alpha1.SigningModeDescriptor + +SigningModeDescriptor provides information on a signing flow of the application NOTE(fdymylja): here we could go as far as providing an entire flow on how to sign a message given a SigningModeDescriptor, but it's better to think about this another time + +| Field | Type | Description | +| --- | --- | --- | +| `name` | `string` | name defines the unique name of the signing mode | +| `number` | `int32` | number is the unique int32 identifier for the sign_mode enum | +| `authn_info_provider_method_fullname` | `string` | authn_info_provider_method_fullname defines the fullname of the method to call to get the metadata required to authenticate using the provided sign_modes | + +### cosmos.base.reflection.v2alpha1.TxDescriptor + +TxDescriptor describes the accepted transaction type + +| Field | Type | Description | +| --- | --- | --- | +| `fullname` | `string` | fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type) it is not meant to support polymorphism of transaction types, it is supposed to be used by reflection clients to understand if they can handle a specific transaction type in an application. | +| `msgs` | [`MsgDescriptor`](#cosmos-base-reflection-v2alpha1-msgdescriptor)[] | msgs lists the accepted application messages (sdk.Msg) | + +### cosmos.base.tendermint.v1beta1.Block + +Block is tendermint type Block, with the Header proposer address field converted to bech32 string. + +| Field | Type | Description | +| --- | --- | --- | +| `header` | [`Header`](#cosmos-base-tendermint-v1beta1-header) | | +| `data` | `Data` | | +| `evidence` | `EvidenceList` | | +| `last_commit` | `Commit` | | + +### cosmos.base.tendermint.v1beta1.Header + +Header defines the structure of a Tendermint block header. + +| Field | Type | Description | +| --- | --- | --- | +| `version` | `Consensus` | basic block info | +| `chain_id` | `string` | | +| `height` | `int64` | | +| `time` | `Timestamp` | | +| `last_block_id` | `BlockID` | prev block info | +| `last_commit_hash` | `bytes` | hashes of block data | +| `data_hash` | `bytes` | | +| `validators_hash` | `bytes` | hashes from the app output from the prev block | +| `next_validators_hash` | `bytes` | | +| `consensus_hash` | `bytes` | | +| `app_hash` | `bytes` | | +| `last_results_hash` | `bytes` | | +| `evidence_hash` | `bytes` | consensus info | +| `proposer_address` | `string` | proposer_address is the original block proposer address, formatted as a Bech32 string. In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string for better UX. | + +### cosmos.base.tendermint.v1beta1.Module + +Module is the type for VersionInfo + +| Field | Type | Description | +| --- | --- | --- | +| `path` | `string` | module path | +| `version` | `string` | module version | +| `sum` | `string` | checksum | + +### cosmos.base.tendermint.v1beta1.ProofOp + +ProofOp defines an operation used for calculating Merkle root. The data could be arbitrary format, providing necessary data for example neighbouring node hash. + +Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. + +| Field | Type | Description | +| --- | --- | --- | +| `type` | `string` | | +| `key` | `bytes` | | +| `data` | `bytes` | | + +### cosmos.base.tendermint.v1beta1.ProofOps + +ProofOps is Merkle proof defined by the list of ProofOps. + +Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. + +| Field | Type | Description | +| --- | --- | --- | +| `ops` | [`ProofOp`](#cosmos-base-tendermint-v1beta1-proofop)[] | | + +### cosmos.base.tendermint.v1beta1.Validator + +Validator is the type for the validator-set. + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | Encoded as cosmos.AddressString. | +| `pub_key` | `Any` | | +| `voting_power` | `int64` | | +| `proposer_priority` | `int64` | | + +### cosmos.base.tendermint.v1beta1.VersionInfo + +VersionInfo is the type for the GetNodeInfoResponse message. + +| Field | Type | Description | +| --- | --- | --- | +| `name` | `string` | | +| `app_name` | `string` | | +| `version` | `string` | | +| `git_commit` | `string` | | +| `build_tags` | `string` | | +| `go_version` | `string` | | +| `build_deps` | [`Module`](#cosmos-base-tendermint-v1beta1-module)[] | | +| `cosmos_sdk_version` | `string` | | + + diff --git a/sdk/latest/api-reference/grpc/consensus.mdx b/sdk/latest/api-reference/grpc/consensus.mdx new file mode 100644 index 00000000..ddf2aef7 --- /dev/null +++ b/sdk/latest/api-reference/grpc/consensus.mdx @@ -0,0 +1,115 @@ +--- +title: "Consensus" +description: "gRPC queries and transaction messages defined by the consensus module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### Params + +Params queries the parameters of x/consensus module. + +| | | +| --- | --- | +| gRPC | `cosmos.consensus.v1.Query/Params` | +| REST | `GET /cosmos/consensus/v1/params` | + +Request `QueryParamsRequest`: + +This message has no fields. + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `params` | `ConsensusParams` | params are the tendermint consensus params stored in the consensus module. Please note that `params.version` is not populated in this response, it is tracked separately in the x/upgrade module. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.consensus.v1.Query/Params +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/latest/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/latest/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/latest/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### UpdateParams + +UpdateParams defines a governance operation for updating the x/consensus module parameters. The authority is defined in the keeper. + +| | | +| --- | --- | +| Type URL | `/cosmos.consensus.v1.MsgUpdateParams` | +| Handler | `cosmos.consensus.v1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/x/consensus/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `block` | `BlockParams` | params defines the x/consensus parameters to update. VersionsParams is not included in this Msg because it is tracked separarately in x/upgrade. NOTE: All parameters must be supplied. | +| `evidence` | `EvidenceParams` | | +| `validator` | `ValidatorParams` | | +| `abci` | `ABCIParams` | | +| `auth` | `AuthorityParams` | | + +In a transaction: + +```json +{ + "@type": "/cosmos.consensus.v1.MsgUpdateParams", + "authority": "<string>", + "block": { + "max_bytes": "1", + "max_gas": "1" + }, + "evidence": { + "max_age_num_blocks": "1", + "max_age_duration": "0s", + "max_bytes": "1" + }, + "validator": { + "pub_key_types": [ + "<string>" + ] + }, + "abci": { + "vote_extensions_enable_height": "1" + }, + "auth": { + "authority": "<string>" + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + + diff --git a/sdk/latest/api-reference/grpc/counter.mdx b/sdk/latest/api-reference/grpc/counter.mdx new file mode 100644 index 00000000..d1d08082 --- /dev/null +++ b/sdk/latest/api-reference/grpc/counter.mdx @@ -0,0 +1,91 @@ +--- +title: "Counter" +description: "gRPC queries and transaction messages defined by the counter module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### GetCount + +GetCount queries the parameters of x/Counter module. + +| | | +| --- | --- | +| gRPC | `cosmos.counter.v1.Query/GetCount` | + +Request `QueryGetCountRequest`: + +This message has no fields. + +Response `QueryGetCountResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `total_count` | `int64` | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.counter.v1.Query/GetCount +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/latest/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/latest/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/latest/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### IncreaseCount + +IncreaseCount increments the counter by the specified amount. + +| | | +| --- | --- | +| Type URL | `/cosmos.counter.v1.MsgIncreaseCounter` | +| Handler | `cosmos.counter.v1.Msg/IncreaseCount` | +| Signer | `signer` | +| Amino name | `cosmos-sdk/increase_counter` | + +| Field | Type | Description | +| --- | --- | --- | +| `signer` | `string` | signer is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `count` | `int64` | count is the number of times to increment the counter. | + +In a transaction: + +```json +{ + "@type": "/cosmos.counter.v1.MsgIncreaseCounter", + "signer": "<string>", + "count": "1" +} +``` + +Response `MsgIncreaseCountResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `new_count` | `int64` | new_count is the number of times the counter was incremented. | + + diff --git a/sdk/latest/api-reference/grpc/distribution.mdx b/sdk/latest/api-reference/grpc/distribution.mdx new file mode 100644 index 00000000..344067fc --- /dev/null +++ b/sdk/latest/api-reference/grpc/distribution.mdx @@ -0,0 +1,741 @@ +--- +title: "Distribution" +description: "gRPC queries and transaction messages defined by the distribution module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### CommunityPool + +CommunityPool queries the community pool coins. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/CommunityPool` | +| REST | `GET /cosmos/distribution/v1beta1/community_pool` | + +Request `QueryCommunityPoolRequest`: + +This message has no fields. + +Response `QueryCommunityPoolResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `pool` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | pool defines community pool's coins. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.distribution.v1beta1.Query/CommunityPool +``` + +### DelegationRewards + +DelegationRewards queries the total rewards accrued by a delegation. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/DelegationRewards` | +| REST | `GET /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards/{validatorAddress}` | + +Request `QueryDelegationRewardsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryDelegationRewardsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `rewards` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | rewards defines the rewards accrued by a delegation. | + +```bash +grpcurl -plaintext -d '{"delegator_address":"<string>","validator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/DelegationRewards +``` + +### DelegationTotalRewards + +DelegationTotalRewards queries the total rewards accrued by each validator. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/DelegationTotalRewards` | +| REST | `GET /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards` | + +Request `QueryDelegationTotalRewardsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address defines the delegator address to query for. Encoded as cosmos.AddressString. | + +Response `QueryDelegationTotalRewardsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `rewards` | [`DelegationDelegatorReward`](#cosmos-distribution-v1beta1-delegationdelegatorreward)[] | rewards defines all the rewards accrued by a delegator. | +| `total` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | total defines the sum of all the rewards. | + +```bash +grpcurl -plaintext -d '{"delegator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/DelegationTotalRewards +``` + +### DelegatorStartingInfo + +DelegatorStartingInfo queries the starting info for a delegator. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/DelegatorStartingInfo` | +| REST | `GET /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/starting_info/{validatorAddress}` | + +Request `QueryDelegatorStartingInfoRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryDelegatorStartingInfoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `starting_info` | [`DelegatorStartingInfo`](#cosmos-distribution-v1beta1-delegatorstartinginfo) | starting_info defines the starting info of a delegator. | + +```bash +grpcurl -plaintext -d '{"delegator_address":"<string>","validator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/DelegatorStartingInfo +``` + +### DelegatorValidators + +DelegatorValidators queries the validators of a delegator. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/DelegatorValidators` | +| REST | `GET /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/validators` | + +Request `QueryDelegatorValidatorsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address defines the delegator address to query for. Encoded as cosmos.AddressString. | + +Response `QueryDelegatorValidatorsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `validators` | `string`[] | validators defines the validators a delegator is delegating for. | + +```bash +grpcurl -plaintext -d '{"delegator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/DelegatorValidators +``` + +### DelegatorWithdrawAddress + +DelegatorWithdrawAddress queries withdraw address of a delegator. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress` | +| REST | `GET /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/withdraw_address` | + +Request `QueryDelegatorWithdrawAddressRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address defines the delegator address to query for. Encoded as cosmos.AddressString. | + +Response `QueryDelegatorWithdrawAddressResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `withdraw_address` | `string` | withdraw_address defines the delegator address to query for. Encoded as cosmos.AddressString. | + +```bash +grpcurl -plaintext -d '{"delegator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress +``` + +### Params + +Params queries params of the distribution module. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/Params` | +| REST | `GET /cosmos/distribution/v1beta1/params` | + +Request `QueryParamsRequest`: + +This message has no fields. + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `params` | [`Params`](#cosmos-distribution-v1beta1-params) | params defines the parameters of the module. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.distribution.v1beta1.Query/Params +``` + +### ValidatorCommission + +ValidatorCommission queries accumulated commission for a validator. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/ValidatorCommission` | +| REST | `GET /cosmos/distribution/v1beta1/validators/{validatorAddress}/commission` | + +Request `QueryValidatorCommissionRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryValidatorCommissionResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `commission` | [`ValidatorAccumulatedCommission`](#cosmos-distribution-v1beta1-validatoraccumulatedcommission) | commission defines the commission the validator received. | + +```bash +grpcurl -plaintext -d '{"validator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/ValidatorCommission +``` + +### ValidatorCurrentRewards + +ValidatorCurrentRewards queries current rewards for a validator. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/ValidatorCurrentRewards` | +| REST | `GET /cosmos/distribution/v1beta1/validators/{validatorAddress}/current_rewards` | + +Request `QueryValidatorCurrentRewardsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryValidatorCurrentRewardsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `rewards` | [`ValidatorCurrentRewards`](#cosmos-distribution-v1beta1-validatorcurrentrewards) | rewards defines the current rewards of a validator. | + +```bash +grpcurl -plaintext -d '{"validator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/ValidatorCurrentRewards +``` + +### ValidatorDistributionInfo + +ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo` | +| REST | `GET /cosmos/distribution/v1beta1/validators/{validatorAddress}` | + +Request `QueryValidatorDistributionInfoRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryValidatorDistributionInfoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `operator_address` | `string` | operator_address defines the validator operator address. Encoded as cosmos.ValidatorAddressString. | +| `self_bond_rewards` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | self_bond_rewards defines the self delegations rewards. | +| `commission` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | commission defines the commission the validator received. | + +```bash +grpcurl -plaintext -d '{"validator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo +``` + +### ValidatorHistoricalRewards + +ValidatorHistoricalRewards queries historical rewards for a validator at a specific period. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/ValidatorHistoricalRewards` | +| REST | `GET /cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}` | + +Request `QueryValidatorHistoricalRewardsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | +| `period` | `uint64` | period defines the period to query historical rewards for. | + +Response `QueryValidatorHistoricalRewardsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `rewards` | [`ValidatorHistoricalRewards`](#cosmos-distribution-v1beta1-validatorhistoricalrewards) | rewards defines the historical rewards of a validator. | + +```bash +grpcurl -plaintext -d '{"validator_address":"<string>","period":"1"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/ValidatorHistoricalRewards +``` + +### ValidatorOutstandingRewards + +ValidatorOutstandingRewards queries rewards of a validator address. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards` | +| REST | `GET /cosmos/distribution/v1beta1/validators/{validatorAddress}/outstanding_rewards` | + +Request `QueryValidatorOutstandingRewardsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryValidatorOutstandingRewardsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `rewards` | [`ValidatorOutstandingRewards`](#cosmos-distribution-v1beta1-validatoroutstandingrewards) | | + +```bash +grpcurl -plaintext -d '{"validator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards +``` + +### ValidatorSlashes + +ValidatorSlashes queries slash events of a validator. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/ValidatorSlashes` | +| REST | `GET /cosmos/distribution/v1beta1/validators/{validatorAddress}/slashes` | + +Request `QueryValidatorSlashesRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | +| `starting_height` | `uint64` | starting_height defines the optional starting height to query the slashes. | +| `ending_height` | `uint64` | starting_height defines the optional ending height to query the slashes. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryValidatorSlashesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `slashes` | [`ValidatorSlashEvent`](#cosmos-distribution-v1beta1-validatorslashevent)[] | slashes defines the slashes the validator received. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"validator_address":"<string>","starting_height":"1","ending_height":"1","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/ValidatorSlashes +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/latest/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/latest/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/latest/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### CommunityPoolSpend + +CommunityPoolSpend defines a governance operation for sending tokens from the community pool in the x/distribution module to another account, which could be the governance module itself. The authority is defined in the keeper. + +| | | +| --- | --- | +| Type URL | `/cosmos.distribution.v1beta1.MsgCommunityPoolSpend` | +| Handler | `cosmos.distribution.v1beta1.Msg/CommunityPoolSpend` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/distr/MsgCommunityPoolSpend` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `recipient` | `string` | | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +In a transaction: + +```json +{ + "@type": "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", + "authority": "<string>", + "recipient": "<string>", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] +} +``` + +Response `MsgCommunityPoolSpendResponse`: + +This message has no fields. + +### DepositValidatorRewardsPool + +DepositValidatorRewardsPool defines a method to provide additional rewards to delegators to a specific validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool` | +| Handler | `cosmos.distribution.v1beta1.Msg/DepositValidatorRewardsPool` | +| Signer | `depositor` | +| Amino name | `cosmos-sdk/distr/MsgDepositValRewards` | + +| Field | Type | Description | +| --- | --- | --- | +| `depositor` | `string` | Encoded as cosmos.AddressString. | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +In a transaction: + +```json +{ + "@type": "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool", + "depositor": "<string>", + "validator_address": "<string>", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] +} +``` + +Response `MsgDepositValidatorRewardsPoolResponse`: + +This message has no fields. + +### FundCommunityPool + +FundCommunityPool defines a method to allow an account to directly fund the community pool. + +| | | +| --- | --- | +| Type URL | `/cosmos.distribution.v1beta1.MsgFundCommunityPool` | +| Handler | `cosmos.distribution.v1beta1.Msg/FundCommunityPool` | +| Signer | `depositor` | +| Amino name | `cosmos-sdk/MsgFundCommunityPool` | + +| Field | Type | Description | +| --- | --- | --- | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | +| `depositor` | `string` | Encoded as cosmos.AddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.distribution.v1beta1.MsgFundCommunityPool", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ], + "depositor": "<string>" +} +``` + +Response `MsgFundCommunityPoolResponse`: + +This message has no fields. + +### SetWithdrawAddress + +SetWithdrawAddress defines a method to change the withdraw address for a delegator (or validator self-delegation). + +| | | +| --- | --- | +| Type URL | `/cosmos.distribution.v1beta1.MsgSetWithdrawAddress` | +| Handler | `cosmos.distribution.v1beta1.Msg/SetWithdrawAddress` | +| Signer | `delegator_address` | +| Amino name | `cosmos-sdk/MsgModifyWithdrawAddress` | + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | Encoded as cosmos.AddressString. | +| `withdraw_address` | `string` | Encoded as cosmos.AddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", + "delegator_address": "<string>", + "withdraw_address": "<string>" +} +``` + +Response `MsgSetWithdrawAddressResponse`: + +This message has no fields. + +### UpdateParams + +UpdateParams defines a governance operation for updating the x/distribution module parameters. The authority is defined in the keeper. + +| | | +| --- | --- | +| Type URL | `/cosmos.distribution.v1beta1.MsgUpdateParams` | +| Handler | `cosmos.distribution.v1beta1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/distribution/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `params` | [`Params`](#cosmos-distribution-v1beta1-params) | params defines the x/distribution parameters to update. NOTE: All parameters must be supplied. | + +In a transaction: + +```json +{ + "@type": "/cosmos.distribution.v1beta1.MsgUpdateParams", + "authority": "<string>", + "params": { + "community_tax": "<string>", + "withdraw_addr_enabled": false + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + +### WithdrawDelegatorReward + +WithdrawDelegatorReward defines a method to withdraw rewards of delegator from a single validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward` | +| Handler | `cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward` | +| Signer | `delegator_address` | +| Amino name | `cosmos-sdk/MsgWithdrawDelegationReward` | + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | Encoded as cosmos.AddressString. | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", + "delegator_address": "<string>", + "validator_address": "<string>" +} +``` + +Response `MsgWithdrawDelegatorRewardResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +### WithdrawValidatorCommission + +WithdrawValidatorCommission defines a method to withdraw the full commission to the validator address. + +| | | +| --- | --- | +| Type URL | `/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission` | +| Handler | `cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission` | +| Signer | `validator_address` | +| Amino name | `cosmos-sdk/MsgWithdrawValCommission` | + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", + "validator_address": "<string>" +} +``` + +Response `MsgWithdrawValidatorCommissionResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.base.v1beta1.Coin + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `amount` | `string` | Encoded as cosmos.Int. | + +### cosmos.base.v1beta1.DecCoin + +DecCoin defines a token with a denomination and a decimal amount. + +NOTE: The amount field is a Dec which implements the custom method signatures required by gogoproto. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `amount` | `string` | Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | + +### cosmos.distribution.v1beta1.DelegationDelegatorReward + +DelegationDelegatorReward represents the properties of a delegator's delegation reward. + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `reward` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | | + +### cosmos.distribution.v1beta1.DelegatorStartingInfo + +DelegatorStartingInfo represents the starting info for a delegator reward period. It tracks the previous validator period, the delegation's amount of staking token, and the creation height (to check later on if any slashes have occurred). NOTE: Even though validators are slashed to whole staking tokens, the delegators within the validator may be left with less than a full token, thus sdk.Dec is used. + +| Field | Type | Description | +| --- | --- | --- | +| `previous_period` | `uint64` | | +| `stake` | `string` | Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `height` | `uint64` | | + +### cosmos.distribution.v1beta1.Params + +Params defines the set of params for the distribution module. + +| Field | Type | Description | +| --- | --- | --- | +| `community_tax` | `string` | Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `base_proposer_reward` | `string` | Deprecated: The base_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism. Deprecated. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `bonus_proposer_reward` | `string` | Deprecated: The bonus_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism. Deprecated. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `withdraw_addr_enabled` | `bool` | | + +### cosmos.distribution.v1beta1.ValidatorAccumulatedCommission + +ValidatorAccumulatedCommission represents accumulated commission for a validator kept as a running counter, can be withdrawn at any time. + +| Field | Type | Description | +| --- | --- | --- | +| `commission` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | | + +### cosmos.distribution.v1beta1.ValidatorCurrentRewards + +ValidatorCurrentRewards represents current rewards and current period for a validator kept as a running counter and incremented each block as long as the validator's tokens remain constant. + +| Field | Type | Description | +| --- | --- | --- | +| `rewards` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | | +| `period` | `uint64` | | + +### cosmos.distribution.v1beta1.ValidatorHistoricalRewards + +ValidatorHistoricalRewards represents historical rewards for a validator. Height is implicit within the store key. Cumulative reward ratio is the sum from the zeroeth period until this period of rewards / tokens, per the spec. The reference count indicates the number of objects which might need to reference this historical entry at any point. ReferenceCount = number of outstanding delegations which ended the associated period (and might need to read that record) + number of slashes which ended the associated period (and might need to read that record) + one per validator for the zeroeth period, set on initialization + +| Field | Type | Description | +| --- | --- | --- | +| `cumulative_reward_ratio` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | | +| `reference_count` | `uint32` | | + +### cosmos.distribution.v1beta1.ValidatorOutstandingRewards + +ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards for a validator inexpensive to track, allows simple sanity checks. + +| Field | Type | Description | +| --- | --- | --- | +| `rewards` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | | + +### cosmos.distribution.v1beta1.ValidatorSlashEvent + +ValidatorSlashEvent represents a validator slash event. Height is implicit within the store key. This is needed to calculate appropriate amount of staking tokens for delegations which are withdrawn after a slash has occurred. + +| Field | Type | Description | +| --- | --- | --- | +| `validator_period` | `uint64` | | +| `fraction` | `string` | Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | + + diff --git a/sdk/latest/api-reference/grpc/epochs.mdx b/sdk/latest/api-reference/grpc/epochs.mdx new file mode 100644 index 00000000..dfb378ce --- /dev/null +++ b/sdk/latest/api-reference/grpc/epochs.mdx @@ -0,0 +1,94 @@ +--- +title: "Epochs" +description: "gRPC queries and transaction messages defined by the epochs module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### CurrentEpoch + +CurrentEpoch provide current epoch of specified identifier + +| | | +| --- | --- | +| gRPC | `cosmos.epochs.v1beta1.Query/CurrentEpoch` | +| REST | `GET /cosmos/epochs/v1beta1/current_epoch` | + +Request `QueryCurrentEpochRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `identifier` | `string` | | + +Response `QueryCurrentEpochResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `current_epoch` | `int64` | | + +```bash +grpcurl -plaintext -d '{"identifier":"<string>"}' \ + localhost:9090 cosmos.epochs.v1beta1.Query/CurrentEpoch +``` + +### EpochInfos + +EpochInfos provide running epochInfos + +| | | +| --- | --- | +| gRPC | `cosmos.epochs.v1beta1.Query/EpochInfos` | +| REST | `GET /cosmos/epochs/v1beta1/epochs` | + +Request `QueryEpochInfosRequest`: + +This message has no fields. + +Response `QueryEpochInfosResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `epochs` | [`EpochInfo`](#cosmos-epochs-v1beta1-epochinfo)[] | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.epochs.v1beta1.Query/EpochInfos +``` + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.epochs.v1beta1.EpochInfo + +EpochInfo is a struct that describes the data going into a timer defined by the x/epochs module. + +| Field | Type | Description | +| --- | --- | --- | +| `identifier` | `string` | identifier is a unique reference to this particular timer. | +| `start_time` | `Timestamp` | start_time is the time at which the timer first ever ticks. If start_time is in the future, the epoch will not begin until the start time. | +| `duration` | `Duration` | duration is the time in between epoch ticks. In order for intended behavior to be met, duration should be greater than the chains expected block time. Duration must be non-zero. | +| `current_epoch` | `int64` | current_epoch is the current epoch number, or in other words, how many times has the timer 'ticked'. The first tick (current_epoch=1) is defined as the first block whose blocktime is greater than the EpochInfo start_time. | +| `current_epoch_start_time` | `Timestamp` | current_epoch_start_time describes the start time of the current timer interval. The interval is (current_epoch_start_time, current_epoch_start_time + duration] When the timer ticks, this is set to current_epoch_start_time = last_epoch_start_time + duration only one timer tick for a given identifier can occur per block. NOTE! The current_epoch_start_time may diverge significantly from the wall-clock time the epoch began at. Wall-clock time of epoch start may be >> current_epoch_start_time. Suppose current_epoch_start_time = 10, duration = 5. Suppose the chain goes offline at t=14, and comes back online at t=30, and produces blocks at every successive time. (t=31, 32, etc.) * The t=30 block will start the epoch for (10, 15] * The t=31 block will start the epoch for (15, 20] * The t=32 block will start the epoch for (20, 25] * The t=33 block will start the epoch for (25, 30] * The t=34 block will start the epoch for (30, 35] * The **t=36** block will start the epoch for (35, 40] | +| `epoch_counting_started` | `bool` | epoch_counting_started is a boolean, that indicates whether this epoch timer has began yet. | +| `current_epoch_start_height` | `int64` | current_epoch_start_height is the block height at which the current epoch started. (The block height at which the timer last ticked) | + + diff --git a/sdk/latest/api-reference/grpc/evidence.mdx b/sdk/latest/api-reference/grpc/evidence.mdx new file mode 100644 index 00000000..37ce2f43 --- /dev/null +++ b/sdk/latest/api-reference/grpc/evidence.mdx @@ -0,0 +1,155 @@ +--- +title: "Evidence" +description: "gRPC queries and transaction messages defined by the evidence module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### AllEvidence + +AllEvidence queries all evidence. + +| | | +| --- | --- | +| gRPC | `cosmos.evidence.v1beta1.Query/AllEvidence` | +| REST | `GET /cosmos/evidence/v1beta1/evidence` | + +Request `QueryAllEvidenceRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryAllEvidenceResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `evidence` | `Any`[] | evidence returns all evidences. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.evidence.v1beta1.Query/AllEvidence +``` + +### Evidence + +Evidence queries evidence based on evidence hash. + +| | | +| --- | --- | +| gRPC | `cosmos.evidence.v1beta1.Query/Evidence` | +| REST | `GET /cosmos/evidence/v1beta1/evidence/{hash}` | + +Request `QueryEvidenceRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `evidence_hash` | `bytes` | evidence_hash defines the hash of the requested evidence. Deprecated: Use hash, a HEX encoded string, instead. Deprecated. | +| `hash` | `string` | hash defines the evidence hash of the requested evidence. | + +Response `QueryEvidenceResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `evidence` | `Any` | evidence returns the requested evidence. | + +```bash +grpcurl -plaintext -d '{"hash":"<string>"}' \ + localhost:9090 cosmos.evidence.v1beta1.Query/Evidence +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/latest/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/latest/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/latest/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### SubmitEvidence + +SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or counterfactual signing. + +| | | +| --- | --- | +| Type URL | `/cosmos.evidence.v1beta1.MsgSubmitEvidence` | +| Handler | `cosmos.evidence.v1beta1.Msg/SubmitEvidence` | +| Signer | `submitter` | +| Amino name | `cosmos-sdk/MsgSubmitEvidence` | + +| Field | Type | Description | +| --- | --- | --- | +| `submitter` | `string` | submitter is the signer account address of evidence. Encoded as cosmos.AddressString. | +| `evidence` | `Any` | evidence defines the evidence of misbehavior. Accepts any message implementing cosmos.evidence.v1beta1.Evidence. | + +In a transaction: + +```json +{ + "@type": "/cosmos.evidence.v1beta1.MsgSubmitEvidence", + "submitter": "<string>", + "evidence": { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + } +} +``` + +Response `MsgSubmitEvidenceResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `hash` | `bytes` | hash defines the hash of the evidence. | + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + + diff --git a/sdk/latest/api-reference/grpc/feegrant.mdx b/sdk/latest/api-reference/grpc/feegrant.mdx new file mode 100644 index 00000000..0ece4bd6 --- /dev/null +++ b/sdk/latest/api-reference/grpc/feegrant.mdx @@ -0,0 +1,252 @@ +--- +title: "Feegrant" +description: "gRPC queries and transaction messages defined by the feegrant module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### Allowance + +Allowance returns granted allowance to the grantee by the granter. + +| | | +| --- | --- | +| gRPC | `cosmos.feegrant.v1beta1.Query/Allowance` | +| REST | `GET /cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}` | + +Request `QueryAllowanceRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | granter is the address of the user granting an allowance of their funds. Encoded as cosmos.AddressString. | +| `grantee` | `string` | grantee is the address of the user being granted an allowance of another user's funds. Encoded as cosmos.AddressString. | + +Response `QueryAllowanceResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `allowance` | [`Grant`](#cosmos-feegrant-v1beta1-grant) | allowance is an allowance granted for grantee by granter. | + +```bash +grpcurl -plaintext -d '{"granter":"<string>","grantee":"<string>"}' \ + localhost:9090 cosmos.feegrant.v1beta1.Query/Allowance +``` + +### Allowances + +Allowances returns all the grants for the given grantee address. + +| | | +| --- | --- | +| gRPC | `cosmos.feegrant.v1beta1.Query/Allowances` | +| REST | `GET /cosmos/feegrant/v1beta1/allowances/{grantee}` | + +Request `QueryAllowancesRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `grantee` | `string` | Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines a pagination for the request. | + +Response `QueryAllowancesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `allowances` | [`Grant`](#cosmos-feegrant-v1beta1-grant)[] | allowances are allowance's granted for grantee by granter. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines a pagination for the response. | + +```bash +grpcurl -plaintext -d '{"grantee":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.feegrant.v1beta1.Query/Allowances +``` + +### AllowancesByGranter + +AllowancesByGranter returns all the grants given by an address + +| | | +| --- | --- | +| gRPC | `cosmos.feegrant.v1beta1.Query/AllowancesByGranter` | +| REST | `GET /cosmos/feegrant/v1beta1/issued/{granter}` | + +Request `QueryAllowancesByGranterRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines a pagination for the request. | + +Response `QueryAllowancesByGranterResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `allowances` | [`Grant`](#cosmos-feegrant-v1beta1-grant)[] | allowances that have been issued by the granter. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines a pagination for the response. | + +```bash +grpcurl -plaintext -d '{"granter":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.feegrant.v1beta1.Query/AllowancesByGranter +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/latest/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/latest/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/latest/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### GrantAllowance + +GrantAllowance grants fee allowance to the grantee on the granter's account with the provided expiration time. + +| | | +| --- | --- | +| Type URL | `/cosmos.feegrant.v1beta1.MsgGrantAllowance` | +| Handler | `cosmos.feegrant.v1beta1.Msg/GrantAllowance` | +| Signer | `granter` | +| Amino name | `cosmos-sdk/MsgGrantAllowance` | + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | granter is the address of the user granting an allowance of their funds. Encoded as cosmos.AddressString. | +| `grantee` | `string` | grantee is the address of the user being granted an allowance of another user's funds. Encoded as cosmos.AddressString. | +| `allowance` | `Any` | allowance can be any of basic, periodic, allowed fee allowance. One of: `/cosmos.feegrant.v1beta1.AllowedMsgAllowance`, `/cosmos.feegrant.v1beta1.BasicAllowance`, `/cosmos.feegrant.v1beta1.PeriodicAllowance`. | + +In a transaction: + +```json +{ + "@type": "/cosmos.feegrant.v1beta1.MsgGrantAllowance", + "granter": "<string>", + "grantee": "<string>", + "allowance": { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + } +} +``` + +Response `MsgGrantAllowanceResponse`: + +This message has no fields. + +### PruneAllowances + +PruneAllowances prunes expired fee allowances, currently up to 75 at a time. + +| | | +| --- | --- | +| Type URL | `/cosmos.feegrant.v1beta1.MsgPruneAllowances` | +| Handler | `cosmos.feegrant.v1beta1.Msg/PruneAllowances` | +| Signer | `pruner` | +| Amino name | none registered | + +| Field | Type | Description | +| --- | --- | --- | +| `pruner` | `string` | pruner is the address of the user pruning expired allowances. Encoded as cosmos.AddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.feegrant.v1beta1.MsgPruneAllowances", + "pruner": "<string>" +} +``` + +Response `MsgPruneAllowancesResponse`: + +This message has no fields. + +### RevokeAllowance + +RevokeAllowance revokes any fee allowance of granter's account that has been granted to the grantee. + +| | | +| --- | --- | +| Type URL | `/cosmos.feegrant.v1beta1.MsgRevokeAllowance` | +| Handler | `cosmos.feegrant.v1beta1.Msg/RevokeAllowance` | +| Signer | `granter` | +| Amino name | `cosmos-sdk/MsgRevokeAllowance` | + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | granter is the address of the user granting an allowance of their funds. Encoded as cosmos.AddressString. | +| `grantee` | `string` | grantee is the address of the user being granted an allowance of another user's funds. Encoded as cosmos.AddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", + "granter": "<string>", + "grantee": "<string>" +} +``` + +Response `MsgRevokeAllowanceResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.feegrant.v1beta1.Grant + +Grant is stored in the KVStore to record a grant with full context + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | granter is the address of the user granting an allowance of their funds. Encoded as cosmos.AddressString. | +| `grantee` | `string` | grantee is the address of the user being granted an allowance of another user's funds. Encoded as cosmos.AddressString. | +| `allowance` | `Any` | allowance can be any of basic, periodic, allowed fee allowance. One of: `/cosmos.feegrant.v1beta1.AllowedMsgAllowance`, `/cosmos.feegrant.v1beta1.BasicAllowance`, `/cosmos.feegrant.v1beta1.PeriodicAllowance`. | + + diff --git a/sdk/latest/api-reference/grpc/gov.mdx b/sdk/latest/api-reference/grpc/gov.mdx new file mode 100644 index 00000000..14e842d5 --- /dev/null +++ b/sdk/latest/api-reference/grpc/gov.mdx @@ -0,0 +1,1234 @@ +--- +title: "Gov" +description: "gRPC queries and transaction messages defined by the gov module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +## cosmos.gov.v1.Query + +Query defines the gRPC querier service for gov module + +### Constitution + +Constitution queries the chain's constitution. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Constitution` | +| REST | `GET /cosmos/gov/v1/constitution` | + +Request `QueryConstitutionRequest`: + +This message has no fields. + +Response `QueryConstitutionResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `constitution` | `string` | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.gov.v1.Query/Constitution +``` + +### Deposit (Query, v1) + +Deposit queries single deposit information based on proposalID, depositAddr. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Deposit` | +| REST | `GET /cosmos/gov/v1/proposals/{proposalId}/deposits/{depositor}` | + +Request `QueryDepositRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | + +Response `QueryDepositResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `deposit` | [`Deposit`](#cosmos-gov-v1-deposit) | deposit defines the requested deposit. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","depositor":"<string>"}' \ + localhost:9090 cosmos.gov.v1.Query/Deposit +``` + +### Deposits (v1) + +Deposits queries all deposits of a single proposal. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Deposits` | +| REST | `GET /cosmos/gov/v1/proposals/{proposalId}/deposits` | + +Request `QueryDepositsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDepositsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `deposits` | [`Deposit`](#cosmos-gov-v1-deposit)[] | deposits defines the requested deposits. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.gov.v1.Query/Deposits +``` + +### Params (v1) + +Params queries all parameters of the gov module. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Params` | +| REST | `GET /cosmos/gov/v1/params/{paramsType}` | + +Request `QueryParamsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `params_type` | `string` | params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit". | + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `voting_params` | [`VotingParams`](#cosmos-gov-v1-votingparams) | Deprecated: Prefer to use `params` instead. voting_params defines the parameters related to voting. Deprecated. | +| `deposit_params` | [`DepositParams`](#cosmos-gov-v1-depositparams) | Deprecated: Prefer to use `params` instead. deposit_params defines the parameters related to deposit. Deprecated. | +| `tally_params` | [`TallyParams`](#cosmos-gov-v1-tallyparams) | Deprecated: Prefer to use `params` instead. tally_params defines the parameters related to tally. Deprecated. | +| `params` | [`Params`](#cosmos-gov-v1-params) | params defines all the parameters of x/gov module. | + +```bash +grpcurl -plaintext -d '{"params_type":"voting"}' \ + localhost:9090 cosmos.gov.v1.Query/Params +``` + +### Proposal (v1) + +Proposal queries proposal details based on ProposalID. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Proposal` | +| REST | `GET /cosmos/gov/v1/proposals/{proposalId}` | + +Request `QueryProposalRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | + +Response `QueryProposalResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal` | [`Proposal`](#cosmos-gov-v1-proposal) | proposal is the requested governance proposal. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1"}' \ + localhost:9090 cosmos.gov.v1.Query/Proposal +``` + +### Proposals (v1) + +Proposals queries all proposals based on given status. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Proposals` | +| REST | `GET /cosmos/gov/v1/proposals` | + +Request `QueryProposalsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_status` | [`ProposalStatus`](#cosmos-gov-v1-proposalstatus) | proposal_status defines the status of the proposals. | +| `voter` | `string` | voter defines the voter address for the proposals. Encoded as cosmos.AddressString. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryProposalsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposals` | [`Proposal`](#cosmos-gov-v1-proposal)[] | proposals defines all the requested governance proposals. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"proposal_status":"PROPOSAL_STATUS_DEPOSIT_PERIOD","voter":"<string>","depositor":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.gov.v1.Query/Proposals +``` + +### TallyResult (v1) + +TallyResult queries the tally of a proposal vote. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/TallyResult` | +| REST | `GET /cosmos/gov/v1/proposals/{proposalId}/tally` | + +Request `QueryTallyResultRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | + +Response `QueryTallyResultResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `tally` | [`TallyResult`](#cosmos-gov-v1-tallyresult) | tally defines the requested tally. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1"}' \ + localhost:9090 cosmos.gov.v1.Query/TallyResult +``` + +### Vote (Query, v1) + +Vote queries voted information based on proposalID, voterAddr. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Vote` | +| REST | `GET /cosmos/gov/v1/proposals/{proposalId}/votes/{voter}` | + +Request `QueryVoteRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter defines the voter address for the proposals. Encoded as cosmos.AddressString. | + +Response `QueryVoteResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `vote` | [`Vote`](#cosmos-gov-v1-vote) | vote defines the queried vote. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","voter":"<string>"}' \ + localhost:9090 cosmos.gov.v1.Query/Vote +``` + +### Votes (v1) + +Votes queries votes of a given proposal. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Votes` | +| REST | `GET /cosmos/gov/v1/proposals/{proposalId}/votes` | + +Request `QueryVotesRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryVotesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `votes` | [`Vote`](#cosmos-gov-v1-vote)[] | votes defines the queried votes. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.gov.v1.Query/Votes +``` + +## cosmos.gov.v1beta1.Query + +Query defines the gRPC querier service for gov module + +### Deposit (Query, v1beta1) + +Deposit queries single deposit information based on proposalID, depositor address. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/Deposit` | +| REST | `GET /cosmos/gov/v1beta1/proposals/{proposalId}/deposits/{depositor}` | + +Request `QueryDepositRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | + +Response `QueryDepositResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `deposit` | [`Deposit`](#cosmos-gov-v1beta1-deposit) | deposit defines the requested deposit. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","depositor":"<string>"}' \ + localhost:9090 cosmos.gov.v1beta1.Query/Deposit +``` + +### Deposits (v1beta1) + +Deposits queries all deposits of a single proposal. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/Deposits` | +| REST | `GET /cosmos/gov/v1beta1/proposals/{proposalId}/deposits` | + +Request `QueryDepositsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDepositsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `deposits` | [`Deposit`](#cosmos-gov-v1beta1-deposit)[] | deposits defines the requested deposits. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.gov.v1beta1.Query/Deposits +``` + +### Params (v1beta1) + +Params queries all parameters of the gov module. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/Params` | +| REST | `GET /cosmos/gov/v1beta1/params/{paramsType}` | + +Request `QueryParamsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `params_type` | `string` | params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit". | + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `voting_params` | [`VotingParams`](#cosmos-gov-v1beta1-votingparams) | voting_params defines the parameters related to voting. | +| `deposit_params` | [`DepositParams`](#cosmos-gov-v1beta1-depositparams) | deposit_params defines the parameters related to deposit. | +| `tally_params` | [`TallyParams`](#cosmos-gov-v1beta1-tallyparams) | tally_params defines the parameters related to tally. | + +```bash +grpcurl -plaintext -d '{"params_type":"voting"}' \ + localhost:9090 cosmos.gov.v1beta1.Query/Params +``` + +### Proposal (v1beta1) + +Proposal queries proposal details based on ProposalID. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/Proposal` | +| REST | `GET /cosmos/gov/v1beta1/proposals/{proposalId}` | + +Request `QueryProposalRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | + +Response `QueryProposalResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal` | [`Proposal`](#cosmos-gov-v1beta1-proposal) | | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1"}' \ + localhost:9090 cosmos.gov.v1beta1.Query/Proposal +``` + +### Proposals (v1beta1) + +Proposals queries all proposals based on given status. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/Proposals` | +| REST | `GET /cosmos/gov/v1beta1/proposals` | + +Request `QueryProposalsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_status` | [`ProposalStatus`](#cosmos-gov-v1beta1-proposalstatus) | proposal_status defines the status of the proposals. | +| `voter` | `string` | voter defines the voter address for the proposals. Encoded as cosmos.AddressString. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryProposalsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposals` | [`Proposal`](#cosmos-gov-v1beta1-proposal)[] | proposals defines all the requested governance proposals. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"proposal_status":"PROPOSAL_STATUS_DEPOSIT_PERIOD","voter":"<string>","depositor":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.gov.v1beta1.Query/Proposals +``` + +### TallyResult (v1beta1) + +TallyResult queries the tally of a proposal vote. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/TallyResult` | +| REST | `GET /cosmos/gov/v1beta1/proposals/{proposalId}/tally` | + +Request `QueryTallyResultRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | + +Response `QueryTallyResultResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `tally` | [`TallyResult`](#cosmos-gov-v1beta1-tallyresult) | tally defines the requested tally. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1"}' \ + localhost:9090 cosmos.gov.v1beta1.Query/TallyResult +``` + +### Vote (Query, v1beta1) + +Vote queries voted information based on proposalID, voterAddr. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/Vote` | +| REST | `GET /cosmos/gov/v1beta1/proposals/{proposalId}/votes/{voter}` | + +Request `QueryVoteRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter defines the voter address for the proposals. Encoded as cosmos.AddressString. | + +Response `QueryVoteResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `vote` | [`Vote`](#cosmos-gov-v1beta1-vote) | vote defines the queried vote. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","voter":"<string>"}' \ + localhost:9090 cosmos.gov.v1beta1.Query/Vote +``` + +### Votes (v1beta1) + +Votes queries votes of a given proposal. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/Votes` | +| REST | `GET /cosmos/gov/v1beta1/proposals/{proposalId}/votes` | + +Request `QueryVotesRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryVotesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `votes` | [`Vote`](#cosmos-gov-v1beta1-vote)[] | votes defines the queried votes. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.gov.v1beta1.Query/Votes +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/latest/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/latest/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/latest/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### CancelProposal + +CancelProposal defines a method to cancel governance proposal + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1.MsgCancelProposal` | +| Handler | `cosmos.gov.v1.Msg/CancelProposal` | +| Signer | `proposer` | +| Amino name | none registered | + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `proposer` | `string` | proposer is the account address of the proposer. Encoded as cosmos.AddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1.MsgCancelProposal", + "proposal_id": "1", + "proposer": "<string>" +} +``` + +Response `MsgCancelProposalResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `canceled_time` | `Timestamp` | canceled_time is the time when proposal is canceled. | +| `canceled_height` | `uint64` | canceled_height defines the block height at which the proposal is canceled. | + +### Deposit (Msg, v1) + +Deposit defines a method to add deposit on a specific proposal. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1.MsgDeposit` | +| Handler | `cosmos.gov.v1.Msg/Deposit` | +| Signer | `depositor` | +| Amino name | `cosmos-sdk/v1/MsgDeposit` | + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | amount to be deposited by depositor. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1.MsgDeposit", + "proposal_id": "1", + "depositor": "<string>", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] +} +``` + +Response `MsgDepositResponse`: + +This message has no fields. + +### ExecLegacyContent + +ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal to execute a legacy content-based proposal. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1.MsgExecLegacyContent` | +| Handler | `cosmos.gov.v1.Msg/ExecLegacyContent` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/v1/MsgExecLegacyContent` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `content` | `Any` | content is the proposal's content. One of: `/cosmos.distribution.v1beta1.CommunityPoolSpendProposal`, `/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit`, `/cosmos.gov.v1beta1.TextProposal`, `/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal`, `/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal`. | +| `authority` | `string` | authority must be the gov module address. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1.MsgExecLegacyContent", + "content": { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + }, + "authority": "<string>" +} +``` + +Response `MsgExecLegacyContentResponse`: + +This message has no fields. + +### SubmitProposal (v1) + +SubmitProposal defines a method to create new proposal given the messages. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1.MsgSubmitProposal` | +| Handler | `cosmos.gov.v1.Msg/SubmitProposal` | +| Signer | `proposer` | +| Amino name | `cosmos-sdk/v1/MsgSubmitProposal` | + +| Field | Type | Description | +| --- | --- | --- | +| `messages` | `Any`[] | messages are the arbitrary messages to be executed if proposal passes. | +| `initial_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | initial_deposit is the deposit value that must be paid at proposal submission. | +| `proposer` | `string` | proposer is the account address of the proposer. Encoded as cosmos.AddressString. | +| `metadata` | `string` | metadata is any arbitrary metadata attached to the proposal. | +| `title` | `string` | title is the title of the proposal. | +| `summary` | `string` | summary is the summary of the proposal | +| `expedited` | `bool` | expedited defines if the proposal is expedited or not | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1.MsgSubmitProposal", + "messages": [ + { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + } + ], + "initial_deposit": [ + { + "denom": "<string>", + "amount": "<string>" + } + ], + "proposer": "<string>", + "metadata": "<string>", + "title": "<string>", + "summary": "<string>", + "expedited": false +} +``` + +Response `MsgSubmitProposalResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | + +### UpdateParams + +UpdateParams defines a governance operation for updating the x/gov module parameters. The authority is defined in the keeper. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1.MsgUpdateParams` | +| Handler | `cosmos.gov.v1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/x/gov/v1/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `params` | [`Params`](#cosmos-gov-v1-params) | params defines the x/gov parameters to update. NOTE: All parameters must be supplied. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1.MsgUpdateParams", + "authority": "<string>", + "params": { + "min_deposit": [ + { + "denom": "<string>", + "amount": "<string>" + } + ], + "max_deposit_period": "0s", + "voting_period": "0s", + "quorum": "<string>", + "threshold": "<string>", + "veto_threshold": "<string>", + "min_initial_deposit_ratio": "<string>", + "proposal_cancel_ratio": "<string>", + "proposal_cancel_dest": "<string>", + "expedited_voting_period": "0s", + "expedited_threshold": "<string>", + "expedited_min_deposit": [ + { + "denom": "<string>", + "amount": "<string>" + } + ], + "burn_vote_quorum": false, + "burn_proposal_deposit_prevote": false, + "burn_vote_veto": false, + "min_deposit_ratio": "<string>" + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + +### Vote (Msg, v1) + +Vote defines a method to add a vote on a specific proposal. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1.MsgVote` | +| Handler | `cosmos.gov.v1.Msg/Vote` | +| Signer | `voter` | +| Amino name | `cosmos-sdk/v1/MsgVote` | + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter is the voter address for the proposal. Encoded as cosmos.AddressString. | +| `option` | [`VoteOption`](#cosmos-gov-v1-voteoption) | option defines the vote option. | +| `metadata` | `string` | metadata is any arbitrary metadata attached to the Vote. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1.MsgVote", + "proposal_id": "1", + "voter": "<string>", + "option": "VOTE_OPTION_YES", + "metadata": "<string>" +} +``` + +Response `MsgVoteResponse`: + +This message has no fields. + +### VoteWeighted (v1) + +VoteWeighted defines a method to add a weighted vote on a specific proposal. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1.MsgVoteWeighted` | +| Handler | `cosmos.gov.v1.Msg/VoteWeighted` | +| Signer | `voter` | +| Amino name | `cosmos-sdk/v1/MsgVoteWeighted` | + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter is the voter address for the proposal. Encoded as cosmos.AddressString. | +| `options` | [`WeightedVoteOption`](#cosmos-gov-v1-weightedvoteoption)[] | options defines the weighted vote options. | +| `metadata` | `string` | metadata is any arbitrary metadata attached to the VoteWeighted. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1.MsgVoteWeighted", + "proposal_id": "1", + "voter": "<string>", + "options": [ + { + "option": "VOTE_OPTION_YES", + "weight": "<string>" + } + ], + "metadata": "<string>" +} +``` + +Response `MsgVoteWeightedResponse`: + +This message has no fields. + +### Deposit (Msg, v1beta1) + +Deposit defines a method to add deposit on a specific proposal. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1beta1.MsgDeposit` | +| Handler | `cosmos.gov.v1beta1.Msg/Deposit` | +| Signer | `depositor` | +| Amino name | `cosmos-sdk/MsgDeposit` | + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | amount to be deposited by depositor. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1beta1.MsgDeposit", + "proposal_id": "1", + "depositor": "<string>", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] +} +``` + +Response `MsgDepositResponse`: + +This message has no fields. + +### SubmitProposal (v1beta1) + +SubmitProposal defines a method to create new proposal given a content. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1beta1.MsgSubmitProposal` | +| Handler | `cosmos.gov.v1beta1.Msg/SubmitProposal` | +| Signer | `proposer` | +| Amino name | `cosmos-sdk/MsgSubmitProposal` | + +| Field | Type | Description | +| --- | --- | --- | +| `content` | `Any` | content is the proposal's content. One of: `/cosmos.distribution.v1beta1.CommunityPoolSpendProposal`, `/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit`, `/cosmos.gov.v1beta1.TextProposal`, `/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal`, `/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal`. | +| `initial_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | initial_deposit is the deposit value that must be paid at proposal submission. | +| `proposer` | `string` | proposer is the account address of the proposer. Encoded as cosmos.AddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1beta1.MsgSubmitProposal", + "content": { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + }, + "initial_deposit": [ + { + "denom": "<string>", + "amount": "<string>" + } + ], + "proposer": "<string>" +} +``` + +Response `MsgSubmitProposalResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | + +### Vote (Msg, v1beta1) + +Vote defines a method to add a vote on a specific proposal. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1beta1.MsgVote` | +| Handler | `cosmos.gov.v1beta1.Msg/Vote` | +| Signer | `voter` | +| Amino name | `cosmos-sdk/MsgVote` | + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter is the voter address for the proposal. Encoded as cosmos.AddressString. | +| `option` | [`VoteOption`](#cosmos-gov-v1beta1-voteoption) | option defines the vote option. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1beta1.MsgVote", + "proposal_id": "1", + "voter": "<string>", + "option": "VOTE_OPTION_YES" +} +``` + +Response `MsgVoteResponse`: + +This message has no fields. + +### VoteWeighted (v1beta1) + +VoteWeighted defines a method to add a weighted vote on a specific proposal. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1beta1.MsgVoteWeighted` | +| Handler | `cosmos.gov.v1beta1.Msg/VoteWeighted` | +| Signer | `voter` | +| Amino name | `cosmos-sdk/MsgVoteWeighted` | + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter is the voter address for the proposal. Encoded as cosmos.AddressString. | +| `options` | [`WeightedVoteOption`](#cosmos-gov-v1beta1-weightedvoteoption)[] | options defines the weighted vote options. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1beta1.MsgVoteWeighted", + "proposal_id": "1", + "voter": "<string>", + "options": [ + { + "option": "VOTE_OPTION_YES", + "weight": "<string>" + } + ] +} +``` + +Response `MsgVoteWeightedResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.base.v1beta1.Coin + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `amount` | `string` | Encoded as cosmos.Int. | + +### cosmos.gov.v1.Deposit + +Deposit defines an amount deposited by an account address to an active proposal. + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | amount to be deposited by depositor. | + +### cosmos.gov.v1.DepositParams + +DepositParams defines the params for deposits on governance proposals. + +| Field | Type | Description | +| --- | --- | --- | +| `min_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | Minimum deposit for a proposal to enter voting period. | +| `max_deposit_period` | `Duration` | Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. | + +### cosmos.gov.v1.Params + +Params defines the parameters for the x/gov module. + +| Field | Type | Description | +| --- | --- | --- | +| `min_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | Minimum deposit for a proposal to enter voting period. | +| `max_deposit_period` | `Duration` | Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. | +| `voting_period` | `Duration` | Duration of the voting period. | +| `quorum` | `string` | Minimum percentage of total stake needed to vote for a result to be considered valid. Encoded as cosmos.Dec, a decimal string. | +| `threshold` | `string` | Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. Encoded as cosmos.Dec, a decimal string. | +| `veto_threshold` | `string` | Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. Encoded as cosmos.Dec, a decimal string. | +| `min_initial_deposit_ratio` | `string` | The ratio representing the proportion of the deposit value that must be paid at proposal submission. Encoded as cosmos.Dec, a decimal string. | +| `proposal_cancel_ratio` | `string` | The cancel ratio which will not be returned back to the depositors when a proposal is cancelled. Encoded as cosmos.Dec, a decimal string. | +| `proposal_cancel_dest` | `string` | The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. Encoded as cosmos.AddressString. | +| `expedited_voting_period` | `Duration` | Duration of the voting period of an expedited proposal. | +| `expedited_threshold` | `string` | Minimum proportion of Yes votes for proposal to pass. Default value: 0.67. Encoded as cosmos.Dec, a decimal string. | +| `expedited_min_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | Minimum expedited deposit for a proposal to enter voting period. | +| `burn_vote_quorum` | `bool` | burn deposits if a proposal does not meet quorum | +| `burn_proposal_deposit_prevote` | `bool` | burn deposits if the proposal does not enter voting period | +| `burn_vote_veto` | `bool` | burn deposits if quorum with vote type no_veto is met | +| `min_deposit_ratio` | `string` | The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be required. Encoded as cosmos.Dec, a decimal string. | + +### cosmos.gov.v1.Proposal + +Proposal defines the core field members of a governance proposal. + +| Field | Type | Description | +| --- | --- | --- | +| `id` | `uint64` | id defines the unique id of the proposal. | +| `messages` | `Any`[] | messages are the arbitrary messages to be executed if the proposal passes. | +| `status` | [`ProposalStatus`](#cosmos-gov-v1-proposalstatus) | status defines the proposal status. | +| `final_tally_result` | [`TallyResult`](#cosmos-gov-v1-tallyresult) | final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. | +| `submit_time` | `Timestamp` | submit_time is the time of proposal submission. | +| `deposit_end_time` | `Timestamp` | deposit_end_time is the end time for deposition. | +| `total_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | total_deposit is the total deposit on the proposal. | +| `voting_start_time` | `Timestamp` | voting_start_time is the starting time to vote on a proposal. | +| `voting_end_time` | `Timestamp` | voting_end_time is the end time of voting on a proposal. | +| `metadata` | `string` | metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3 | +| `title` | `string` | title is the title of the proposal | +| `summary` | `string` | summary is a short summary of the proposal | +| `proposer` | `string` | proposer is the address of the proposal submitter Encoded as cosmos.AddressString. | +| `expedited` | `bool` | expedited defines if the proposal is expedited | +| `failed_reason` | `string` | failed_reason defines the reason why the proposal failed | + +### cosmos.gov.v1.ProposalStatus + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `PROPOSAL_STATUS_UNSPECIFIED` | Zero value. Handlers reject it. | +| `PROPOSAL_STATUS_DEPOSIT_PERIOD` | | +| `PROPOSAL_STATUS_VOTING_PERIOD` | | +| `PROPOSAL_STATUS_PASSED` | | +| `PROPOSAL_STATUS_REJECTED` | | +| `PROPOSAL_STATUS_FAILED` | | + +### cosmos.gov.v1.TallyParams + +TallyParams defines the params for tallying votes on governance proposals. + +| Field | Type | Description | +| --- | --- | --- | +| `quorum` | `string` | Minimum percentage of total stake needed to vote for a result to be considered valid. Encoded as cosmos.Dec, a decimal string. | +| `threshold` | `string` | Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. Encoded as cosmos.Dec, a decimal string. | +| `veto_threshold` | `string` | Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. Encoded as cosmos.Dec, a decimal string. | + +### cosmos.gov.v1.TallyResult + +TallyResult defines a standard tally for a governance proposal. + +| Field | Type | Description | +| --- | --- | --- | +| `yes_count` | `string` | yes_count is the number of yes votes on a proposal. Encoded as cosmos.Int. | +| `abstain_count` | `string` | abstain_count is the number of abstain votes on a proposal. Encoded as cosmos.Int. | +| `no_count` | `string` | no_count is the number of no votes on a proposal. Encoded as cosmos.Int. | +| `no_with_veto_count` | `string` | no_with_veto_count is the number of no with veto votes on a proposal. Encoded as cosmos.Int. | + +### cosmos.gov.v1.Vote + +Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter is the voter address of the proposal. Encoded as cosmos.AddressString. | +| `options` | [`WeightedVoteOption`](#cosmos-gov-v1-weightedvoteoption)[] | options is the weighted vote options. | +| `metadata` | `string` | metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 | + +### cosmos.gov.v1.VoteOption + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `VOTE_OPTION_UNSPECIFIED` | Zero value. Handlers reject it. | +| `VOTE_OPTION_YES` | | +| `VOTE_OPTION_ABSTAIN` | | +| `VOTE_OPTION_NO` | | +| `VOTE_OPTION_NO_WITH_VETO` | | + +### cosmos.gov.v1.VotingParams + +VotingParams defines the params for voting on governance proposals. + +| Field | Type | Description | +| --- | --- | --- | +| `voting_period` | `Duration` | Duration of the voting period. | + +### cosmos.gov.v1.WeightedVoteOption + +WeightedVoteOption defines a unit of vote for vote split. + +| Field | Type | Description | +| --- | --- | --- | +| `option` | [`VoteOption`](#cosmos-gov-v1-voteoption) | option defines the valid vote options, it must not contain duplicate vote options. | +| `weight` | `string` | weight is the vote weight associated with the vote option. Encoded as cosmos.Dec, a decimal string. | + +### cosmos.gov.v1beta1.Deposit + +Deposit defines an amount deposited by an account address to an active proposal. + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | amount to be deposited by depositor. | + +### cosmos.gov.v1beta1.DepositParams + +DepositParams defines the params for deposits on governance proposals. + +| Field | Type | Description | +| --- | --- | --- | +| `min_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | Minimum deposit for a proposal to enter voting period. | +| `max_deposit_period` | `Duration` | Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. | + +### cosmos.gov.v1beta1.Proposal + +Proposal defines the core field members of a governance proposal. + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `content` | `Any` | content is the proposal's content. One of: `/cosmos.distribution.v1beta1.CommunityPoolSpendProposal`, `/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit`, `/cosmos.gov.v1beta1.TextProposal`, `/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal`, `/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal`. | +| `status` | [`ProposalStatus`](#cosmos-gov-v1beta1-proposalstatus) | status defines the proposal status. | +| `final_tally_result` | [`TallyResult`](#cosmos-gov-v1beta1-tallyresult) | final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. | +| `submit_time` | `Timestamp` | submit_time is the time of proposal submission. | +| `deposit_end_time` | `Timestamp` | deposit_end_time is the end time for deposition. | +| `total_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | total_deposit is the total deposit on the proposal. | +| `voting_start_time` | `Timestamp` | voting_start_time is the starting time to vote on a proposal. | +| `voting_end_time` | `Timestamp` | voting_end_time is the end time of voting on a proposal. | + +### cosmos.gov.v1beta1.ProposalStatus + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `PROPOSAL_STATUS_UNSPECIFIED` | Zero value. Handlers reject it. | +| `PROPOSAL_STATUS_DEPOSIT_PERIOD` | | +| `PROPOSAL_STATUS_VOTING_PERIOD` | | +| `PROPOSAL_STATUS_PASSED` | | +| `PROPOSAL_STATUS_REJECTED` | | +| `PROPOSAL_STATUS_FAILED` | | + +### cosmos.gov.v1beta1.TallyParams + +TallyParams defines the params for tallying votes on governance proposals. + +| Field | Type | Description | +| --- | --- | --- | +| `quorum` | `bytes` | Minimum percentage of total stake needed to vote for a result to be considered valid. Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | +| `threshold` | `bytes` | Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | +| `veto_threshold` | `bytes` | Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | + +### cosmos.gov.v1beta1.TallyResult + +TallyResult defines a standard tally for a governance proposal. + +| Field | Type | Description | +| --- | --- | --- | +| `yes` | `string` | yes is the number of yes votes on a proposal. Encoded as cosmos.Int. | +| `abstain` | `string` | abstain is the number of abstain votes on a proposal. Encoded as cosmos.Int. | +| `no` | `string` | no is the number of no votes on a proposal. Encoded as cosmos.Int. | +| `no_with_veto` | `string` | no_with_veto is the number of no with veto votes on a proposal. Encoded as cosmos.Int. | + +### cosmos.gov.v1beta1.Vote + +Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter is the voter address of the proposal. Encoded as cosmos.AddressString. | +| `option` | [`VoteOption`](#cosmos-gov-v1beta1-voteoption) | Deprecated: Prefer to use `options` instead. This field is set in queries if and only if `len(options) == 1` and that option has weight 1. In all other cases, this field will default to VOTE_OPTION_UNSPECIFIED. Deprecated. | +| `options` | [`WeightedVoteOption`](#cosmos-gov-v1beta1-weightedvoteoption)[] | options is the weighted vote options. | + +### cosmos.gov.v1beta1.VoteOption + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `VOTE_OPTION_UNSPECIFIED` | Zero value. Handlers reject it. | +| `VOTE_OPTION_YES` | | +| `VOTE_OPTION_ABSTAIN` | | +| `VOTE_OPTION_NO` | | +| `VOTE_OPTION_NO_WITH_VETO` | | + +### cosmos.gov.v1beta1.VotingParams + +VotingParams defines the params for voting on governance proposals. + +| Field | Type | Description | +| --- | --- | --- | +| `voting_period` | `Duration` | Duration of the voting period. | + +### cosmos.gov.v1beta1.WeightedVoteOption + +WeightedVoteOption defines a unit of vote for vote split. + +| Field | Type | Description | +| --- | --- | --- | +| `option` | [`VoteOption`](#cosmos-gov-v1beta1-voteoption) | option defines the valid vote options, it must not contain duplicate vote options. | +| `weight` | `string` | weight is the vote weight associated with the vote option. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | + + diff --git a/sdk/latest/api-reference/grpc/index.mdx b/sdk/latest/api-reference/grpc/index.mdx new file mode 100644 index 00000000..7b558ba8 --- /dev/null +++ b/sdk/latest/api-reference/grpc/index.mdx @@ -0,0 +1,106 @@ +--- +title: "gRPC Services" +description: "How Cosmos SDK gRPC services are named, and how to list and call them against a running node." +--- + +Each module defines its API in protobuf. A `service` block groups related methods, and each `rpc` inside it declares one method with exactly one request message and one response message. + +```proto +package cosmos.bank.v1beta1; + +service Query { + rpc AllBalances(QueryAllBalancesRequest) returns (QueryAllBalancesResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}"; + } +} +``` + +Three parts combine into the name a node answers to: + +```text +cosmos.bank.v1beta1 . Query / AllBalances + package service method +``` + +The `google.api.http` option on the method is what produces the REST route on port 1317. Methods without that option are reachable over gRPC only. + +Modules define `Query` services and `Msg` services: + +- `Query` services are registered into the gRPC query router and served on port 9090. +- `Msg` services are registered into the message service router, which is consulted only while a transaction is being delivered. + +## Scalar encodings + +Some fields use SDK encoding conventions layered on protobuf `string` or `bytes` types. + +| Annotation | Meaning | +| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `cosmos.Int` | Arbitrary-precision integer encoded as a base-10 string. `"8821829649"` means 8,821,829,649. | +| `cosmos.Dec` | Fixed-point decimal. Its encoding depends on the codec. | +| `cosmos.AddressString` | Bech32 account address, such as `cosmos1...` on the Cosmos Hub. | +| `cosmos.ValidatorAddressString` | Bech32 validator operator address, such as `cosmosvaloper1...`. | +| `cosmos.ConsensusAddressString` | Bech32 consensus address, such as `cosmosvalcons1...`. It is derived from the consensus key and differs from the operator address. | + +Account, operator, and consensus addresses belong to separate address spaces. Using the wrong type fails with `hrp does not match bech32 prefix`. Prefixes are chain-specific; query `cosmos.auth.v1beta1.Query/Bech32Prefix` to find them. + +### `cosmos.Dec` encodings + +The value 0.05 appears differently depending on where it is read or written: + +| Where | Form | Example | +| -------------------------------------------------------------- | --------------------------------------------------------- | ----------------------------------------------------- | +| Write through the CLI or `POST /cosmos/tx/v1beta1/encode` | Decimal string | `"0.05"` | +| Write with `grpcurl`, generated clients, or `Service/TxEncode` | Integer scaled by 10^18 | `"50000000000000000"` | +| Read through gRPC | Scaled integer, or its base64 encoding for `bytes` fields | `"50000000000000000"` or `"MTAwMDAwMDAwMDAwMDAwMDAw"` | +| Read through REST | Decimal string | `"0.050000000000000000"` | + +Field tables identify each field’s read encoding. When writing, transaction JSON uses decimal strings and protobuf JSON uses scaled integers. + +The wrong encoding may produce a valid but incorrect value. For example, `"50000000000000000"` in transaction JSON means fifty quadrillion, while the same value returned by `staking` as a scaled integer means 5%. + +## Other encodings + +JSON encodes `bytes` fields as base64. Hex input may decode successfully as base64 and produce the wrong value. + +A response’s `pagination.next_key` is already base64. Pass it back unchanged over gRPC. In a REST query string, percent-encode it so `+` is not interpreted as a space. + +An `Any` field contains an `@type` discriminator and the concrete message’s fields. For example, `cosmos.auth.v1beta1.Query/Account` may return a `BaseAccount`, `ModuleAccount`, or vesting account. + +Protobuf JSON usually omits fields with default values. A successful query with no matches may therefore return `{}` instead of an empty list. + +## List available services + +These pages cover the standard modules for one SDK version. Each chain registers its own services. When enabled, gRPC reflection gives the authoritative list: + +```bash +# List every service +grpcurl -plaintext localhost:9090 list + +# Describe one method +grpcurl -plaintext localhost:9090 describe \ + cosmos.bank.v1beta1.Query.AllBalances +``` + +If reflection is disabled, provide local proto files with `-import-path` and `-proto`. + +## Call a method + +Pass the request as JSON with `-d`. Fields accept either protobuf names such as `resolve_denom` or JSON names such as `resolveDenom`. + +```bash +grpcurl -plaintext \ + -d '{"address": "cosmos1..."}' \ + localhost:9090 cosmos.bank.v1beta1.Query/AllBalances +``` + +## Pagination + +List queries accept and return a `pagination` field. Use either an offset or a key: + +```bash +grpcurl -plaintext \ + -d '{"address": "cosmos1...", "pagination": {"limit": 10, "count_total": true}}' \ + localhost:9090 cosmos.bank.v1beta1.Query/AllBalances +``` + +Pass the returned `pagination.next_key` as `pagination.key` to request the next page. Key-based pagination is more efficient for large result sets. \ No newline at end of file diff --git a/sdk/latest/api-reference/grpc/mint.mdx b/sdk/latest/api-reference/grpc/mint.mdx new file mode 100644 index 00000000..469a2e62 --- /dev/null +++ b/sdk/latest/api-reference/grpc/mint.mdx @@ -0,0 +1,164 @@ +--- +title: "Mint" +description: "gRPC queries and transaction messages defined by the mint module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### AnnualProvisions + +AnnualProvisions current minting annual provisions value. + +| | | +| --- | --- | +| gRPC | `cosmos.mint.v1beta1.Query/AnnualProvisions` | +| REST | `GET /cosmos/mint/v1beta1/annual_provisions` | + +Request `QueryAnnualProvisionsRequest`: + +This message has no fields. + +Response `QueryAnnualProvisionsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `annual_provisions` | `bytes` | annual_provisions is the current minting annual provisions value. Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.mint.v1beta1.Query/AnnualProvisions +``` + +### Inflation + +Inflation returns the current minting inflation value. + +| | | +| --- | --- | +| gRPC | `cosmos.mint.v1beta1.Query/Inflation` | +| REST | `GET /cosmos/mint/v1beta1/inflation` | + +Request `QueryInflationRequest`: + +This message has no fields. + +Response `QueryInflationResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `inflation` | `bytes` | inflation is the current minting inflation value. Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.mint.v1beta1.Query/Inflation +``` + +### Params + +Params returns the total set of minting parameters. + +| | | +| --- | --- | +| gRPC | `cosmos.mint.v1beta1.Query/Params` | +| REST | `GET /cosmos/mint/v1beta1/params` | + +Request `QueryParamsRequest`: + +This message has no fields. + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `params` | [`Params`](#cosmos-mint-v1beta1-params) | params defines the parameters of the module. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.mint.v1beta1.Query/Params +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/latest/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/latest/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/latest/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### UpdateParams + +UpdateParams defines a governance operation for updating the x/mint module parameters. The authority is defaults to the x/gov module account. + +| | | +| --- | --- | +| Type URL | `/cosmos.mint.v1beta1.MsgUpdateParams` | +| Handler | `cosmos.mint.v1beta1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/x/mint/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `params` | [`Params`](#cosmos-mint-v1beta1-params) | params defines the x/mint parameters to update. NOTE: All parameters must be supplied. | + +In a transaction: + +```json +{ + "@type": "/cosmos.mint.v1beta1.MsgUpdateParams", + "authority": "<string>", + "params": { + "mint_denom": "<string>", + "inflation_rate_change": "<string>", + "inflation_max": "<string>", + "inflation_min": "<string>", + "goal_bonded": "<string>", + "blocks_per_year": "1", + "max_supply": "<string>" + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.mint.v1beta1.Params + +Params defines the parameters for the x/mint module. + +| Field | Type | Description | +| --- | --- | --- | +| `mint_denom` | `string` | type of coin to mint | +| `inflation_rate_change` | `string` | maximum annual change in inflation rate Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `inflation_max` | `string` | maximum inflation rate Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `inflation_min` | `string` | minimum inflation rate Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `goal_bonded` | `string` | goal of percent bonded atoms Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `blocks_per_year` | `uint64` | expected blocks per year | +| `max_supply` | `string` | maximum supply for the token. A value of "0" indicates an unlimited (infinite) maximum supply. Encoded as cosmos.Int. | + + diff --git a/sdk/latest/api-reference/grpc/reflection.mdx b/sdk/latest/api-reference/grpc/reflection.mdx new file mode 100644 index 00000000..4aa79cac --- /dev/null +++ b/sdk/latest/api-reference/grpc/reflection.mdx @@ -0,0 +1,48 @@ +--- +title: "Reflection" +description: "gRPC queries and transaction messages defined by the reflection module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### FileDescriptors + +FileDescriptors queries all the file descriptors in the app in order to enable easier generation of dynamic clients. + +| | | +| --- | --- | +| gRPC | `cosmos.reflection.v1.ReflectionService/FileDescriptors` | + +Request `FileDescriptorsRequest`: + +This message has no fields. + +Response `FileDescriptorsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `files` | `FileDescriptorProto`[] | files is the file descriptors. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.reflection.v1.ReflectionService/FileDescriptors +``` + diff --git a/sdk/latest/api-reference/grpc/slashing.mdx b/sdk/latest/api-reference/grpc/slashing.mdx new file mode 100644 index 00000000..d189abb2 --- /dev/null +++ b/sdk/latest/api-reference/grpc/slashing.mdx @@ -0,0 +1,233 @@ +--- +title: "Slashing" +description: "gRPC queries and transaction messages defined by the slashing module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### Params + +Params queries the parameters of slashing module + +| | | +| --- | --- | +| gRPC | `cosmos.slashing.v1beta1.Query/Params` | +| REST | `GET /cosmos/slashing/v1beta1/params` | + +Request `QueryParamsRequest`: + +This message has no fields. + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `params` | [`Params`](#cosmos-slashing-v1beta1-params) | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.slashing.v1beta1.Query/Params +``` + +### SigningInfo + +SigningInfo queries the signing info of given cons address + +| | | +| --- | --- | +| gRPC | `cosmos.slashing.v1beta1.Query/SigningInfo` | +| REST | `GET /cosmos/slashing/v1beta1/signing_infos/{consAddress}` | + +Request `QuerySigningInfoRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `cons_address` | `string` | cons_address is the address to query signing info of Encoded as cosmos.ConsensusAddressString. | + +Response `QuerySigningInfoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `val_signing_info` | [`ValidatorSigningInfo`](#cosmos-slashing-v1beta1-validatorsigninginfo) | val_signing_info is the signing info of requested val cons address | + +```bash +grpcurl -plaintext -d '{"cons_address":"<string>"}' \ + localhost:9090 cosmos.slashing.v1beta1.Query/SigningInfo +``` + +### SigningInfos + +SigningInfos queries signing info of all validators + +| | | +| --- | --- | +| gRPC | `cosmos.slashing.v1beta1.Query/SigningInfos` | +| REST | `GET /cosmos/slashing/v1beta1/signing_infos` | + +Request `QuerySigningInfosRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | | + +Response `QuerySigningInfosResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `info` | [`ValidatorSigningInfo`](#cosmos-slashing-v1beta1-validatorsigninginfo)[] | info is the signing info of all validators | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | | + +```bash +grpcurl -plaintext -d '{"pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.slashing.v1beta1.Query/SigningInfos +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/latest/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/latest/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/latest/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### Unjail + +Unjail defines a method for unjailing a jailed validator, thus returning them into the bonded validator set, so they can begin receiving provisions and rewards again. + +| | | +| --- | --- | +| Type URL | `/cosmos.slashing.v1beta1.MsgUnjail` | +| Handler | `cosmos.slashing.v1beta1.Msg/Unjail` | +| Signer | `validator_addr` | +| Amino name | `cosmos-sdk/MsgUnjail` | + +| Field | Type | Description | +| --- | --- | --- | +| `validator_addr` | `string` | Encoded as cosmos.ValidatorAddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.slashing.v1beta1.MsgUnjail", + "validator_addr": "<string>" +} +``` + +Response `MsgUnjailResponse`: + +This message has no fields. + +### UpdateParams + +UpdateParams defines a governance operation for updating the x/slashing module parameters. The authority defaults to the x/gov module account. + +| | | +| --- | --- | +| Type URL | `/cosmos.slashing.v1beta1.MsgUpdateParams` | +| Handler | `cosmos.slashing.v1beta1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/x/slashing/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `params` | [`Params`](#cosmos-slashing-v1beta1-params) | params defines the x/slashing parameters to update. NOTE: All parameters must be supplied. | + +In a transaction: + +```json +{ + "@type": "/cosmos.slashing.v1beta1.MsgUpdateParams", + "authority": "<string>", + "params": { + "signed_blocks_window": "1", + "min_signed_per_window": "0.05", + "downtime_jail_duration": "0s", + "slash_fraction_double_sign": "0.05", + "slash_fraction_downtime": "0.05" + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.slashing.v1beta1.Params + +Params represents the parameters used for by the slashing module. + +| Field | Type | Description | +| --- | --- | --- | +| `signed_blocks_window` | `int64` | | +| `min_signed_per_window` | `bytes` | Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | +| `downtime_jail_duration` | `Duration` | | +| `slash_fraction_double_sign` | `bytes` | Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | +| `slash_fraction_downtime` | `bytes` | Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | + +### cosmos.slashing.v1beta1.ValidatorSigningInfo + +ValidatorSigningInfo defines a validator's signing info for monitoring their liveness activity. + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | Encoded as cosmos.ConsensusAddressString. | +| `start_height` | `int64` | Height at which validator was first a candidate OR was un-jailed | +| `index_offset` | `int64` | Index which is incremented every time a validator is bonded in a block and _may_ have signed a pre-commit or not. This in conjunction with the signed_blocks_window param determines the index in the missed block bitmap. | +| `jailed_until` | `Timestamp` | Timestamp until which the validator is jailed due to liveness downtime. | +| `tombstoned` | `bool` | Whether or not a validator has been tombstoned (killed out of validator set). It is set once the validator commits an equivocation or for any other configured misbehavior. | +| `missed_blocks_counter` | `int64` | A counter of missed (unsigned) blocks. It is used to avoid unnecessary reads in the missed block bitmap. | + + diff --git a/sdk/latest/api-reference/grpc/staking.mdx b/sdk/latest/api-reference/grpc/staking.mdx new file mode 100644 index 00000000..5bed6b48 --- /dev/null +++ b/sdk/latest/api-reference/grpc/staking.mdx @@ -0,0 +1,966 @@ +--- +title: "Staking" +description: "gRPC queries and transaction messages defined by the staking module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### Delegation + +Delegation queries delegate info for given validator delegator pair. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/Delegation` | +| REST | `GET /cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr}` | + +Request `QueryDelegationRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_addr` | `string` | delegator_addr defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `validator_addr` | `string` | validator_addr defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryDelegationResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegation_response` | [`DelegationResponse`](#cosmos-staking-v1beta1-delegationresponse) | delegation_responses defines the delegation info of a delegation. | + +```bash +grpcurl -plaintext -d '{"delegator_addr":"<string>","validator_addr":"<string>"}' \ + localhost:9090 cosmos.staking.v1beta1.Query/Delegation +``` + +### DelegatorDelegations + +DelegatorDelegations queries all delegations of a given delegator address. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/DelegatorDelegations` | +| REST | `GET /cosmos/staking/v1beta1/delegations/{delegatorAddr}` | + +Request `QueryDelegatorDelegationsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_addr` | `string` | delegator_addr defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDelegatorDelegationsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegation_responses` | [`DelegationResponse`](#cosmos-staking-v1beta1-delegationresponse)[] | delegation_responses defines all the delegations' info of a delegator. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"delegator_addr":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.staking.v1beta1.Query/DelegatorDelegations +``` + +### DelegatorUnbondingDelegations + +DelegatorUnbondingDelegations queries all unbonding delegations of a given delegator address. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations` | +| REST | `GET /cosmos/staking/v1beta1/delegators/{delegatorAddr}/unbonding_delegations` | + +Request `QueryDelegatorUnbondingDelegationsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_addr` | `string` | delegator_addr defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDelegatorUnbondingDelegationsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `unbonding_responses` | [`UnbondingDelegation`](#cosmos-staking-v1beta1-unbondingdelegation)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"delegator_addr":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations +``` + +### DelegatorValidator + +DelegatorValidator queries validator info for given delegator validator pair. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/DelegatorValidator` | +| REST | `GET /cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators/{validatorAddr}` | + +Request `QueryDelegatorValidatorRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_addr` | `string` | delegator_addr defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `validator_addr` | `string` | validator_addr defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryDelegatorValidatorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator` | [`Validator`](#cosmos-staking-v1beta1-validator) | validator defines the validator info. | + +```bash +grpcurl -plaintext -d '{"delegator_addr":"<string>","validator_addr":"<string>"}' \ + localhost:9090 cosmos.staking.v1beta1.Query/DelegatorValidator +``` + +### DelegatorValidators + +DelegatorValidators queries all validators info for given delegator address. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/DelegatorValidators` | +| REST | `GET /cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators` | + +Request `QueryDelegatorValidatorsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_addr` | `string` | delegator_addr defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDelegatorValidatorsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `validators` | [`Validator`](#cosmos-staking-v1beta1-validator)[] | validators defines the validators' info of a delegator. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"delegator_addr":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.staking.v1beta1.Query/DelegatorValidators +``` + +### HistoricalInfo + +HistoricalInfo queries the historical info for given height. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/HistoricalInfo` | +| REST | `GET /cosmos/staking/v1beta1/historical_info/{height}` | + +Request `QueryHistoricalInfoRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | height defines at which height to query the historical info. | + +Response `QueryHistoricalInfoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `hist` | [`HistoricalInfo`](#cosmos-staking-v1beta1-historicalinfo) | hist defines the historical info at the given height. | + +```bash +grpcurl -plaintext -d '{"height":"1"}' \ + localhost:9090 cosmos.staking.v1beta1.Query/HistoricalInfo +``` + +### Params + +Parameters queries the staking parameters. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/Params` | +| REST | `GET /cosmos/staking/v1beta1/params` | + +Request `QueryParamsRequest`: + +This message has no fields. + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `params` | [`Params`](#cosmos-staking-v1beta1-params) | params holds all the parameters of this module. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.staking.v1beta1.Query/Params +``` + +### Pool + +Pool queries the pool info. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/Pool` | +| REST | `GET /cosmos/staking/v1beta1/pool` | + +Request `QueryPoolRequest`: + +This message has no fields. + +Response `QueryPoolResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `pool` | [`Pool`](#cosmos-staking-v1beta1-pool) | pool defines the pool info. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.staking.v1beta1.Query/Pool +``` + +### Redelegations + +Redelegations queries redelegations of given address. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/Redelegations` | +| REST | `GET /cosmos/staking/v1beta1/delegators/{delegatorAddr}/redelegations` | + +Request `QueryRedelegationsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_addr` | `string` | delegator_addr defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `src_validator_addr` | `string` | src_validator_addr defines the validator address to redelegate from. Encoded as cosmos.ValidatorAddressString. | +| `dst_validator_addr` | `string` | dst_validator_addr defines the validator address to redelegate to. Encoded as cosmos.ValidatorAddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryRedelegationsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `redelegation_responses` | [`RedelegationResponse`](#cosmos-staking-v1beta1-redelegationresponse)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"delegator_addr":"<string>","src_validator_addr":"<string>","dst_validator_addr":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.staking.v1beta1.Query/Redelegations +``` + +### UnbondingDelegation + +UnbondingDelegation queries unbonding info for given validator delegator pair. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/UnbondingDelegation` | +| REST | `GET /cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr}/unbonding_delegation` | + +Request `QueryUnbondingDelegationRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_addr` | `string` | delegator_addr defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `validator_addr` | `string` | validator_addr defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryUnbondingDelegationResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `unbond` | [`UnbondingDelegation`](#cosmos-staking-v1beta1-unbondingdelegation) | unbond defines the unbonding information of a delegation. | + +```bash +grpcurl -plaintext -d '{"delegator_addr":"<string>","validator_addr":"<string>"}' \ + localhost:9090 cosmos.staking.v1beta1.Query/UnbondingDelegation +``` + +### Validator + +Validator queries validator info for given validator address. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/Validator` | +| REST | `GET /cosmos/staking/v1beta1/validators/{validatorAddr}` | + +Request `QueryValidatorRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_addr` | `string` | validator_addr defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryValidatorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator` | [`Validator`](#cosmos-staking-v1beta1-validator) | validator defines the validator info. | + +```bash +grpcurl -plaintext -d '{"validator_addr":"<string>"}' \ + localhost:9090 cosmos.staking.v1beta1.Query/Validator +``` + +### ValidatorDelegations + +ValidatorDelegations queries delegate info for given validator. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/ValidatorDelegations` | +| REST | `GET /cosmos/staking/v1beta1/validators/{validatorAddr}/delegations` | + +Request `QueryValidatorDelegationsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_addr` | `string` | validator_addr defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryValidatorDelegationsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegation_responses` | [`DelegationResponse`](#cosmos-staking-v1beta1-delegationresponse)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"validator_addr":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.staking.v1beta1.Query/ValidatorDelegations +``` + +### Validators + +Validators queries all validators that match the given status. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/Validators` | +| REST | `GET /cosmos/staking/v1beta1/validators` | + +Request `QueryValidatorsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `status` | `string` | status enables to query for validators matching a given status. One of the [`BondStatus`](#cosmos-staking-v1beta1-bondstatus) values. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryValidatorsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `validators` | [`Validator`](#cosmos-staking-v1beta1-validator)[] | validators contains all the queried validators. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"status":"BOND_STATUS_UNBONDED","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.staking.v1beta1.Query/Validators +``` + +### ValidatorUnbondingDelegations + +ValidatorUnbondingDelegations queries unbonding delegations of a validator. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations` | +| REST | `GET /cosmos/staking/v1beta1/validators/{validatorAddr}/unbonding_delegations` | + +Request `QueryValidatorUnbondingDelegationsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_addr` | `string` | validator_addr defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryValidatorUnbondingDelegationsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `unbonding_responses` | [`UnbondingDelegation`](#cosmos-staking-v1beta1-unbondingdelegation)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"validator_addr":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/latest/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/latest/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/latest/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### BeginRedelegate + +BeginRedelegate defines a method for performing a redelegation of coins from a delegator and source validator to a destination validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgBeginRedelegate` | +| Handler | `cosmos.staking.v1beta1.Msg/BeginRedelegate` | +| Signer | `delegator_address` | +| Amino name | `cosmos-sdk/MsgBeginRedelegate` | + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | Encoded as cosmos.AddressString. | +| `validator_src_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `validator_dst_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin) | | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgBeginRedelegate", + "delegator_address": "<string>", + "validator_src_address": "<string>", + "validator_dst_address": "<string>", + "amount": { + "denom": "<string>", + "amount": "<string>" + } +} +``` + +Response `MsgBeginRedelegateResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `completion_time` | `Timestamp` | | + +### CancelUnbondingDelegation + +CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation and delegate back to previous validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation` | +| Handler | `cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation` | +| Signer | `delegator_address` | +| Amino name | `cosmos-sdk/MsgCancelUnbondingDelegation` | + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | Encoded as cosmos.AddressString. | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin) | amount is always less than or equal to unbonding delegation entry balance | +| `creation_height` | `int64` | creation_height is the height which the unbonding took place. | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", + "delegator_address": "<string>", + "validator_address": "<string>", + "amount": { + "denom": "<string>", + "amount": "<string>" + }, + "creation_height": "1" +} +``` + +Response `MsgCancelUnbondingDelegationResponse`: + +This message has no fields. + +### CreateValidator + +CreateValidator defines a method for creating a new validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgCreateValidator` | +| Handler | `cosmos.staking.v1beta1.Msg/CreateValidator` | +| Signer | `validator_address` | +| Amino name | `cosmos-sdk/MsgCreateValidator` | + +| Field | Type | Description | +| --- | --- | --- | +| `description` | [`Description`](#cosmos-staking-v1beta1-description) | | +| `commission` | [`CommissionRates`](#cosmos-staking-v1beta1-commissionrates) | | +| `min_self_delegation` | `string` | Encoded as cosmos.Int. | +| `delegator_address` | `string` | Deprecated: Use of Delegator Address in MsgCreateValidator is deprecated. The validator address bytes and delegator address bytes refer to the same account while creating validator (defer only in bech32 notation). Deprecated. Encoded as cosmos.AddressString. | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `pubkey` | `Any` | Accepts any message implementing cosmos.crypto.PubKey. | +| `value` | [`Coin`](#cosmos-base-v1beta1-coin) | | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", + "description": { + "moniker": "<string>", + "identity": "<string>", + "website": "<string>", + "security_contact": "<string>", + "details": "<string>" + }, + "commission": { + "rate": "<string>", + "max_rate": "<string>", + "max_change_rate": "<string>" + }, + "min_self_delegation": "<string>", + "validator_address": "<string>", + "pubkey": { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + }, + "value": { + "denom": "<string>", + "amount": "<string>" + } +} +``` + +Response `MsgCreateValidatorResponse`: + +This message has no fields. + +### Delegate + +Delegate defines a method for performing a delegation of coins from a delegator to a validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgDelegate` | +| Handler | `cosmos.staking.v1beta1.Msg/Delegate` | +| Signer | `delegator_address` | +| Amino name | `cosmos-sdk/MsgDelegate` | + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | Encoded as cosmos.AddressString. | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin) | | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgDelegate", + "delegator_address": "<string>", + "validator_address": "<string>", + "amount": { + "denom": "<string>", + "amount": "<string>" + } +} +``` + +Response `MsgDelegateResponse`: + +This message has no fields. + +### EditValidator + +EditValidator defines a method for editing an existing validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgEditValidator` | +| Handler | `cosmos.staking.v1beta1.Msg/EditValidator` | +| Signer | `validator_address` | +| Amino name | `cosmos-sdk/MsgEditValidator` | + +| Field | Type | Description | +| --- | --- | --- | +| `description` | [`Description`](#cosmos-staking-v1beta1-description) | | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `commission_rate` | `string` | We pass a reference to the new commission rate and min self delegation as it's not mandatory to update. If not updated, the deserialized rate will be zero with no way to distinguish if an update was intended. REF: #2373 Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `min_self_delegation` | `string` | Encoded as cosmos.Int. | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgEditValidator", + "description": { + "moniker": "<string>", + "identity": "<string>", + "website": "<string>", + "security_contact": "<string>", + "details": "<string>" + }, + "validator_address": "<string>", + "commission_rate": "<string>", + "min_self_delegation": "<string>" +} +``` + +Response `MsgEditValidatorResponse`: + +This message has no fields. + +### RotateConsPubKey + +RotateConsPubKey defines an operation for rotating the consensus keys of a validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgRotateConsPubKey` | +| Handler | `cosmos.staking.v1beta1.Msg/RotateConsPubKey` | +| Signer | `validator_address` | +| Amino name | `cosmos-sdk/MsgRotateConsPubKey` | + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `new_pubkey` | `Any` | Accepts any message implementing cosmos.crypto.PubKey. | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgRotateConsPubKey", + "validator_address": "<string>", + "new_pubkey": { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + } +} +``` + +Response `MsgRotateConsPubKeyResponse`: + +This message has no fields. + +### Undelegate + +Undelegate defines a method for performing an undelegation from a delegate and a validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgUndelegate` | +| Handler | `cosmos.staking.v1beta1.Msg/Undelegate` | +| Signer | `delegator_address` | +| Amino name | `cosmos-sdk/MsgUndelegate` | + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | Encoded as cosmos.AddressString. | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin) | | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgUndelegate", + "delegator_address": "<string>", + "validator_address": "<string>", + "amount": { + "denom": "<string>", + "amount": "<string>" + } +} +``` + +Response `MsgUndelegateResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `completion_time` | `Timestamp` | | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin) | amount returns the amount of undelegated coins | + +### UpdateParams + +UpdateParams defines an operation for updating the x/staking module parameters. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgUpdateParams` | +| Handler | `cosmos.staking.v1beta1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/x/staking/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `params` | [`Params`](#cosmos-staking-v1beta1-params) | params defines the x/staking parameters to update. NOTE: All parameters must be supplied. | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgUpdateParams", + "authority": "<string>", + "params": { + "unbonding_time": "0s", + "max_validators": 0, + "max_entries": 0, + "historical_entries": 0, + "bond_denom": "<string>", + "min_commission_rate": "<string>", + "key_rotation_fee": { + "denom": "<string>", + "amount": "<string>" + } + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.base.v1beta1.Coin + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `amount` | `string` | Encoded as cosmos.Int. | + +### cosmos.staking.v1beta1.BondStatus + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `BOND_STATUS_UNSPECIFIED` | Zero value. Handlers reject it. | +| `BOND_STATUS_UNBONDED` | | +| `BOND_STATUS_UNBONDING` | | +| `BOND_STATUS_BONDED` | | + +### cosmos.staking.v1beta1.Commission + +Commission defines commission parameters for a given validator. + +| Field | Type | Description | +| --- | --- | --- | +| `commission_rates` | [`CommissionRates`](#cosmos-staking-v1beta1-commissionrates) | commission_rates defines the initial commission rates to be used for creating a validator. | +| `update_time` | `Timestamp` | update_time is the last time the commission rate was changed. | + +### cosmos.staking.v1beta1.CommissionRates + +CommissionRates defines the initial commission rates to be used for creating a validator. + +| Field | Type | Description | +| --- | --- | --- | +| `rate` | `string` | rate is the commission rate charged to delegators, as a fraction. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `max_rate` | `string` | max_rate defines the maximum commission rate which validator can ever charge, as a fraction. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `max_change_rate` | `string` | max_change_rate defines the maximum daily increase of the validator commission, as a fraction. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | + +### cosmos.staking.v1beta1.Delegation + +Delegation represents the bond with tokens held by an account. It is owned by one delegator, and is associated with the voting power of one validator. + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address is the encoded address of the delegator. Encoded as cosmos.AddressString. | +| `validator_address` | `string` | validator_address is the encoded address of the validator. Encoded as cosmos.ValidatorAddressString. | +| `shares` | `string` | shares define the delegation shares received. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | + +### cosmos.staking.v1beta1.DelegationResponse + +DelegationResponse is equivalent to Delegation except that it contains a balance in addition to shares which is more suitable for client responses. + +| Field | Type | Description | +| --- | --- | --- | +| `delegation` | [`Delegation`](#cosmos-staking-v1beta1-delegation) | | +| `balance` | [`Coin`](#cosmos-base-v1beta1-coin) | | + +### cosmos.staking.v1beta1.Description + +Description defines a validator description. + +| Field | Type | Description | +| --- | --- | --- | +| `moniker` | `string` | moniker defines a human-readable name for the validator. | +| `identity` | `string` | identity defines an optional identity signature (ex. UPort or Keybase). | +| `website` | `string` | website defines an optional website link. | +| `security_contact` | `string` | security_contact defines an optional email for security contact. | +| `details` | `string` | details define other optional details. | + +### cosmos.staking.v1beta1.HistoricalInfo + +HistoricalInfo contains header and validator information for a given block. It is stored as part of staking module's state, which persists the `n` most recent HistoricalInfo (`n` is set by the staking module's `historical_entries` parameter). + +| Field | Type | Description | +| --- | --- | --- | +| `header` | `Header` | | +| `valset` | [`Validator`](#cosmos-staking-v1beta1-validator)[] | | + +### cosmos.staking.v1beta1.Params + +Params defines the parameters for the x/staking module. + +| Field | Type | Description | +| --- | --- | --- | +| `unbonding_time` | `Duration` | unbonding_time is the time duration of unbonding. | +| `max_validators` | `uint32` | max_validators is the maximum number of validators. | +| `max_entries` | `uint32` | max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). | +| `historical_entries` | `uint32` | historical_entries is the number of historical entries to persist. | +| `bond_denom` | `string` | bond_denom defines the bondable coin denomination. | +| `min_commission_rate` | `string` | min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `key_rotation_fee` | [`Coin`](#cosmos-base-v1beta1-coin) | key_rotation_fee is the fee charged when rotating a validator's consensus key. | + +### cosmos.staking.v1beta1.Pool + +Pool is used for tracking bonded and not-bonded token supply of the bond denomination. + +| Field | Type | Description | +| --- | --- | --- | +| `not_bonded_tokens` | `string` | Encoded as cosmos.Int. | +| `bonded_tokens` | `string` | Encoded as cosmos.Int. | + +### cosmos.staking.v1beta1.Redelegation + +Redelegation contains the list of a particular delegator's redelegating bonds from a particular source validator to a particular destination validator. + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address is the bech32-encoded address of the delegator. Encoded as cosmos.AddressString. | +| `validator_src_address` | `string` | validator_src_address is the validator redelegation source operator address. Encoded as cosmos.ValidatorAddressString. | +| `validator_dst_address` | `string` | validator_dst_address is the validator redelegation destination operator address. Encoded as cosmos.ValidatorAddressString. | +| `entries` | [`RedelegationEntry`](#cosmos-staking-v1beta1-redelegationentry)[] | entries are the redelegation entries. | + +### cosmos.staking.v1beta1.RedelegationEntry + +RedelegationEntry defines a redelegation object with relevant metadata. + +| Field | Type | Description | +| --- | --- | --- | +| `creation_height` | `int64` | creation_height defines the height which the redelegation took place. | +| `completion_time` | `Timestamp` | completion_time defines the unix time for redelegation completion. | +| `initial_balance` | `string` | initial_balance defines the initial balance when redelegation started. Encoded as cosmos.Int. | +| `shares_dst` | `string` | shares_dst is the amount of destination-validator shares created by redelegation. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `unbonding_id` | `uint64` | Incrementing id that uniquely identifies this entry | +| `unbonding_on_hold_ref_count` | `int64` | Strictly positive if this entry's unbonding has been stopped by external modules | + +### cosmos.staking.v1beta1.RedelegationEntryResponse + +RedelegationEntryResponse is equivalent to a RedelegationEntry except that it contains a balance in addition to shares which is more suitable for client responses. + +| Field | Type | Description | +| --- | --- | --- | +| `redelegation_entry` | [`RedelegationEntry`](#cosmos-staking-v1beta1-redelegationentry) | | +| `balance` | `string` | Encoded as cosmos.Int. | + +### cosmos.staking.v1beta1.RedelegationResponse + +RedelegationResponse is equivalent to a Redelegation except that its entries contain a balance in addition to shares which is more suitable for client responses. + +| Field | Type | Description | +| --- | --- | --- | +| `redelegation` | [`Redelegation`](#cosmos-staking-v1beta1-redelegation) | | +| `entries` | [`RedelegationEntryResponse`](#cosmos-staking-v1beta1-redelegationentryresponse)[] | | + +### cosmos.staking.v1beta1.UnbondingDelegation + +UnbondingDelegation stores all of a single delegator's unbonding bonds for a single validator in an time-ordered list. + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address is the encoded address of the delegator. Encoded as cosmos.AddressString. | +| `validator_address` | `string` | validator_address is the encoded address of the validator. Encoded as cosmos.ValidatorAddressString. | +| `entries` | [`UnbondingDelegationEntry`](#cosmos-staking-v1beta1-unbondingdelegationentry)[] | entries are the unbonding delegation entries. | + +### cosmos.staking.v1beta1.UnbondingDelegationEntry + +UnbondingDelegationEntry defines an unbonding object with relevant metadata. + +| Field | Type | Description | +| --- | --- | --- | +| `creation_height` | `int64` | creation_height is the height which the unbonding took place. | +| `completion_time` | `Timestamp` | completion_time is the unix time for unbonding completion. | +| `initial_balance` | `string` | initial_balance defines the tokens initially scheduled to receive at completion. Encoded as cosmos.Int. | +| `balance` | `string` | balance defines the tokens to receive at completion. Encoded as cosmos.Int. | +| `unbonding_id` | `uint64` | Incrementing id that uniquely identifies this entry | +| `unbonding_on_hold_ref_count` | `int64` | Strictly positive if this entry's unbonding has been stopped by external modules | + +### cosmos.staking.v1beta1.Validator + +Validator defines a validator, together with the total amount of the Validator's bond shares and their exchange rate to coins. Slashing results in a decrease in the exchange rate, allowing correct calculation of future undelegations without iterating over delegators. When coins are delegated to this validator, the validator is credited with a delegation whose number of bond shares is based on the amount of coins delegated divided by the current exchange rate. Voting power can be calculated as total bonded shares multiplied by exchange rate. + +| Field | Type | Description | +| --- | --- | --- | +| `operator_address` | `string` | operator_address defines the address of the validator's operator; bech encoded in JSON. Encoded as cosmos.AddressString. | +| `consensus_pubkey` | `Any` | consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. Accepts any message implementing cosmos.crypto.PubKey. | +| `jailed` | `bool` | jailed defined whether the validator has been jailed from bonded status or not. | +| `status` | [`BondStatus`](#cosmos-staking-v1beta1-bondstatus) | status is the validator status (bonded/unbonding/unbonded). | +| `tokens` | `string` | tokens define the delegated tokens (incl. self-delegation). Encoded as cosmos.Int. | +| `delegator_shares` | `string` | delegator_shares defines total shares issued to a validator's delegators. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `description` | [`Description`](#cosmos-staking-v1beta1-description) | description defines the description terms for the validator. | +| `unbonding_height` | `int64` | unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. | +| `unbonding_time` | `Timestamp` | unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. | +| `commission` | [`Commission`](#cosmos-staking-v1beta1-commission) | commission defines the commission parameters. | +| `min_self_delegation` | `string` | min_self_delegation is the validator's self declared minimum self delegation. Encoded as cosmos.Int. | +| `unbonding_on_hold_ref_count` | `int64` | strictly positive if this validator's unbonding has been stopped by external modules | +| `unbonding_ids` | `uint64`[] | list of unbonding ids, each uniquely identifying an unbonding of this validator | + + diff --git a/sdk/latest/api-reference/grpc/store.mdx b/sdk/latest/api-reference/grpc/store.mdx new file mode 100644 index 00000000..25b07397 --- /dev/null +++ b/sdk/latest/api-reference/grpc/store.mdx @@ -0,0 +1,91 @@ +--- +title: "Store" +description: "gRPC queries and transaction messages defined by the store module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### ListenCommit + +ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit + +| | | +| --- | --- | +| gRPC | `cosmos.store.streaming.abci.ABCIListenerService/ListenCommit` | + +Request `ListenCommitRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `block_height` | `int64` | explicitly pass in block height as ResponseCommit does not contain this info | +| `res` | `ResponseCommit` | | +| `change_set` | [`StoreKVPair`](#cosmos-store-v1beta1-storekvpair)[] | | + +Response `ListenCommitResponse`: + +This message has no fields. + +```bash +grpcurl -plaintext -d '{"block_height":"1","res":{"retain_height":"1"},"change_set":[{"store_key":"<string>","delete":false,"key":"","value":""}]}' \ + localhost:9090 cosmos.store.streaming.abci.ABCIListenerService/ListenCommit +``` + +### ListenFinalizeBlock + +ListenFinalizeBlock is the corresponding endpoint for ABCIListener.ListenEndBlock + +| | | +| --- | --- | +| gRPC | `cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock` | + +Request `ListenFinalizeBlockRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `req` | `RequestFinalizeBlock` | | +| `res` | `ResponseFinalizeBlock` | | + +Response `ListenFinalizeBlockResponse`: + +This message has no fields. + +```bash +grpcurl -plaintext -d '{"req":{"txs":[""],"decided_last_commit":{"round":0,"votes":[{"validator":{"address":"","power":"1"},"block_id_flag":"BLOCK_ID_FLAG_UNKNOWN"}]},"misbehavior":[{"type":"UNKNOWN","validator":{"address":"","power":"1"},"height":"1","time":"<RFC 3339 timestamp>","total_voting_power":"1"}],"hash":"","height":"1","time":"<RFC 3339 timestamp>","next_validators_hash":"","proposer_address":""},"res":{"events":[{"type":"NEW","attributes":[{"key":"<string>","value":"<string>","index":false}]}],"tx_results":[{"code":0,"data":"","log":"<string>","info":"<string>","gas_wanted":"1","gas_used":"1","events":[{"type":"NEW","attributes":[{"key":"<string>","value":"<string>","index":false}]}],"codespace":"<string>"}],"validator_updates":[{"pub_key":{"ed25519":""},"power":"1"}],"consensus_param_updates":{"block":{"max_bytes":"1","max_gas":"1"},"evidence":{"max_age_num_blocks":"1","max_age_duration":"0s","max_bytes":"1"},"validator":{"pub_key_types":["<string>"]},"version":{"app":"1"},"abci":{"vote_extensions_enable_height":"1"},"authority":{"authority":"<string>"}},"app_hash":""}}' \ + localhost:9090 cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock +``` + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.store.v1beta1.StoreKVPair + +StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and Deletes + +| Field | Type | Description | +| --- | --- | --- | +| `store_key` | `string` | | +| `delete` | `bool` | | +| `key` | `bytes` | | +| `value` | `bytes` | | + + diff --git a/sdk/latest/api-reference/grpc/tx.mdx b/sdk/latest/api-reference/grpc/tx.mdx new file mode 100644 index 00000000..c8d04f28 --- /dev/null +++ b/sdk/latest/api-reference/grpc/tx.mdx @@ -0,0 +1,517 @@ +--- +title: "Tx" +description: "gRPC queries and transaction messages defined by the tx module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### BroadcastTx + +BroadcastTx broadcast transaction. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/BroadcastTx` | +| REST | `POST /cosmos/tx/v1beta1/txs` | + +Request `BroadcastTxRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx_bytes` | `bytes` | tx_bytes is the raw transaction. | +| `mode` | [`BroadcastMode`](#cosmos-tx-v1beta1-broadcastmode) | | + +Response `BroadcastTxResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx_response` | [`TxResponse`](#cosmos-base-abci-v1beta1-txresponse) | tx_response is the queried TxResponses. | + +```bash +grpcurl -plaintext -d '{"tx_bytes":"","mode":"BROADCAST_MODE_SYNC"}' \ + localhost:9090 cosmos.tx.v1beta1.Service/BroadcastTx +``` + +### GetBlockWithTxs + +GetBlockWithTxs fetches a block with decoded txs. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/GetBlockWithTxs` | +| REST | `GET /cosmos/tx/v1beta1/txs/block/{height}` | + +Request `GetBlockWithTxsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | height is the height of the block to query. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines a pagination for the request. | + +Response `GetBlockWithTxsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `txs` | [`Tx`](#cosmos-tx-v1beta1-tx)[] | txs are the transactions in the block. | +| `block_id` | `BlockID` | | +| `block` | `Block` | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines a pagination for the response. | + +```bash +grpcurl -plaintext -d '{"height":"1","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.tx.v1beta1.Service/GetBlockWithTxs +``` + +### GetTx + +GetTx fetches a tx by hash. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/GetTx` | +| REST | `GET /cosmos/tx/v1beta1/txs/{hash}` | + +Request `GetTxRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `hash` | `string` | hash is the tx hash to query, encoded as a hex string. | + +Response `GetTxResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx` | [`Tx`](#cosmos-tx-v1beta1-tx) | tx is the queried transaction. | +| `tx_response` | [`TxResponse`](#cosmos-base-abci-v1beta1-txresponse) | tx_response is the queried TxResponses. | + +```bash +grpcurl -plaintext -d '{"hash":"<string>"}' \ + localhost:9090 cosmos.tx.v1beta1.Service/GetTx +``` + +### GetTxsEvent + +GetTxsEvent fetches txs by event. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/GetTxsEvent` | +| REST | `GET /cosmos/tx/v1beta1/txs` | + +Request `GetTxsEventRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `events` | `string`[] | events is the list of transaction event type. Deprecated post v0.47.x: use query instead, which should contain a valid events query. Deprecated. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines a pagination for the request. Deprecated post v0.46.x: use page and limit instead. Deprecated. | +| `order_by` | [`OrderBy`](#cosmos-tx-v1beta1-orderby) | | +| `page` | `uint64` | page is the page number to query, starts at 1. If not provided, will default to first page. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `query` | `string` | query defines the transaction event query that is proxied to Tendermint's TxSearch RPC method. The query must be valid. | + +Response `GetTxsEventResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `txs` | [`Tx`](#cosmos-tx-v1beta1-tx)[] | txs is the list of queried transactions. | +| `tx_responses` | [`TxResponse`](#cosmos-base-abci-v1beta1-txresponse)[] | tx_responses is the list of queried TxResponses. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines a pagination for the response. Deprecated post v0.46.x: use total instead. Deprecated. | +| `total` | `uint64` | total is total number of results available | + +```bash +grpcurl -plaintext -d '{"order_by":"ORDER_BY_ASC","page":"1","limit":"1","query":"<string>"}' \ + localhost:9090 cosmos.tx.v1beta1.Service/GetTxsEvent +``` + +### Simulate + +Simulate simulates executing a transaction for estimating gas usage. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/Simulate` | +| REST | `POST /cosmos/tx/v1beta1/simulate` | + +Request `SimulateRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx` | [`Tx`](#cosmos-tx-v1beta1-tx) | tx is the transaction to simulate. Deprecated. Send raw tx bytes instead. Deprecated. | +| `tx_bytes` | `bytes` | tx_bytes is the raw transaction. | + +Response `SimulateResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `gas_info` | [`GasInfo`](#cosmos-base-abci-v1beta1-gasinfo) | gas_info is the information about gas used in the simulation. | +| `result` | [`Result`](#cosmos-base-abci-v1beta1-result) | result is the result of the simulation. | + +```bash +grpcurl -plaintext -d '{"tx_bytes":""}' \ + localhost:9090 cosmos.tx.v1beta1.Service/Simulate +``` + +### TxDecode + +TxDecode decodes the transaction. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/TxDecode` | +| REST | `POST /cosmos/tx/v1beta1/decode` | + +Request `TxDecodeRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx_bytes` | `bytes` | tx_bytes is the raw transaction. | + +Response `TxDecodeResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx` | [`Tx`](#cosmos-tx-v1beta1-tx) | tx is the decoded transaction. | + +```bash +grpcurl -plaintext -d '{"tx_bytes":""}' \ + localhost:9090 cosmos.tx.v1beta1.Service/TxDecode +``` + +### TxDecodeAmino + +TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/TxDecodeAmino` | +| REST | `POST /cosmos/tx/v1beta1/decode/amino` | + +Request `TxDecodeAminoRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `amino_binary` | `bytes` | | + +Response `TxDecodeAminoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `amino_json` | `string` | | + +```bash +grpcurl -plaintext -d '{"amino_binary":""}' \ + localhost:9090 cosmos.tx.v1beta1.Service/TxDecodeAmino +``` + +### TxEncode + +TxEncode encodes the transaction. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/TxEncode` | +| REST | `POST /cosmos/tx/v1beta1/encode` | + +Request `TxEncodeRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx` | [`Tx`](#cosmos-tx-v1beta1-tx) | tx is the transaction to encode. | + +Response `TxEncodeResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx_bytes` | `bytes` | tx_bytes is the encoded transaction bytes. | + +```bash +grpcurl -plaintext -d '{"tx":{"body":{"messages":[{"@type":"/cosmos.example.v1.MsgExample","...":"the fields of that message, inline"}],"memo":"<string>","timeout_height":"1","unordered":false,"timeout_timestamp":"<RFC 3339 timestamp>","extension_options":[{"@type":"/cosmos.example.v1.MsgExample","...":"the fields of that message, inline"}],"non_critical_extension_options":[{"@type":"/cosmos.example.v1.MsgExample","...":"the fields of that message, inline"}]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.example.v1.MsgExample","...":"the fields of that message, inline"},"mode_info":{"single":{}},"sequence":"1"}],"fee":{"amount":[{"denom":"<string>","amount":"<string>"}],"gas_limit":"1","payer":"<string>","granter":"<string>"}},"signatures":[""]}}' \ + localhost:9090 cosmos.tx.v1beta1.Service/TxEncode +``` + +### TxEncodeAmino + +TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/TxEncodeAmino` | +| REST | `POST /cosmos/tx/v1beta1/encode/amino` | + +Request `TxEncodeAminoRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `amino_json` | `string` | | + +Response `TxEncodeAminoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `amino_binary` | `bytes` | | + +```bash +grpcurl -plaintext -d '{"amino_json":"<string>"}' \ + localhost:9090 cosmos.tx.v1beta1.Service/TxEncodeAmino +``` + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.abci.v1beta1.ABCIMessageLog + +ABCIMessageLog defines a structure containing an indexed tx ABCI message log. + +| Field | Type | Description | +| --- | --- | --- | +| `msg_index` | `uint32` | | +| `log` | `string` | | +| `events` | [`StringEvent`](#cosmos-base-abci-v1beta1-stringevent)[] | Events contains a slice of Event objects that were emitted during some execution. | + +### cosmos.base.abci.v1beta1.Attribute + +Attribute defines an attribute wrapper where the key and value are strings instead of raw bytes. + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `string` | | +| `value` | `string` | | + +### cosmos.base.abci.v1beta1.GasInfo + +GasInfo defines tx execution gas context. + +| Field | Type | Description | +| --- | --- | --- | +| `gas_wanted` | `uint64` | GasWanted is the maximum units of work we allow this tx to perform. | +| `gas_used` | `uint64` | GasUsed is the amount of gas actually consumed. | + +### cosmos.base.abci.v1beta1.Result + +Result is the union of ResponseFormat and ResponseCheckTx. + +| Field | Type | Description | +| --- | --- | --- | +| `data` | `bytes` | Data is any data returned from message or handler execution. It MUST be length prefixed in order to separate data from multiple message executions. Deprecated. This field is still populated, but prefer msg_response instead because it also contains the Msg response typeURL. Deprecated. | +| `log` | `string` | Log contains the log information from message or handler execution. | +| `events` | `Event`[] | Events contains a slice of Event objects that were emitted during message or handler execution. | +| `msg_responses` | `Any`[] | msg_responses contains the Msg handler responses type packed in Anys. | + +### cosmos.base.abci.v1beta1.StringEvent + +StringEvent defines en Event object wrapper where all the attributes contain key/value pairs that are strings instead of raw bytes. + +| Field | Type | Description | +| --- | --- | --- | +| `type` | `string` | | +| `attributes` | [`Attribute`](#cosmos-base-abci-v1beta1-attribute)[] | | + +### cosmos.base.abci.v1beta1.TxResponse + +TxResponse defines a structure containing relevant tx data and metadata. The tags are stringified and the log is JSON decoded. + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | The block height | +| `txhash` | `string` | The transaction hash. | +| `codespace` | `string` | Namespace for the Code | +| `code` | `uint32` | Response code. | +| `data` | `string` | Result bytes, if any. | +| `raw_log` | `string` | The output of the application's logger (raw string). May be non-deterministic. | +| `logs` | [`ABCIMessageLog`](#cosmos-base-abci-v1beta1-abcimessagelog)[] | The output of the application's logger (typed). May be non-deterministic. | +| `info` | `string` | Additional information. May be non-deterministic. | +| `gas_wanted` | `int64` | Amount of gas requested for transaction. | +| `gas_used` | `int64` | Amount of gas consumed by transaction. | +| `tx` | `Any` | The request transaction bytes. | +| `timestamp` | `string` | Time of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time. | +| `events` | `Event`[] | Events defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. | + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.base.v1beta1.Coin + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `amount` | `string` | Encoded as cosmos.Int. | + +### cosmos.crypto.multisig.v1beta1.CompactBitArray + +CompactBitArray is an implementation of a space efficient bit array. This is used to ensure that the encoded data takes up a minimal amount of space after proto encoding. This is not thread safe, and is not intended for concurrent usage. + +| Field | Type | Description | +| --- | --- | --- | +| `extra_bits_stored` | `uint32` | | +| `elems` | `bytes` | | + +### cosmos.tx.signing.v1beta1.SignMode + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `SIGN_MODE_UNSPECIFIED` | Zero value. Handlers reject it. | +| `SIGN_MODE_DIRECT` | | +| `SIGN_MODE_DIRECT_AUX` | | +| `SIGN_MODE_LEGACY_AMINO_JSON` | | +| `SIGN_MODE_EIP_191` | | + +### cosmos.tx.v1beta1.AuthInfo + +AuthInfo describes the fee and signer modes that are used to sign a transaction. + +| Field | Type | Description | +| --- | --- | --- | +| `signer_infos` | [`SignerInfo`](#cosmos-tx-v1beta1-signerinfo)[] | signer_infos defines the signing modes for the required signers. The number and order of elements must match the required signers from TxBody's messages. The first element is the primary signer and the one which pays the fee. | +| `fee` | [`Fee`](#cosmos-tx-v1beta1-fee) | Fee is the fee and gas limit for the transaction. The first signer is the primary signer and the one which pays the fee. The fee can be calculated based on the cost of evaluating the body and doing signature verification of the signers. This can be estimated via simulation. | +| `tip` | [`Tip`](#cosmos-tx-v1beta1-tip) | Tip is the optional tip used for transactions fees paid in another denom. This field is ignored if the chain didn't enable tips, i.e. didn't add the `TipDecorator` in its posthandler. Deprecated. | + +### cosmos.tx.v1beta1.BroadcastMode + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `BROADCAST_MODE_UNSPECIFIED` | Zero value. Handlers reject it. | +| `BROADCAST_MODE_BLOCK` | Deprecated. | +| `BROADCAST_MODE_SYNC` | | +| `BROADCAST_MODE_ASYNC` | | + +### cosmos.tx.v1beta1.Fee + +Fee includes the amount of coins paid in fees and the maximum gas to be used by the transaction. The ratio yields an effective "gasprice", which must be above some minimum to be accepted into the mempool. + +| Field | Type | Description | +| --- | --- | --- | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | amount is the amount of coins to be paid as a fee | +| `gas_limit` | `uint64` | gas_limit is the maximum gas that can be used in transaction processing before an out of gas error occurs | +| `payer` | `string` | if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. the payer must be a tx signer (and thus have signed this field in AuthInfo). setting this field does *not* change the ordering of required signers for the transaction. Encoded as cosmos.AddressString. | +| `granter` | `string` | if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does not support fee grants, this will fail Encoded as cosmos.AddressString. | + +### cosmos.tx.v1beta1.ModeInfo + +ModeInfo describes the signing mode of a single or nested multisig signer. + +| Field | Type | Description | +| --- | --- | --- | +| `single` | [`Single`](#cosmos-tx-v1beta1-modeinfo-single) | single represents a single signer | +| `multi` | [`Multi`](#cosmos-tx-v1beta1-modeinfo-multi) | multi represents a nested multisig signer | + +### cosmos.tx.v1beta1.ModeInfo.Multi + +Multi is the mode info for a multisig public key + +| Field | Type | Description | +| --- | --- | --- | +| `bitarray` | [`CompactBitArray`](#cosmos-crypto-multisig-v1beta1-compactbitarray) | bitarray specifies which keys within the multisig are signing | +| `mode_infos` | [`ModeInfo`](#cosmos-tx-v1beta1-modeinfo)[] | mode_infos is the corresponding modes of the signers of the multisig which could include nested multisig public keys | + +### cosmos.tx.v1beta1.ModeInfo.Single + +Single is the mode info for a single signer. It is structured as a message to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the future + +| Field | Type | Description | +| --- | --- | --- | +| `mode` | [`SignMode`](#cosmos-tx-signing-v1beta1-signmode) | mode is the signing mode of the single signer | + +### cosmos.tx.v1beta1.OrderBy + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `ORDER_BY_UNSPECIFIED` | Zero value. Handlers reject it. | +| `ORDER_BY_ASC` | | +| `ORDER_BY_DESC` | | + +### cosmos.tx.v1beta1.SignerInfo + +SignerInfo describes the public key and signing mode of a single top-level signer. + +| Field | Type | Description | +| --- | --- | --- | +| `public_key` | `Any` | public_key is the public key of the signer. It is optional for accounts that already exist in state. If unset, the verifier can use the required \ signer address for this position and lookup the public key. | +| `mode_info` | [`ModeInfo`](#cosmos-tx-v1beta1-modeinfo) | mode_info describes the signing mode of the signer and is a nested structure to support nested multisig pubkey's | +| `sequence` | `uint64` | sequence is the sequence of the account, which describes the number of committed transactions signed by a given address. It is used to prevent replay attacks. | + +### cosmos.tx.v1beta1.Tip + +Tip is the tip used for meta-transactions. + +| Field | Type | Description | +| --- | --- | --- | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | amount is the amount of the tip | +| `tipper` | `string` | tipper is the address of the account paying for the tip Encoded as cosmos.AddressString. | + +### cosmos.tx.v1beta1.Tx + +Tx is the standard type used for broadcasting transactions. + +| Field | Type | Description | +| --- | --- | --- | +| `body` | [`TxBody`](#cosmos-tx-v1beta1-txbody) | body is the processable content of the transaction | +| `auth_info` | [`AuthInfo`](#cosmos-tx-v1beta1-authinfo) | auth_info is the authorization related content of the transaction, specifically signers, signer modes and fee | +| `signatures` | `bytes`[] | signatures is a list of signatures that matches the length and order of AuthInfo's signer_infos to allow connecting signature meta information like public key and signing mode by position. | + +### cosmos.tx.v1beta1.TxBody + +TxBody is the body of a transaction that all signers sign over. + +| Field | Type | Description | +| --- | --- | --- | +| `messages` | `Any`[] | messages is a list of messages to be executed. The required signers of those messages define the number and order of elements in AuthInfo's signer_infos and Tx's signatures. Each required signer address is added to the list only the first time it occurs. By convention, the first required signer (usually from the first message) is referred to as the primary signer and pays the fee for the whole transaction. | +| `memo` | `string` | memo is any arbitrary note/comment to be added to the transaction. WARNING: in clients, any publicly exposed text should not be called memo, but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). | +| `timeout_height` | `uint64` | timeout_height is the block height after which this transaction will not be processed by the chain. | +| `unordered` | `bool` | unordered, when set to true, indicates that the transaction signer(s) intend for the transaction to be evaluated and executed in an un-ordered fashion. Specifically, the account's nonce will NOT be checked or incremented, which allows for fire-and-forget as well as concurrent transaction execution. Note, when set to true, the existing 'timeout_timestamp' value must be set and will be used to correspond to a timestamp in which the transaction is deemed valid. When true, the sequence value MUST be 0, and any transaction with unordered=true and a non-zero sequence value will be rejected. External services that make assumptions about sequence values may need to be updated because of this. | +| `timeout_timestamp` | `Timestamp` | timeout_timestamp is the block time after which this transaction will not be processed by the chain. Note, if unordered=true this value MUST be set and will act as a short-lived TTL in which the transaction is deemed valid and kept in memory to prevent duplicates. | +| `extension_options` | `Any`[] | extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, the transaction will be rejected | +| `non_critical_extension_options` | `Any`[] | extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, they will be ignored | + + diff --git a/sdk/latest/api-reference/grpc/upgrade.mdx b/sdk/latest/api-reference/grpc/upgrade.mdx new file mode 100644 index 00000000..edad7a9d --- /dev/null +++ b/sdk/latest/api-reference/grpc/upgrade.mdx @@ -0,0 +1,254 @@ +--- +title: "Upgrade" +description: "gRPC queries and transaction messages defined by the upgrade module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/latest/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/latest/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### AppliedPlan + +AppliedPlan queries a previously applied upgrade plan by its name. + +| | | +| --- | --- | +| gRPC | `cosmos.upgrade.v1beta1.Query/AppliedPlan` | +| REST | `GET /cosmos/upgrade/v1beta1/applied_plan/{name}` | + +Request `QueryAppliedPlanRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `name` | `string` | name is the name of the applied plan to query for. | + +Response `QueryAppliedPlanResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | height is the block height at which the plan was applied. | + +```bash +grpcurl -plaintext -d '{"name":"<string>"}' \ + localhost:9090 cosmos.upgrade.v1beta1.Query/AppliedPlan +``` + +### Authority + +Returns the account with authority to conduct upgrades + +| | | +| --- | --- | +| gRPC | `cosmos.upgrade.v1beta1.Query/Authority` | +| REST | `GET /cosmos/upgrade/v1beta1/authority` | + +Request `QueryAuthorityRequest`: + +This message has no fields. + +Response `QueryAuthorityResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.upgrade.v1beta1.Query/Authority +``` + +### CurrentPlan + +CurrentPlan queries the current upgrade plan. + +| | | +| --- | --- | +| gRPC | `cosmos.upgrade.v1beta1.Query/CurrentPlan` | +| REST | `GET /cosmos/upgrade/v1beta1/current_plan` | + +Request `QueryCurrentPlanRequest`: + +This message has no fields. + +Response `QueryCurrentPlanResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `plan` | [`Plan`](#cosmos-upgrade-v1beta1-plan) | plan is the current upgrade plan. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.upgrade.v1beta1.Query/CurrentPlan +``` + +### ModuleVersions + +ModuleVersions queries the list of module versions from state. + +| | | +| --- | --- | +| gRPC | `cosmos.upgrade.v1beta1.Query/ModuleVersions` | +| REST | `GET /cosmos/upgrade/v1beta1/module_versions` | + +Request `QueryModuleVersionsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `module_name` | `string` | module_name is a field to query a specific module consensus version from state. Leaving this empty will fetch the full list of module versions from state | + +Response `QueryModuleVersionsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `module_versions` | [`ModuleVersion`](#cosmos-upgrade-v1beta1-moduleversion)[] | module_versions is a list of module names with their consensus versions. | + +```bash +grpcurl -plaintext -d '{"module_name":"<string>"}' \ + localhost:9090 cosmos.upgrade.v1beta1.Query/ModuleVersions +``` + +### UpgradedConsensusState + +<Warning>This method is deprecated.</Warning> + +UpgradedConsensusState queries the consensus state that will serve as a trusted kernel for the next version of this chain. It will only be stored at the last height of this chain. UpgradedConsensusState RPC not supported with legacy querier This rpc is deprecated now that IBC has its own replacement (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) + +| | | +| --- | --- | +| gRPC | `cosmos.upgrade.v1beta1.Query/UpgradedConsensusState` | +| REST | `GET /cosmos/upgrade/v1beta1/upgraded_consensus_state/{lastHeight}` | + +Request `QueryUpgradedConsensusStateRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `last_height` | `int64` | last height of the current chain must be sent in request as this is the height under which next consensus state is stored | + +Response `QueryUpgradedConsensusStateResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `upgraded_consensus_state` | `bytes` | | + +```bash +grpcurl -plaintext -d '{"last_height":"1"}' \ + localhost:9090 cosmos.upgrade.v1beta1.Query/UpgradedConsensusState +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/latest/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/latest/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/latest/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### CancelUpgrade + +CancelUpgrade is a governance operation for cancelling a previously approved software upgrade. + +| | | +| --- | --- | +| Type URL | `/cosmos.upgrade.v1beta1.MsgCancelUpgrade` | +| Handler | `cosmos.upgrade.v1beta1.Msg/CancelUpgrade` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/MsgCancelUpgrade` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", + "authority": "<string>" +} +``` + +Response `MsgCancelUpgradeResponse`: + +This message has no fields. + +### SoftwareUpgrade + +SoftwareUpgrade is a governance operation for initiating a software upgrade. + +| | | +| --- | --- | +| Type URL | `/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade` | +| Handler | `cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/MsgSoftwareUpgrade` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `plan` | [`Plan`](#cosmos-upgrade-v1beta1-plan) | plan is the upgrade plan. | + +In a transaction: + +```json +{ + "@type": "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", + "authority": "<string>", + "plan": { + "name": "<string>", + "height": "1", + "info": "<string>" + } +} +``` + +Response `MsgSoftwareUpgradeResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.upgrade.v1beta1.ModuleVersion + +ModuleVersion specifies a module and its consensus version. + +| Field | Type | Description | +| --- | --- | --- | +| `name` | `string` | name of the app module | +| `version` | `uint64` | consensus version of the app module | + +### cosmos.upgrade.v1beta1.Plan + +Plan specifies information about a planned upgrade and when it should occur. + +| Field | Type | Description | +| --- | --- | --- | +| `name` | `string` | Sets the name for the upgrade. This name will be used by the upgraded version of the software to apply any special "on-upgrade" commands during the first BeginBlock method after the upgrade is applied. It is also used to detect whether a software version can handle a given upgrade. If no upgrade handler with this name has been set in the software, it will be assumed that the software is out-of-date when the upgrade Time or Height is reached and the software will exit. | +| `time` | `Timestamp` | Deprecated: Time based upgrades have been deprecated. Time based upgrade logic has been removed from the SDK. If this field is not empty, an error will be thrown. Deprecated. | +| `height` | `int64` | The height at which the upgrade must be performed. | +| `info` | `string` | Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to | +| `upgraded_client_state` | `Any` | Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been moved to the IBC module in the sub module 02-client. If this field is not empty, an error will be thrown. Deprecated. | + + diff --git a/sdk/latest/api-reference/grpc/vesting.mdx b/sdk/latest/api-reference/grpc/vesting.mdx new file mode 100644 index 00000000..34cbff42 --- /dev/null +++ b/sdk/latest/api-reference/grpc/vesting.mdx @@ -0,0 +1,168 @@ +--- +title: "Vesting" +description: "gRPC queries and transaction messages defined by the vesting module in Cosmos SDK v0.55." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@2086680ff8b0`](https://github.com/cosmos/cosmos-sdk/tree/2086680ff8b08fd269ee653e087ea577bab79534/proto) on ref `release/v0.55.x`. +</Info> + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/latest/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/latest/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/latest/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### CreatePeriodicVestingAccount + +CreatePeriodicVestingAccount defines a method that enables creating a periodic vesting account. + +| | | +| --- | --- | +| Type URL | `/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount` | +| Handler | `cosmos.vesting.v1beta1.Msg/CreatePeriodicVestingAccount` | +| Signer | `from_address` | +| Amino name | `cosmos-sdk/MsgCreatePeriodVestAccount` | + +| Field | Type | Description | +| --- | --- | --- | +| `from_address` | `string` | | +| `to_address` | `string` | | +| `start_time` | `int64` | start of vesting as unix time (in seconds). | +| `vesting_periods` | [`Period`](#cosmos-vesting-v1beta1-period)[] | | + +In a transaction: + +```json +{ + "@type": "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", + "from_address": "<string>", + "to_address": "<string>", + "start_time": "1", + "vesting_periods": [ + { + "length": "1", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] + } + ] +} +``` + +Response `MsgCreatePeriodicVestingAccountResponse`: + +This message has no fields. + +### CreatePermanentLockedAccount + +CreatePermanentLockedAccount defines a method that enables creating a permanent locked account. + +| | | +| --- | --- | +| Type URL | `/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount` | +| Handler | `cosmos.vesting.v1beta1.Msg/CreatePermanentLockedAccount` | +| Signer | `from_address` | +| Amino name | `cosmos-sdk/MsgCreatePermLockedAccount` | + +| Field | Type | Description | +| --- | --- | --- | +| `from_address` | `string` | | +| `to_address` | `string` | | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +In a transaction: + +```json +{ + "@type": "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", + "from_address": "<string>", + "to_address": "<string>", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] +} +``` + +Response `MsgCreatePermanentLockedAccountResponse`: + +This message has no fields. + +### CreateVestingAccount + +CreateVestingAccount defines a method that enables creating a vesting account. + +| | | +| --- | --- | +| Type URL | `/cosmos.vesting.v1beta1.MsgCreateVestingAccount` | +| Handler | `cosmos.vesting.v1beta1.Msg/CreateVestingAccount` | +| Signer | `from_address` | +| Amino name | `cosmos-sdk/MsgCreateVestingAccount` | + +| Field | Type | Description | +| --- | --- | --- | +| `from_address` | `string` | Encoded as cosmos.AddressString. | +| `to_address` | `string` | Encoded as cosmos.AddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | +| `end_time` | `int64` | end of vesting as unix time (in seconds). | +| `delayed` | `bool` | | + +In a transaction: + +```json +{ + "@type": "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", + "from_address": "<string>", + "to_address": "<string>", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ], + "end_time": "1", + "delayed": false +} +``` + +Response `MsgCreateVestingAccountResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.v1beta1.Coin + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `amount` | `string` | Encoded as cosmos.Int. | + +### cosmos.vesting.v1beta1.Period + +Period defines a length of time and amount of coins that will vest. + +| Field | Type | Description | +| --- | --- | --- | +| `length` | `int64` | Period duration in seconds. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + + diff --git a/sdk/latest/api-reference/index.mdx b/sdk/latest/api-reference/index.mdx new file mode 100644 index 00000000..fab4edf9 --- /dev/null +++ b/sdk/latest/api-reference/index.mdx @@ -0,0 +1,101 @@ +--- +title: "API reference" +description: "The interfaces exposed by a Cosmos SDK node, how they relate, and what this reference covers." +--- + +Cosmos SDK modules define their queries and transaction messages in protobuf. A node exposes them through gRPC and REST, while the CLI provides commands for using them. CometBFT exposes a separate API for consensus and node data. + +This section documents these interfaces. For how applications register them, see [CLI, gRPC, and REST API](/sdk/latest/learn/concepts/cli-grpc-rest). + +## Interfaces + +| Interface | Default address | Default | Purpose | +| ------------ | ----------------- | -------- | -------------------------------------------------------------------------------------- | +| [gRPC](/sdk/latest/api-reference/grpc/index) | `localhost:9090` | Enabled | Query application state and access supporting services | +| [REST](/sdk/latest/api-reference/rest/bank/allbalances) | `localhost:1317` | Disabled | Call gRPC methods through HTTP and JSON | +| [CometBFT RPC](/cometbft/latest/api-reference/rpc/index) | `127.0.0.1:26657` | Enabled | Query blocks, validators, and the mempool; broadcast transactions; subscribe to events | +| [CLI](/sdk/latest/learn/concepts/cli-grpc-rest#cli) | n/a | n/a | Query state and build, sign, and broadcast transactions | + +## How they relate + +Modules usually define two protobuf services: + +* A `Query` service for reading application state +* A `Msg` service describing the state changes transactions can request + +### Queries + +Query methods are callable through gRPC on port 9090. Methods with a `google.api.http` binding are also available through REST on port 1317. + +For example, these calls reach the same query handler: + +```text +cosmos.bank.v1beta1.Query/AllBalances +GET /cosmos/bank/v1beta1/balances/{address} +``` + +Without an HTTP binding, a method is available only through gRPC. + +### Transaction messages + +`Msg` methods are not callable endpoints. They define messages that are encoded into transactions, signed, and broadcast through a transaction service: + +```text +cosmos.tx.v1beta1.Service/BroadcastTx gRPC +POST /cosmos/tx/v1beta1/txs REST +broadcast_tx_sync CometBFT RPC +``` + +### CLI + +The CLI is a client. Query commands call the application’s query services. Transaction commands construct and sign module messages, then broadcast the resulting transaction. See [Using the CLI](/sdk/latest/node/interact-node#using-the-cli) for worked examples, and [CLI](/sdk/latest/learn/concepts/cli-grpc-rest#cli) for how it fits with the other interfaces. + +Most commands are not written by hand: [`autocli`](/sdk/latest/guides/tooling/autocli) generates one per gRPC service method, which is why a command and a `grpcurl` call usually take the same arguments. + +Examples in this reference use `simd`, but each chain normally provides its own application-specific binary. + +### CometBFT RPC + +CometBFT RPC is separate from the application APIs. It belongs to the consensus engine beneath the Cosmos SDK and exposes blocks, validators, consensus data, the mempool, transaction broadcasting, and event subscriptions. + +See the [CometBFT RPC reference](/cometbft/latest/api-reference/rpc/index). + +## What this section covers + +| Page | Contents | +| -------------------------------------------------------------- | ---------------------------------------------------------------------- | +| [gRPC services](/sdk/latest/api-reference/grpc/index) | Service names, field encodings, reflection, and pagination | +| REST | Generated OpenAPI documentation with a playground for each route | +| [Sending transactions](/sdk/latest/api-reference/transactions) | How to build, sign, and broadcast transactions | + +Each module page includes both kinds of declaration. For example, the `bank` page documents `Query/AllBalances` and `MsgSend`. + +To list the gRPC services registered by a running node: + +```bash +grpcurl -plaintext localhost:9090 list +``` + +## Enable the interfaces + +gRPC is enabled by default. Enable REST in `app.toml`: + +```toml +[api] +enable = true +address = "tcp://localhost:1317" + +# Serve the generated OpenAPI document at /swagger. +swagger = true + +[grpc] +enable = true +address = "localhost:9090" +``` + +Configure CometBFT RPC in `config.toml`: + +```toml +[rpc] +laddr = "tcp://127.0.0.1:26657" +``` diff --git a/sdk/latest/api-reference/inventory.json b/sdk/latest/api-reference/inventory.json new file mode 100644 index 00000000..c4945e6f --- /dev/null +++ b/sdk/latest/api-reference/inventory.json @@ -0,0 +1,176 @@ +{ + "queries": [ + "cosmos.auth.v1beta1.Query/Account", + "cosmos.auth.v1beta1.Query/AccountAddressByID", + "cosmos.auth.v1beta1.Query/AccountInfo", + "cosmos.auth.v1beta1.Query/Accounts", + "cosmos.auth.v1beta1.Query/AddressBytesToString", + "cosmos.auth.v1beta1.Query/AddressStringToBytes", + "cosmos.auth.v1beta1.Query/Bech32Prefix", + "cosmos.auth.v1beta1.Query/ModuleAccountByName", + "cosmos.auth.v1beta1.Query/ModuleAccounts", + "cosmos.auth.v1beta1.Query/Params", + "cosmos.authz.v1beta1.Query/GranteeGrants", + "cosmos.authz.v1beta1.Query/GranterGrants", + "cosmos.authz.v1beta1.Query/Grants", + "cosmos.autocli.v1.Query/AppOptions", + "cosmos.bank.v1beta1.Query/AllBalances", + "cosmos.bank.v1beta1.Query/Balance", + "cosmos.bank.v1beta1.Query/DenomMetadata", + "cosmos.bank.v1beta1.Query/DenomMetadataByQueryString", + "cosmos.bank.v1beta1.Query/DenomOwners", + "cosmos.bank.v1beta1.Query/DenomOwnersByQuery", + "cosmos.bank.v1beta1.Query/DenomsMetadata", + "cosmos.bank.v1beta1.Query/Params", + "cosmos.bank.v1beta1.Query/SendEnabled", + "cosmos.bank.v1beta1.Query/SpendableBalanceByDenom", + "cosmos.bank.v1beta1.Query/SpendableBalances", + "cosmos.bank.v1beta1.Query/SupplyOf", + "cosmos.bank.v1beta1.Query/TotalSupply", + "cosmos.base.node.v1beta1.Service/Config", + "cosmos.base.node.v1beta1.Service/Status", + "cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces", + "cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations", + "cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor", + "cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor", + "cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor", + "cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor", + "cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor", + "cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor", + "cosmos.base.tendermint.v1beta1.Service/ABCIQuery", + "cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight", + "cosmos.base.tendermint.v1beta1.Service/GetBlockResults", + "cosmos.base.tendermint.v1beta1.Service/GetLatestBlock", + "cosmos.base.tendermint.v1beta1.Service/GetLatestBlockResults", + "cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet", + "cosmos.base.tendermint.v1beta1.Service/GetNodeInfo", + "cosmos.base.tendermint.v1beta1.Service/GetSyncing", + "cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight", + "cosmos.consensus.v1.Query/Params", + "cosmos.counter.v1.Query/GetCount", + "cosmos.distribution.v1beta1.Query/CommunityPool", + "cosmos.distribution.v1beta1.Query/DelegationRewards", + "cosmos.distribution.v1beta1.Query/DelegationTotalRewards", + "cosmos.distribution.v1beta1.Query/DelegatorStartingInfo", + "cosmos.distribution.v1beta1.Query/DelegatorValidators", + "cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", + "cosmos.distribution.v1beta1.Query/Params", + "cosmos.distribution.v1beta1.Query/ValidatorCommission", + "cosmos.distribution.v1beta1.Query/ValidatorCurrentRewards", + "cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo", + "cosmos.distribution.v1beta1.Query/ValidatorHistoricalRewards", + "cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", + "cosmos.distribution.v1beta1.Query/ValidatorSlashes", + "cosmos.epochs.v1beta1.Query/CurrentEpoch", + "cosmos.epochs.v1beta1.Query/EpochInfos", + "cosmos.evidence.v1beta1.Query/AllEvidence", + "cosmos.evidence.v1beta1.Query/Evidence", + "cosmos.feegrant.v1beta1.Query/Allowance", + "cosmos.feegrant.v1beta1.Query/Allowances", + "cosmos.feegrant.v1beta1.Query/AllowancesByGranter", + "cosmos.gov.v1.Query/Constitution", + "cosmos.gov.v1.Query/Deposit", + "cosmos.gov.v1.Query/Deposits", + "cosmos.gov.v1.Query/Params", + "cosmos.gov.v1.Query/Proposal", + "cosmos.gov.v1.Query/Proposals", + "cosmos.gov.v1.Query/TallyResult", + "cosmos.gov.v1.Query/Vote", + "cosmos.gov.v1.Query/Votes", + "cosmos.gov.v1beta1.Query/Deposit", + "cosmos.gov.v1beta1.Query/Deposits", + "cosmos.gov.v1beta1.Query/Params", + "cosmos.gov.v1beta1.Query/Proposal", + "cosmos.gov.v1beta1.Query/Proposals", + "cosmos.gov.v1beta1.Query/TallyResult", + "cosmos.gov.v1beta1.Query/Vote", + "cosmos.gov.v1beta1.Query/Votes", + "cosmos.mint.v1beta1.Query/AnnualProvisions", + "cosmos.mint.v1beta1.Query/Inflation", + "cosmos.mint.v1beta1.Query/Params", + "cosmos.reflection.v1.ReflectionService/FileDescriptors", + "cosmos.slashing.v1beta1.Query/Params", + "cosmos.slashing.v1beta1.Query/SigningInfo", + "cosmos.slashing.v1beta1.Query/SigningInfos", + "cosmos.staking.v1beta1.Query/Delegation", + "cosmos.staking.v1beta1.Query/DelegatorDelegations", + "cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations", + "cosmos.staking.v1beta1.Query/DelegatorValidator", + "cosmos.staking.v1beta1.Query/DelegatorValidators", + "cosmos.staking.v1beta1.Query/HistoricalInfo", + "cosmos.staking.v1beta1.Query/Params", + "cosmos.staking.v1beta1.Query/Pool", + "cosmos.staking.v1beta1.Query/Redelegations", + "cosmos.staking.v1beta1.Query/UnbondingDelegation", + "cosmos.staking.v1beta1.Query/Validator", + "cosmos.staking.v1beta1.Query/ValidatorDelegations", + "cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations", + "cosmos.staking.v1beta1.Query/Validators", + "cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", + "cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", + "cosmos.tx.v1beta1.Service/BroadcastTx", + "cosmos.tx.v1beta1.Service/GetBlockWithTxs", + "cosmos.tx.v1beta1.Service/GetTx", + "cosmos.tx.v1beta1.Service/GetTxsEvent", + "cosmos.tx.v1beta1.Service/Simulate", + "cosmos.tx.v1beta1.Service/TxDecode", + "cosmos.tx.v1beta1.Service/TxDecodeAmino", + "cosmos.tx.v1beta1.Service/TxEncode", + "cosmos.tx.v1beta1.Service/TxEncodeAmino", + "cosmos.upgrade.v1beta1.Query/AppliedPlan", + "cosmos.upgrade.v1beta1.Query/Authority", + "cosmos.upgrade.v1beta1.Query/CurrentPlan", + "cosmos.upgrade.v1beta1.Query/ModuleVersions", + "cosmos.upgrade.v1beta1.Query/UpgradedConsensusState" + ], + "messages": [ + "cosmos.auth.v1beta1.MsgUpdateParams", + "cosmos.authz.v1beta1.MsgExec", + "cosmos.authz.v1beta1.MsgGrant", + "cosmos.authz.v1beta1.MsgRevoke", + "cosmos.bank.v1beta1.MsgMultiSend", + "cosmos.bank.v1beta1.MsgSend", + "cosmos.bank.v1beta1.MsgSetSendEnabled", + "cosmos.bank.v1beta1.MsgUpdateParams", + "cosmos.consensus.v1.MsgUpdateParams", + "cosmos.counter.v1.MsgIncreaseCounter", + "cosmos.distribution.v1beta1.MsgCommunityPoolSpend", + "cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool", + "cosmos.distribution.v1beta1.MsgFundCommunityPool", + "cosmos.distribution.v1beta1.MsgSetWithdrawAddress", + "cosmos.distribution.v1beta1.MsgUpdateParams", + "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", + "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", + "cosmos.evidence.v1beta1.MsgSubmitEvidence", + "cosmos.feegrant.v1beta1.MsgGrantAllowance", + "cosmos.feegrant.v1beta1.MsgPruneAllowances", + "cosmos.feegrant.v1beta1.MsgRevokeAllowance", + "cosmos.gov.v1.MsgCancelProposal", + "cosmos.gov.v1.MsgDeposit", + "cosmos.gov.v1.MsgExecLegacyContent", + "cosmos.gov.v1.MsgSubmitProposal", + "cosmos.gov.v1.MsgUpdateParams", + "cosmos.gov.v1.MsgVote", + "cosmos.gov.v1.MsgVoteWeighted", + "cosmos.gov.v1beta1.MsgDeposit", + "cosmos.gov.v1beta1.MsgSubmitProposal", + "cosmos.gov.v1beta1.MsgVote", + "cosmos.gov.v1beta1.MsgVoteWeighted", + "cosmos.mint.v1beta1.MsgUpdateParams", + "cosmos.slashing.v1beta1.MsgUnjail", + "cosmos.slashing.v1beta1.MsgUpdateParams", + "cosmos.staking.v1beta1.MsgBeginRedelegate", + "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", + "cosmos.staking.v1beta1.MsgCreateValidator", + "cosmos.staking.v1beta1.MsgDelegate", + "cosmos.staking.v1beta1.MsgEditValidator", + "cosmos.staking.v1beta1.MsgRotateConsPubKey", + "cosmos.staking.v1beta1.MsgUndelegate", + "cosmos.staking.v1beta1.MsgUpdateParams", + "cosmos.upgrade.v1beta1.MsgCancelUpgrade", + "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", + "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", + "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", + "cosmos.vesting.v1beta1.MsgCreateVestingAccount" + ] +} diff --git a/sdk/latest/api-reference/rest/openapi.yaml b/sdk/latest/api-reference/rest/openapi.yaml new file mode 100644 index 00000000..aa1fce60 --- /dev/null +++ b/sdk/latest/api-reference/rest/openapi.yaml @@ -0,0 +1,47288 @@ +openapi: 3.0.0 +info: + title: Cosmos SDK REST API + description: >- + HTTP bindings for the gRPC query services of the standard Cosmos SDK modules, documenting Cosmos + SDK v0.55. + + + Generated from cosmos/cosmos-sdk at commit 2086680ff8b08fd269ee653e087ea577bab79534 on ref + `release/v0.55.x`. + + + A chain exposes only the modules its application registers, so it may serve a subset of these + routes alongside routes of its own. + version: v0.55 +paths: + /cosmos/auth/v1beta1/account_info/{address}: + get: + summary: AccountInfo + operationId: auth_v1beta1_AccountInfo + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + info: + description: info is the account info which is represented by BaseAccount. + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along with + a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + account_number: + type: string + format: uint64 + sequence: + type: string + format: uint64 + nullable: true + description: QueryAccountInfoResponse is the Query/AccountInfo response type. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address + description: address is the account address string. + in: path + required: true + schema: + type: string + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/AccountInfo` + ([reference](/sdk/latest/api-reference/grpc/auth#accountinfo)) + + + AccountInfo queries account info which is common to all account types. + x-grpc-method: cosmos.auth.v1beta1.Query/AccountInfo + /cosmos/auth/v1beta1/accounts: + get: + summary: Accounts + description: >- + gRPC: `cosmos.auth.v1beta1.Query/Accounts` + ([reference](/sdk/latest/api-reference/grpc/auth#accounts)) + + + Accounts returns all the existing accounts. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: auth_v1beta1_Accounts + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + accounts: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: accounts are the existing accounts + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryAccountsResponse is the response type for the Query/Accounts RPC method. + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - auth + x-grpc-method: cosmos.auth.v1beta1.Query/Accounts + /cosmos/auth/v1beta1/accounts/{address}: + get: + summary: Account + operationId: auth_v1beta1_Account + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + account: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + description: QueryAccountResponse is the response type for the Query/Account RPC method. + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address + description: address defines the address to query for. + in: path + required: true + schema: + type: string + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/Account` + ([reference](/sdk/latest/api-reference/grpc/auth#account)) + + + Account returns account details based on address. + x-grpc-method: cosmos.auth.v1beta1.Query/Account + /cosmos/auth/v1beta1/address_by_id/{accountId}: + get: + summary: AccountAddressByID + operationId: auth_v1beta1_AccountAddressByID + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + account_address: + type: string + title: >- + QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc + method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: accountId + description: account_id is the account number of the address to be queried. + in: path + required: true + schema: + type: string + format: uint64 + - name: id + description: |- + Deprecated, use account_id instead + + id is the account number of the address to be queried. This field + should have been an uint64 (like all account numbers), and will be + updated to uint64 in a future version of the auth query. + in: query + required: false + schema: + type: string + format: int64 + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/AccountAddressByID` + ([reference](/sdk/latest/api-reference/grpc/auth#accountaddressbyid)) + + + AccountAddressByID returns account address based on account number. + x-grpc-method: cosmos.auth.v1beta1.Query/AccountAddressByID + /cosmos/auth/v1beta1/bech32: + get: + summary: Bech32Prefix + operationId: auth_v1beta1_Bech32Prefix + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + bech32_prefix: + type: string + description: Bech32PrefixResponse is the response type for Bech32Prefix rpc method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/Bech32Prefix` + ([reference](/sdk/latest/api-reference/grpc/auth#bech32prefix)) + + + Bech32Prefix queries bech32Prefix + x-grpc-method: cosmos.auth.v1beta1.Query/Bech32Prefix + /cosmos/auth/v1beta1/bech32/{addressBytes}: + get: + summary: AddressBytesToString + operationId: auth_v1beta1_AddressBytesToString + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + address_string: + type: string + description: AddressBytesToStringResponse is the response type for AddressString rpc method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: addressBytes + in: path + required: true + schema: + type: string + format: byte + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/AddressBytesToString` + ([reference](/sdk/latest/api-reference/grpc/auth#addressbytestostring)) + + + AddressBytesToString converts Account Address bytes to string + x-grpc-method: cosmos.auth.v1beta1.Query/AddressBytesToString + /cosmos/auth/v1beta1/module_accounts: + get: + summary: ModuleAccounts + operationId: auth_v1beta1_ModuleAccounts + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + accounts: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + description: >- + QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC + method. + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/ModuleAccounts` + ([reference](/sdk/latest/api-reference/grpc/auth#moduleaccounts)) + + + ModuleAccounts returns all the existing module accounts. + x-grpc-method: cosmos.auth.v1beta1.Query/ModuleAccounts + /cosmos/auth/v1beta1/module_accounts/{name}: + get: + summary: ModuleAccountByName + operationId: auth_v1beta1_ModuleAccountByName + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + account: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + description: >- + QueryModuleAccountByNameResponse is the response type for the + Query/ModuleAccountByName RPC method. + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: name + in: path + required: true + schema: + type: string + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/ModuleAccountByName` + ([reference](/sdk/latest/api-reference/grpc/auth#moduleaccountbyname)) + + + ModuleAccountByName returns the module account info by module name + x-grpc-method: cosmos.auth.v1beta1.Query/ModuleAccountByName + /cosmos/auth/v1beta1/params: + get: + summary: Params + operationId: auth_v1beta1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_memo_characters: + type: string + format: uint64 + tx_sig_limit: + type: string + format: uint64 + tx_size_cost_per_byte: + type: string + format: uint64 + sig_verify_cost_ed25519: + type: string + format: uint64 + sig_verify_cost_secp256k1: + type: string + format: uint64 + sig_verify_cost_mldsa65: + type: string + format: uint64 + nullable: true + additionalProperties: false + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/Params` + ([reference](/sdk/latest/api-reference/grpc/auth#params)) + + + Params queries all parameters. + x-grpc-method: cosmos.auth.v1beta1.Query/Params + /cosmos/authz/v1beta1/grants: + get: + summary: Grants + operationId: authz_v1beta1_Grants + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + grants: + type: array + items: + type: object + properties: + authorization: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + expiration: + type: string + format: date-time + title: >- + time when the grant will expire and will be pruned. If null, then the + grant + + doesn't have a time expiration (other conditions in `authorization` + + may apply to invalidate the grant) + nullable: true + description: |- + Grant gives permissions to execute + the provide method with expiration time. + description: authorizations is a list of grants granted for grantee by granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryGrantsResponse is the response type for the Query/Authorizations RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: granter + in: query + required: false + schema: + type: string + - name: grantee + in: query + required: false + schema: + type: string + - name: msgTypeUrl + description: Optional, msg_type_url, when set, will query only grants matching given msg type. + in: query + required: false + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - authz + description: >- + gRPC: `cosmos.authz.v1beta1.Query/Grants` + ([reference](/sdk/latest/api-reference/grpc/authz#grants)) + + + Returns list of `Authorization`, granted to the grantee by the granter. + x-grpc-method: cosmos.authz.v1beta1.Query/Grants + /cosmos/authz/v1beta1/grants/grantee/{grantee}: + get: + summary: GranteeGrants + operationId: authz_v1beta1_GranteeGrants + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + authorization: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + expiration: + type: string + format: date-time + nullable: true + title: >- + GrantAuthorization extends a grant with both the addresses of the grantee + and granter. + + It is used in genesis.proto and query.proto + description: grants is a list of grants granted to the grantee. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: >- + QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: grantee + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - authz + description: >- + gRPC: `cosmos.authz.v1beta1.Query/GranteeGrants` + ([reference](/sdk/latest/api-reference/grpc/authz#granteegrants)) + + + GranteeGrants returns a list of `GrantAuthorization` by grantee. + x-grpc-method: cosmos.authz.v1beta1.Query/GranteeGrants + /cosmos/authz/v1beta1/grants/granter/{granter}: + get: + summary: GranterGrants + operationId: authz_v1beta1_GranterGrants + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + authorization: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + expiration: + type: string + format: date-time + nullable: true + title: >- + GrantAuthorization extends a grant with both the addresses of the grantee + and granter. + + It is used in genesis.proto and query.proto + description: grants is a list of grants granted by the granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: >- + QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: granter + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - authz + description: >- + gRPC: `cosmos.authz.v1beta1.Query/GranterGrants` + ([reference](/sdk/latest/api-reference/grpc/authz#grantergrants)) + + + GranterGrants returns list of `GrantAuthorization`, granted by granter. + x-grpc-method: cosmos.authz.v1beta1.Query/GranterGrants + /cosmos/bank/v1beta1/balances/{address}: + get: + summary: AllBalances + description: >- + gRPC: `cosmos.bank.v1beta1.Query/AllBalances` + ([reference](/sdk/latest/api-reference/grpc/bank#allbalances)) + + + AllBalances queries the balance of all coins for a single account. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: bank_v1beta1_AllBalances + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: balances is the balances of all the coins. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryAllBalancesResponse is the response type for the Query/AllBalances RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: address + description: address is the address to query balances for. + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + - name: resolveDenom + description: >- + resolve_denom is the flag to resolve the denom into a human-readable form from the + metadata. + in: query + required: false + schema: + type: boolean + tags: + - bank + x-grpc-method: cosmos.bank.v1beta1.Query/AllBalances + /cosmos/bank/v1beta1/balances/{address}/by_denom: + get: + summary: Balance + operationId: bank_v1beta1_Balance + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + balance: + description: balance is the balance of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + additionalProperties: false + description: QueryBalanceResponse is the response type for the Query/Balance RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: address + description: address is the address to query balances for. + in: path + required: true + schema: + type: string + - name: denom + description: denom is the coin denom to query balances for. + in: query + required: false + schema: + type: string + tags: + - bank + description: >- + gRPC: `cosmos.bank.v1beta1.Query/Balance` + ([reference](/sdk/latest/api-reference/grpc/bank#balance)) + + + Balance queries the balance of a single coin for a single account. + x-grpc-method: cosmos.bank.v1beta1.Query/Balance + /cosmos/bank/v1beta1/denom_owners/{denom}: + get: + summary: DenomOwners + description: >- + gRPC: `cosmos.bank.v1beta1.Query/DenomOwners` + ([reference](/sdk/latest/api-reference/grpc/bank#denomowners)) + + + DenomOwners queries for all account addresses that own a particular token + + denomination. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: bank_v1beta1_DenomOwners + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + denom_owners: + type: array + items: + type: object + properties: + address: + type: string + description: address defines the address that owns a particular denomination. + balance: + description: balance is the balance of the denominated coin for an account. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + additionalProperties: false + description: |- + DenomOwner defines structure representing an account that owns or holds a + particular denominated token. It contains the account address and account + balance of the denominated token. + additionalProperties: false + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denom + description: denom defines the coin denomination to query all account holders for. + in: path + required: true + schema: + type: string + pattern: .+ + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - bank + x-grpc-method: cosmos.bank.v1beta1.Query/DenomOwners + /cosmos/bank/v1beta1/denom_owners_by_query: + get: + summary: DenomOwnersByQuery + operationId: bank_v1beta1_DenomOwnersByQuery + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + denom_owners: + type: array + items: + type: object + properties: + address: + type: string + description: address defines the address that owns a particular denomination. + balance: + description: balance is the balance of the denominated coin for an account. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + additionalProperties: false + description: |- + DenomOwner defines structure representing an account that owns or holds a + particular denominated token. It contains the account address and account + balance of the denominated token. + additionalProperties: false + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: >- + QueryDenomOwnersByQueryResponse defines the RPC response of a DenomOwnersByQuery + RPC query. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denom + description: denom defines the coin denomination to query all account holders for. + in: query + required: false + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - bank + description: >- + gRPC: `cosmos.bank.v1beta1.Query/DenomOwnersByQuery` + ([reference](/sdk/latest/api-reference/grpc/bank#denomownersbyquery)) + + + DenomOwnersByQuery queries for all account addresses that own a particular token + + denomination. + x-grpc-method: cosmos.bank.v1beta1.Query/DenomOwnersByQuery + /cosmos/bank/v1beta1/denoms_metadata: + get: + summary: DenomsMetadata + operationId: bank_v1beta1_DenomsMetadata + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + metadatas: + type: array + items: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit (e.g + uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given DenomUnit's + denom + + 1 denom = 10^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit of + 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + additionalProperties: false + title: denom_units represents the list of DenomUnit's for a given coin + nullable: true + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with exponent = + 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This + can + + be the same as the display. + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional + information. Optional. + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. It's used to + verify that + + the document didn't change. Optional. + description: |- + Metadata represents a struct that describes + a basic token. + additionalProperties: false + description: metadata provides the client information for all the registered tokens. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - bank + description: >- + gRPC: `cosmos.bank.v1beta1.Query/DenomsMetadata` + ([reference](/sdk/latest/api-reference/grpc/bank#denomsmetadata)) + + + DenomsMetadata queries the client metadata for all registered coin + + denominations. + x-grpc-method: cosmos.bank.v1beta1.Query/DenomsMetadata + /cosmos/bank/v1beta1/denoms_metadata/{denom}: + get: + summary: DenomMetadata + operationId: bank_v1beta1_DenomMetadata + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + metadata: + description: >- + metadata describes and provides all the client information for the requested + token. + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit (e.g + uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given DenomUnit's + denom + + 1 denom = 10^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit of + 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + additionalProperties: false + title: denom_units represents the list of DenomUnit's for a given coin + nullable: true + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with exponent = + 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: |- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + be the same as the display. + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional information. + Optional. + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. It's used to verify + that + + the document didn't change. Optional. + nullable: true + additionalProperties: false + description: |- + QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denom + description: denom is the coin denom to query the metadata for. + in: path + required: true + schema: + type: string + pattern: .+ + tags: + - bank + description: >- + gRPC: `cosmos.bank.v1beta1.Query/DenomMetadata` + ([reference](/sdk/latest/api-reference/grpc/bank#denommetadata)) + + + DenomMetadata queries the client metadata of a given coin denomination. + x-grpc-method: cosmos.bank.v1beta1.Query/DenomMetadata + /cosmos/bank/v1beta1/denoms_metadata_by_query_string: + get: + summary: DenomMetadataByQueryString + operationId: bank_v1beta1_DenomMetadataByQueryString + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + metadata: + description: >- + metadata describes and provides all the client information for the requested + token. + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit (e.g + uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given DenomUnit's + denom + + 1 denom = 10^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit of + 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + additionalProperties: false + title: denom_units represents the list of DenomUnit's for a given coin + nullable: true + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with exponent = + 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: |- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + be the same as the display. + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional information. + Optional. + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. It's used to verify + that + + the document didn't change. Optional. + nullable: true + additionalProperties: false + description: >- + QueryDenomMetadataByQueryStringResponse is the response type for the + Query/DenomMetadata RPC + + method. Identical with QueryDenomMetadataResponse but receives denom as query + string in request. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denom + description: denom is the coin denom to query the metadata for. + in: query + required: false + schema: + type: string + tags: + - bank + description: >- + gRPC: `cosmos.bank.v1beta1.Query/DenomMetadataByQueryString` + ([reference](/sdk/latest/api-reference/grpc/bank#denommetadatabyquerystring)) + + + DenomMetadataByQueryString queries the client metadata of a given coin denomination. + x-grpc-method: cosmos.bank.v1beta1.Query/DenomMetadataByQueryString + /cosmos/bank/v1beta1/params: + get: + summary: Params + operationId: bank_v1beta1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + params: + description: params provides the parameters of the bank module. + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + additionalProperties: false + description: >- + Deprecated: Use of SendEnabled in params is deprecated. + + For genesis, use the newly added send_enabled field in the genesis object. + + Storage, lookup, and manipulation of this information is now in the + keeper. + + + As of cosmos-sdk 0.47, this only exists for backwards compatibility of + genesis files. + nullable: true + default_send_enabled: + type: boolean + nullable: true + additionalProperties: false + description: QueryParamsResponse defines the response type for querying x/bank parameters. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - bank + description: >- + gRPC: `cosmos.bank.v1beta1.Query/Params` + ([reference](/sdk/latest/api-reference/grpc/bank#params)) + + + Params queries the parameters of x/bank module. + x-grpc-method: cosmos.bank.v1beta1.Query/Params + /cosmos/bank/v1beta1/send_enabled: + get: + summary: SendEnabled + description: >- + gRPC: `cosmos.bank.v1beta1.Query/SendEnabled` + ([reference](/sdk/latest/api-reference/grpc/bank#sendenabled)) + + + SendEnabled queries for SendEnabled entries. + + + This query only returns denominations that have specific SendEnabled settings. + + Any denomination that does not have a specific setting will use the default + + params.default_send_enabled, and will not be returned by this query. + operationId: bank_v1beta1_SendEnabled + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + additionalProperties: false + nullable: true + pagination: + description: |- + pagination defines the pagination in the response. This field is only + populated if the denoms field in the request is empty. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QuerySendEnabledResponse defines the RPC response of a SendEnable query. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denoms + description: denoms is the specific denoms you want look up. Leave empty to get all entries. + in: query + required: false + explode: true + schema: + type: array + items: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - bank + x-grpc-method: cosmos.bank.v1beta1.Query/SendEnabled + /cosmos/bank/v1beta1/spendable_balances/{address}: + get: + summary: SpendableBalances + description: >- + gRPC: `cosmos.bank.v1beta1.Query/SpendableBalances` + ([reference](/sdk/latest/api-reference/grpc/bank#spendablebalances)) + + + SpendableBalances queries the spendable balance of all coins for a single + + account. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: bank_v1beta1_SpendableBalances + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: balances is the spendable balances of all the coins. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QuerySpendableBalancesResponse defines the gRPC response structure for querying + an account's spendable balances. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: address + description: address is the address to query spendable balances for. + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - bank + x-grpc-method: cosmos.bank.v1beta1.Query/SpendableBalances + /cosmos/bank/v1beta1/spendable_balances/{address}/by_denom: + get: + summary: SpendableBalanceByDenom + description: >- + gRPC: `cosmos.bank.v1beta1.Query/SpendableBalanceByDenom` + ([reference](/sdk/latest/api-reference/grpc/bank#spendablebalancebydenom)) + + + SpendableBalanceByDenom queries the spendable balance of a single denom for + + a single account. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: bank_v1beta1_SpendableBalanceByDenom + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + balance: + description: balance is the balance of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + additionalProperties: false + description: |- + QuerySpendableBalanceByDenomResponse defines the gRPC response structure for + querying an account's spendable balance for a specific denom. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: address + description: address is the address to query balances for. + in: path + required: true + schema: + type: string + - name: denom + description: denom is the coin denom to query balances for. + in: query + required: false + schema: + type: string + tags: + - bank + x-grpc-method: cosmos.bank.v1beta1.Query/SpendableBalanceByDenom + /cosmos/bank/v1beta1/supply: + get: + summary: TotalSupply + description: >- + gRPC: `cosmos.bank.v1beta1.Query/TotalSupply` + ([reference](/sdk/latest/api-reference/grpc/bank#totalsupply)) + + + TotalSupply queries the total supply of all coins. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: bank_v1beta1_TotalSupply + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + supply: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + title: supply is the supply of the coins + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + title: |- + QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC + method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - bank + x-grpc-method: cosmos.bank.v1beta1.Query/TotalSupply + /cosmos/bank/v1beta1/supply/by_denom: + get: + summary: SupplyOf + description: >- + gRPC: `cosmos.bank.v1beta1.Query/SupplyOf` + ([reference](/sdk/latest/api-reference/grpc/bank#supplyof)) + + + SupplyOf queries the supply of a single coin. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: bank_v1beta1_SupplyOf + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + amount: + description: amount is the supply of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + additionalProperties: false + description: QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denom + description: denom is the coin denom to query balances for. + in: query + required: false + schema: + type: string + tags: + - bank + x-grpc-method: cosmos.bank.v1beta1.Query/SupplyOf + /cosmos/base/node/v1beta1/config: + get: + summary: Config + operationId: base_v1beta1_Config + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + minimum_gas_price: + type: string + pruning_keep_recent: + type: string + pruning_interval: + type: string + halt_height: + type: string + format: uint64 + description: ConfigResponse defines the response structure for the Config gRPC query. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - base + description: >- + gRPC: `cosmos.base.node.v1beta1.Service/Config` + ([reference](/sdk/latest/api-reference/grpc/base#config)) + + + Config queries for the operator configuration. + x-grpc-method: cosmos.base.node.v1beta1.Service/Config + /cosmos/base/node/v1beta1/status: + get: + summary: Status + operationId: base_v1beta1_Status + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + earliest_store_height: + type: string + format: uint64 + title: earliest block height available in the store + height: + type: string + format: uint64 + title: current block height + timestamp: + type: string + format: date-time + title: block height timestamp + nullable: true + app_hash: + type: string + format: byte + title: app hash of the current block + nullable: true + validator_hash: + type: string + format: byte + title: validator hash provided by the consensus header + nullable: true + description: StateResponse defines the response structure for the status of a node. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - base + description: >- + gRPC: `cosmos.base.node.v1beta1.Service/Status` + ([reference](/sdk/latest/api-reference/grpc/base#status)) + + + Status queries for the node status. + x-grpc-method: cosmos.base.node.v1beta1.Service/Status + /cosmos/base/tendermint/v1beta1/abci_query: + get: + summary: ABCIQuery + operationId: base_v1beta1_ABCIQuery + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int64 + log: + type: string + title: nondeterministic + info: + type: string + title: nondeterministic + index: + type: string + format: int64 + key: + type: string + format: byte + nullable: true + value: + type: string + format: byte + nullable: true + proof_ops: + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + nullable: true + data: + type: string + format: byte + nullable: true + description: >- + ProofOp defines an operation used for calculating Merkle root. The data + could + + be arbitrary format, providing necessary data for example neighbouring + node + + hash. + + + Note: This type is a duplicate of the ProofOp proto type defined in + Tendermint. + additionalProperties: false + nullable: true + description: >- + ProofOps is Merkle proof defined by the list of ProofOps. + + + Note: This type is a duplicate of the ProofOps proto type defined in + Tendermint. + nullable: true + additionalProperties: false + height: + type: string + format: int64 + codespace: + type: string + description: |- + ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query. + + Note: This type is a duplicate of the ResponseQuery proto type defined in + Tendermint. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: data + in: query + required: false + schema: + type: string + format: byte + - name: path + in: query + required: false + schema: + type: string + - name: height + in: query + required: false + schema: + type: string + format: int64 + - name: prove + in: query + required: false + schema: + type: boolean + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/ABCIQuery` + ([reference](/sdk/latest/api-reference/grpc/base#abciquery)) + + + ABCIQuery defines a query handler that supports ABCI queries directly to the + + application, bypassing Tendermint completely. The ABCI query must contain + + a valid and supported path, including app, custom, p2p, and store. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/ABCIQuery + /cosmos/base/tendermint/v1beta1/block_results/latest: + get: + summary: GetLatestBlockResults + operationId: base_v1beta1_GetLatestBlockResults + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + height: + type: string + format: int64 + description: height is the block height. + txs_results: + type: array + items: + type: object + properties: + code: + type: integer + format: int64 + data: + type: string + format: byte + nullable: true + log: + type: string + title: nondeterministic + info: + type: string + title: nondeterministic + gas_wanted: + type: string + format: int64 + gas_used: + type: string + format: int64 + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: >- + EventAttribute is a single key-value pair, associated with an + event. + additionalProperties: false + nullable: true + description: >- + Event allows application developers to attach additional information + to + + ResponseFinalizeBlock and ResponseCheckTx. + + Later, transactions may be queried using these events. + additionalProperties: false + title: nondeterministic + nullable: true + codespace: + type: string + description: >- + ExecTxResult contains results of executing one individual transaction. + + + * Its structure is equivalent to #ResponseDeliverTx which will be + deprecated/deleted + additionalProperties: false + description: txs_results contains the results of each transaction execution. + nullable: true + finalize_block_events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + additionalProperties: false + nullable: true + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + additionalProperties: false + description: |- + finalize_block_events contains consensus-level events emitted during block + finalization, including slashing, jailing, and validator set updates. + nullable: true + validator_updates: + type: array + items: + type: object + properties: + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: PublicKey defines the keys available for use with Validators + nullable: true + additionalProperties: false + power: + type: string + format: int64 + additionalProperties: false + description: validator_updates contains the validator updates for this block. + nullable: true + consensus_param_updates: + description: >- + consensus_param_updates contains any consensus parameter updates for this + block. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + nullable: true + additionalProperties: false + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: >- + Max age of evidence, in blocks. + + + The basic formula for calculating this is: MaxAgeDuration / {average + block + + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + nullable: true + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be + committed in a single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + nullable: true + additionalProperties: false + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + nullable: true + additionalProperties: false + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + nullable: true + additionalProperties: false + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: >- + vote_extensions_enable_height configures the first height during which + + vote extensions will be enabled. During this specified height, and for + all + + subsequent heights, precommit messages that do not contain valid + extension data + + will be considered invalid. Prior to this height, vote extensions will + not + + be used or accepted by validators on the network. + + + Once enabled, vote extensions will be created by the application in + ExtendVote, + + passed to the application for validation in VerifyVoteExtension and + given + + to the application to use when proposing a block during + PrepareProposal. + description: >- + ABCIParams configure functionality specific to the Application Blockchain + Interface. + nullable: true + additionalProperties: false + authority: + type: object + properties: + authority: + type: string + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + app_hash: + type: string + format: byte + description: app_hash is the app hash after processing this block. + nullable: true + description: >- + GetLatestBlockResultsResponse is the response type for the + Query/GetLatestBlockResults RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetLatestBlockResults` + ([reference](/sdk/latest/api-reference/grpc/base#getlatestblockresults)) + + + GetLatestBlockResults returns the block results for the latest block. + + Block results contain finalize_block_events which include consensus-level + + events like slashing, jailing, and validator set updates. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetLatestBlockResults + /cosmos/base/tendermint/v1beta1/block_results/{height}: + get: + summary: GetBlockResults + operationId: base_v1beta1_GetBlockResults + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + height: + type: string + format: int64 + description: height is the block height. + txs_results: + type: array + items: + type: object + properties: + code: + type: integer + format: int64 + data: + type: string + format: byte + nullable: true + log: + type: string + title: nondeterministic + info: + type: string + title: nondeterministic + gas_wanted: + type: string + format: int64 + gas_used: + type: string + format: int64 + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: >- + EventAttribute is a single key-value pair, associated with an + event. + additionalProperties: false + nullable: true + description: >- + Event allows application developers to attach additional information + to + + ResponseFinalizeBlock and ResponseCheckTx. + + Later, transactions may be queried using these events. + additionalProperties: false + title: nondeterministic + nullable: true + codespace: + type: string + description: >- + ExecTxResult contains results of executing one individual transaction. + + + * Its structure is equivalent to #ResponseDeliverTx which will be + deprecated/deleted + additionalProperties: false + description: txs_results contains the results of each transaction execution. + nullable: true + finalize_block_events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + additionalProperties: false + nullable: true + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + additionalProperties: false + description: |- + finalize_block_events contains consensus-level events emitted during block + finalization, including slashing, jailing, and validator set updates. + nullable: true + validator_updates: + type: array + items: + type: object + properties: + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: PublicKey defines the keys available for use with Validators + nullable: true + additionalProperties: false + power: + type: string + format: int64 + additionalProperties: false + description: validator_updates contains the validator updates for this block. + nullable: true + consensus_param_updates: + description: >- + consensus_param_updates contains any consensus parameter updates for this + block. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + nullable: true + additionalProperties: false + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: >- + Max age of evidence, in blocks. + + + The basic formula for calculating this is: MaxAgeDuration / {average + block + + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + nullable: true + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be + committed in a single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + nullable: true + additionalProperties: false + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + nullable: true + additionalProperties: false + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + nullable: true + additionalProperties: false + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: >- + vote_extensions_enable_height configures the first height during which + + vote extensions will be enabled. During this specified height, and for + all + + subsequent heights, precommit messages that do not contain valid + extension data + + will be considered invalid. Prior to this height, vote extensions will + not + + be used or accepted by validators on the network. + + + Once enabled, vote extensions will be created by the application in + ExtendVote, + + passed to the application for validation in VerifyVoteExtension and + given + + to the application to use when proposing a block during + PrepareProposal. + description: >- + ABCIParams configure functionality specific to the Application Blockchain + Interface. + nullable: true + additionalProperties: false + authority: + type: object + properties: + authority: + type: string + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + app_hash: + type: string + format: byte + description: app_hash is the app hash after processing this block. + nullable: true + description: >- + GetBlockResultsResponse is the response type for the Query/GetBlockResults RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: height + in: path + required: true + schema: + type: string + format: int64 + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetBlockResults` + ([reference](/sdk/latest/api-reference/grpc/base#getblockresults)) + + + GetBlockResults queries block results for given height. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetBlockResults + /cosmos/base/tendermint/v1beta1/blocks/latest: + get: + summary: GetLatestBlock + operationId: base_v1beta1_GetLatestBlock + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + block: + title: 'Deprecated: please use `sdk_block` instead' + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. + + NOTE: not all txs here are valid. We're just agreeing on the order + first. + + This means that block.AppHash does not include these txs. + nullable: true + title: Data contains the set of transactions included in the block + nullable: true + additionalProperties: false + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + DuplicateVoteEvidence contains evidence of a validator signed + two conflicting votes. + nullable: true + additionalProperties: false + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for + processing a block in the blockchain, + + including all blockchain data structures and the + rules of the application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the + previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an + error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the + signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: >- + CommitSig is a part of the Vote included in a + Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was + committed by a set of validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + proposer: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use with + Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + nullable: true + additionalProperties: false + additionalProperties: false + nullable: true + nullable: true + additionalProperties: false + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: CommitSig is a part of the Vote included in a Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + sdk_block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + description: >- + proposer_address is the original block proposer address, formatted as + a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, we convert it to + a Bech32 string + + for better UX. + + + original proposer of the block + description: Header defines the structure of a Tendermint block header. + nullable: true + additionalProperties: false + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. + + NOTE: not all txs here are valid. We're just agreeing on the order + first. + + This means that block.AppHash does not include these txs. + nullable: true + title: Data contains the set of transactions included in the block + nullable: true + additionalProperties: false + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + DuplicateVoteEvidence contains evidence of a validator signed + two conflicting votes. + nullable: true + additionalProperties: false + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for + processing a block in the blockchain, + + including all blockchain data structures and the + rules of the application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the + previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an + error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the + signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: >- + CommitSig is a part of the Vote included in a + Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was + committed by a set of validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + proposer: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use with + Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + nullable: true + additionalProperties: false + additionalProperties: false + nullable: true + nullable: true + additionalProperties: false + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: CommitSig is a part of the Vote included in a Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + nullable: true + additionalProperties: false + description: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. + nullable: true + additionalProperties: false + description: >- + GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetLatestBlock` + ([reference](/sdk/latest/api-reference/grpc/base#getlatestblock)) + + + GetLatestBlock returns the latest block. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetLatestBlock + /cosmos/base/tendermint/v1beta1/blocks/{height}: + get: + summary: GetBlockByHeight + operationId: base_v1beta1_GetBlockByHeight + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + block: + title: 'Deprecated: please use `sdk_block` instead' + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. + + NOTE: not all txs here are valid. We're just agreeing on the order + first. + + This means that block.AppHash does not include these txs. + nullable: true + title: Data contains the set of transactions included in the block + nullable: true + additionalProperties: false + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + DuplicateVoteEvidence contains evidence of a validator signed + two conflicting votes. + nullable: true + additionalProperties: false + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for + processing a block in the blockchain, + + including all blockchain data structures and the + rules of the application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the + previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an + error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the + signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: >- + CommitSig is a part of the Vote included in a + Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was + committed by a set of validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + proposer: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use with + Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + nullable: true + additionalProperties: false + additionalProperties: false + nullable: true + nullable: true + additionalProperties: false + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: CommitSig is a part of the Vote included in a Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + sdk_block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + description: >- + proposer_address is the original block proposer address, formatted as + a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, we convert it to + a Bech32 string + + for better UX. + + + original proposer of the block + description: Header defines the structure of a Tendermint block header. + nullable: true + additionalProperties: false + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. + + NOTE: not all txs here are valid. We're just agreeing on the order + first. + + This means that block.AppHash does not include these txs. + nullable: true + title: Data contains the set of transactions included in the block + nullable: true + additionalProperties: false + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + DuplicateVoteEvidence contains evidence of a validator signed + two conflicting votes. + nullable: true + additionalProperties: false + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for + processing a block in the blockchain, + + including all blockchain data structures and the + rules of the application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the + previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an + error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the + signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: >- + CommitSig is a part of the Vote included in a + Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was + committed by a set of validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + proposer: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use with + Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + nullable: true + additionalProperties: false + additionalProperties: false + nullable: true + nullable: true + additionalProperties: false + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: CommitSig is a part of the Vote included in a Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + nullable: true + additionalProperties: false + description: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. + nullable: true + additionalProperties: false + description: >- + GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: height + in: path + required: true + schema: + type: string + format: int64 + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight` + ([reference](/sdk/latest/api-reference/grpc/base#getblockbyheight)) + + + GetBlockByHeight queries block for given height. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight + /cosmos/base/tendermint/v1beta1/node_info: + get: + summary: GetNodeInfo + operationId: base_v1beta1_GetNodeInfo + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + default_node_info: + type: object + properties: + protocol_version: + type: object + properties: + p2p: + type: string + format: uint64 + block: + type: string + format: uint64 + app: + type: string + format: uint64 + nullable: true + additionalProperties: false + default_node_id: + type: string + listen_addr: + type: string + network: + type: string + version: + type: string + channels: + type: string + format: byte + nullable: true + moniker: + type: string + other: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + application_version: + type: object + properties: + name: + type: string + app_name: + type: string + version: + type: string + git_commit: + type: string + build_tags: + type: string + go_version: + type: string + build_deps: + type: array + items: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + additionalProperties: false + nullable: true + cosmos_sdk_version: + type: string + description: VersionInfo is the type for the GetNodeInfoResponse message. + nullable: true + additionalProperties: false + description: GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetNodeInfo` + ([reference](/sdk/latest/api-reference/grpc/base#getnodeinfo)) + + + GetNodeInfo queries the current node info. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetNodeInfo + /cosmos/base/tendermint/v1beta1/syncing: + get: + summary: GetSyncing + operationId: base_v1beta1_GetSyncing + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + syncing: + type: boolean + earliest_block_height: + type: string + format: int64 + description: earliest_block_height is the earliest block height available on this node. + latest_block_height: + type: string + format: int64 + description: latest_block_height is the latest block height available on this node. + description: GetSyncingResponse is the response type for the Query/GetSyncing RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetSyncing` + ([reference](/sdk/latest/api-reference/grpc/base#getsyncing)) + + + GetSyncing queries node syncing. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetSyncing + /cosmos/base/tendermint/v1beta1/validatorsets/latest: + get: + summary: GetLatestValidatorSet + operationId: base_v1beta1_GetLatestValidatorSet + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + block_height: + type: string + format: int64 + validators: + type: array + items: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + nullable: true + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: >- + GetLatestValidatorSetResponse is the response type for the + Query/GetValidatorSetByHeight RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet` + ([reference](/sdk/latest/api-reference/grpc/base#getlatestvalidatorset)) + + + GetLatestValidatorSet queries latest validator-set. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet + /cosmos/base/tendermint/v1beta1/validatorsets/{height}: + get: + summary: GetValidatorSetByHeight + operationId: base_v1beta1_GetValidatorSetByHeight + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + block_height: + type: string + format: int64 + validators: + type: array + items: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + nullable: true + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: >- + GetValidatorSetByHeightResponse is the response type for the + Query/GetValidatorSetByHeight RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: height + in: path + required: true + schema: + type: string + format: int64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight` + ([reference](/sdk/latest/api-reference/grpc/base#getvalidatorsetbyheight)) + + + GetValidatorSetByHeight queries validator-set at a given height. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight + /cosmos/consensus/v1/params: + get: + summary: Params + operationId: consensus_v1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + params: + description: |- + params are the tendermint consensus params stored in the consensus module. + Please note that `params.version` is not populated in this response, it is + tracked separately in the x/upgrade module. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + nullable: true + additionalProperties: false + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: >- + Max age of evidence, in blocks. + + + The basic formula for calculating this is: MaxAgeDuration / {average + block + + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + nullable: true + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be + committed in a single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + nullable: true + additionalProperties: false + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + nullable: true + additionalProperties: false + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + nullable: true + additionalProperties: false + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: >- + vote_extensions_enable_height configures the first height during which + + vote extensions will be enabled. During this specified height, and for + all + + subsequent heights, precommit messages that do not contain valid + extension data + + will be considered invalid. Prior to this height, vote extensions will + not + + be used or accepted by validators on the network. + + + Once enabled, vote extensions will be created by the application in + ExtendVote, + + passed to the application for validation in VerifyVoteExtension and + given + + to the application to use when proposing a block during + PrepareProposal. + description: >- + ABCIParams configure functionality specific to the Application Blockchain + Interface. + nullable: true + additionalProperties: false + authority: + type: object + properties: + authority: + type: string + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + description: QueryParamsResponse defines the response type for querying x/consensus parameters. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - consensus + description: >- + gRPC: `cosmos.consensus.v1.Query/Params` + ([reference](/sdk/latest/api-reference/grpc/consensus#params)) + + + Params queries the parameters of x/consensus module. + x-grpc-method: cosmos.consensus.v1.Query/Params + /cosmos/distribution/v1beta1/community_pool: + get: + summary: CommunityPool + operationId: distribution_v1beta1_CommunityPool + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + pool: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: pool defines community pool's coins. + nullable: true + description: |- + QueryCommunityPoolResponse is the response type for the Query/CommunityPool + RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/CommunityPool` + ([reference](/sdk/latest/api-reference/grpc/distribution#communitypool)) + + + CommunityPool queries the community pool coins. + x-grpc-method: cosmos.distribution.v1beta1.Query/CommunityPool + /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards: + get: + summary: DelegationTotalRewards + operationId: distribution_v1beta1_DelegationTotalRewards + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + validator_address: + type: string + reward: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + nullable: true + description: |- + DelegationDelegatorReward represents the properties + of a delegator's delegation reward. + additionalProperties: false + description: rewards defines all the rewards accrued by a delegator. + nullable: true + total: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: total defines the sum of all the rewards. + nullable: true + description: |- + QueryDelegationTotalRewardsResponse is the response type for the + Query/DelegationTotalRewards RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: delegatorAddress + description: delegator_address defines the delegator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/DelegationTotalRewards` + ([reference](/sdk/latest/api-reference/grpc/distribution#delegationtotalrewards)) + + + DelegationTotalRewards queries the total rewards accrued by each + + validator. + x-grpc-method: cosmos.distribution.v1beta1.Query/DelegationTotalRewards + /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards/{validatorAddress}: + get: + summary: DelegationRewards + operationId: distribution_v1beta1_DelegationRewards + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: rewards defines the rewards accrued by a delegation. + nullable: true + description: |- + QueryDelegationRewardsResponse is the response type for the + Query/DelegationRewards RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: delegatorAddress + description: delegator_address defines the delegator address to query for. + in: path + required: true + schema: + type: string + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/DelegationRewards` + ([reference](/sdk/latest/api-reference/grpc/distribution#delegationrewards)) + + + DelegationRewards queries the total rewards accrued by a delegation. + x-grpc-method: cosmos.distribution.v1beta1.Query/DelegationRewards + /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/starting_info/{validatorAddress}: + get: + summary: DelegatorStartingInfo + operationId: distribution_v1beta1_DelegatorStartingInfo + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + starting_info: + description: starting_info defines the starting info of a delegator. + type: object + properties: + previous_period: + type: string + format: uint64 + stake: + type: string + height: + type: string + format: uint64 + nullable: true + additionalProperties: false + description: |- + QueryDelegatorStartingInfoResponse is the response type for the + Query/DelegatorStartingInfo RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: delegatorAddress + description: delegator_address defines the delegator address to query for. + in: path + required: true + schema: + type: string + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/DelegatorStartingInfo` + ([reference](/sdk/latest/api-reference/grpc/distribution#delegatorstartinginfo)) + + + DelegatorStartingInfo queries the starting info for a delegator. + x-grpc-method: cosmos.distribution.v1beta1.Query/DelegatorStartingInfo + /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/validators: + get: + summary: DelegatorValidators + operationId: distribution_v1beta1_DelegatorValidators + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + validators: + type: array + items: + type: string + description: validators defines the validators a delegator is delegating for. + description: |- + QueryDelegatorValidatorsResponse is the response type for the + Query/DelegatorValidators RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: delegatorAddress + description: delegator_address defines the delegator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/DelegatorValidators` + ([reference](/sdk/latest/api-reference/grpc/distribution#delegatorvalidators)) + + + DelegatorValidators queries the validators of a delegator. + x-grpc-method: cosmos.distribution.v1beta1.Query/DelegatorValidators + /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/withdraw_address: + get: + summary: DelegatorWithdrawAddress + operationId: distribution_v1beta1_DelegatorWithdrawAddress + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + withdraw_address: + type: string + description: withdraw_address defines the delegator address to query for. + description: |- + QueryDelegatorWithdrawAddressResponse is the response type for the + Query/DelegatorWithdrawAddress RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: delegatorAddress + description: delegator_address defines the delegator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress` + ([reference](/sdk/latest/api-reference/grpc/distribution#delegatorwithdrawaddress)) + + + DelegatorWithdrawAddress queries withdraw address of a delegator. + x-grpc-method: cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress + /cosmos/distribution/v1beta1/params: + get: + summary: Params + operationId: distribution_v1beta1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + community_tax: + type: string + base_proposer_reward: + type: string + description: >- + Deprecated: The base_proposer_reward field is deprecated and is no longer + used + + in the x/distribution module's reward mechanism. + bonus_proposer_reward: + type: string + description: >- + Deprecated: The bonus_proposer_reward field is deprecated and is no longer + used + + in the x/distribution module's reward mechanism. + withdraw_addr_enabled: + type: boolean + nullable: true + additionalProperties: false + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/Params` + ([reference](/sdk/latest/api-reference/grpc/distribution#params)) + + + Params queries params of the distribution module. + x-grpc-method: cosmos.distribution.v1beta1.Query/Params + /cosmos/distribution/v1beta1/validators/{validatorAddress}: + get: + summary: ValidatorDistributionInfo + operationId: distribution_v1beta1_ValidatorDistributionInfo + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + operator_address: + type: string + description: operator_address defines the validator operator address. + self_bond_rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: self_bond_rewards defines the self delegations rewards. + nullable: true + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: commission defines the commission the validator received. + nullable: true + description: >- + QueryValidatorDistributionInfoResponse is the response type for the + Query/ValidatorDistributionInfo RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo` + ([reference](/sdk/latest/api-reference/grpc/distribution#validatordistributioninfo)) + + + ValidatorDistributionInfo queries validator commission and self-delegation rewards for + validator + x-grpc-method: cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo + /cosmos/distribution/v1beta1/validators/{validatorAddress}/commission: + get: + summary: ValidatorCommission + operationId: distribution_v1beta1_ValidatorCommission + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + commission: + description: commission defines the commission the validator received. + type: object + properties: + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + nullable: true + nullable: true + additionalProperties: false + title: |- + QueryValidatorCommissionResponse is the response type for the + Query/ValidatorCommission RPC method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/ValidatorCommission` + ([reference](/sdk/latest/api-reference/grpc/distribution#validatorcommission)) + + + ValidatorCommission queries accumulated commission for a validator. + x-grpc-method: cosmos.distribution.v1beta1.Query/ValidatorCommission + /cosmos/distribution/v1beta1/validators/{validatorAddress}/current_rewards: + get: + summary: ValidatorCurrentRewards + operationId: distribution_v1beta1_ValidatorCurrentRewards + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + rewards: + description: rewards defines the current rewards of a validator. + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + nullable: true + period: + type: string + format: uint64 + nullable: true + additionalProperties: false + description: |- + QueryValidatorCurrentRewardsResponse is the response type for the + Query/ValidatorCurrentRewards RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/ValidatorCurrentRewards` + ([reference](/sdk/latest/api-reference/grpc/distribution#validatorcurrentrewards)) + + + ValidatorCurrentRewards queries current rewards for a validator. + x-grpc-method: cosmos.distribution.v1beta1.Query/ValidatorCurrentRewards + /cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}: + get: + summary: ValidatorHistoricalRewards + operationId: distribution_v1beta1_ValidatorHistoricalRewards + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + rewards: + description: rewards defines the historical rewards of a validator. + type: object + properties: + cumulative_reward_ratio: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + nullable: true + reference_count: + type: integer + format: int64 + title: |- + ValidatorHistoricalRewards represents historical rewards for a validator. + Height is implicit within the store key. + Cumulative reward ratio is the sum from the zeroeth period + until this period of rewards / tokens, per the spec. + The reference count indicates the number of objects + which might need to reference this historical entry at any point. + ReferenceCount = + number of outstanding delegations which ended the associated period (and + might need to read that record) + + number of slashes which ended the associated period (and might need to + read that record) + + one per validator for the zeroeth period, set on initialization + nullable: true + additionalProperties: false + description: |- + QueryValidatorHistoricalRewardsResponse is the response type for the + Query/ValidatorHistoricalRewards RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + - name: period + description: period defines the period to query historical rewards for. + in: path + required: true + schema: + type: string + format: uint64 + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/ValidatorHistoricalRewards` + ([reference](/sdk/latest/api-reference/grpc/distribution#validatorhistoricalrewards)) + + + ValidatorHistoricalRewards queries historical rewards for a validator at a specific period. + x-grpc-method: cosmos.distribution.v1beta1.Query/ValidatorHistoricalRewards + /cosmos/distribution/v1beta1/validators/{validatorAddress}/outstanding_rewards: + get: + summary: ValidatorOutstandingRewards + operationId: distribution_v1beta1_ValidatorOutstandingRewards + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + rewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + nullable: true + description: |- + ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards + for a validator inexpensive to track, allows simple sanity checks. + nullable: true + additionalProperties: false + description: |- + QueryValidatorOutstandingRewardsResponse is the response type for the + Query/ValidatorOutstandingRewards RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards` + ([reference](/sdk/latest/api-reference/grpc/distribution#validatoroutstandingrewards)) + + + ValidatorOutstandingRewards queries rewards of a validator address. + x-grpc-method: cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards + /cosmos/distribution/v1beta1/validators/{validatorAddress}/slashes: + get: + summary: ValidatorSlashes + operationId: distribution_v1beta1_ValidatorSlashes + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + slashes: + type: array + items: + type: object + properties: + validator_period: + type: string + format: uint64 + fraction: + type: string + description: |- + ValidatorSlashEvent represents a validator slash event. + Height is implicit within the store key. + This is needed to calculate appropriate amount of staking tokens + for delegations which are withdrawn after a slash has occurred. + additionalProperties: false + description: slashes defines the slashes the validator received. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryValidatorSlashesResponse is the response type for the + Query/ValidatorSlashes RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + - name: startingHeight + description: starting_height defines the optional starting height to query the slashes. + in: query + required: false + schema: + type: string + format: uint64 + - name: endingHeight + description: starting_height defines the optional ending height to query the slashes. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/ValidatorSlashes` + ([reference](/sdk/latest/api-reference/grpc/distribution#validatorslashes)) + + + ValidatorSlashes queries slash events of a validator. + x-grpc-method: cosmos.distribution.v1beta1.Query/ValidatorSlashes + /cosmos/epochs/v1beta1/current_epoch: + get: + summary: CurrentEpoch + operationId: epochs_v1beta1_CurrentEpoch + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + current_epoch: + type: string + format: int64 + description: |- + QueryCurrentEpochResponse defines the gRPC response structure for + querying an epoch by its identifier. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: identifier + in: query + required: false + schema: + type: string + tags: + - epochs + description: >- + gRPC: `cosmos.epochs.v1beta1.Query/CurrentEpoch` + ([reference](/sdk/latest/api-reference/grpc/epochs#currentepoch)) + + + CurrentEpoch provide current epoch of specified identifier + x-grpc-method: cosmos.epochs.v1beta1.Query/CurrentEpoch + /cosmos/epochs/v1beta1/epochs: + get: + summary: EpochInfos + operationId: epochs_v1beta1_EpochInfos + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + epochs: + type: array + items: + type: object + properties: + identifier: + type: string + description: identifier is a unique reference to this particular timer. + start_time: + type: string + format: date-time + description: |- + start_time is the time at which the timer first ever ticks. + If start_time is in the future, the epoch will not begin until the start + time. + nullable: true + duration: + type: string + description: |- + duration is the time in between epoch ticks. + In order for intended behavior to be met, duration should + be greater than the chains expected block time. + Duration must be non-zero. + nullable: true + current_epoch: + type: string + format: int64 + description: >- + current_epoch is the current epoch number, or in other words, + + how many times has the timer 'ticked'. + + The first tick (current_epoch=1) is defined as + + the first block whose blocktime is greater than the EpochInfo + start_time. + current_epoch_start_time: + type: string + format: date-time + description: >- + current_epoch_start_time describes the start time of the current timer + + interval. The interval is (current_epoch_start_time, + + current_epoch_start_time + duration] When the timer ticks, this is set + to + + current_epoch_start_time = last_epoch_start_time + duration only one + timer + + tick for a given identifier can occur per block. + + + NOTE! The current_epoch_start_time may diverge significantly from the + + wall-clock time the epoch began at. Wall-clock time of epoch start may + be + + >> current_epoch_start_time. Suppose current_epoch_start_time = 10, + + duration = 5. Suppose the chain goes offline at t=14, and comes back + online + + at t=30, and produces blocks at every successive time. (t=31, 32, etc.) + + * The t=30 block will start the epoch for (10, 15] + + * The t=31 block will start the epoch for (15, 20] + + * The t=32 block will start the epoch for (20, 25] + + * The t=33 block will start the epoch for (25, 30] + + * The t=34 block will start the epoch for (30, 35] + + * The **t=36** block will start the epoch for (35, 40] + nullable: true + epoch_counting_started: + type: boolean + description: |- + epoch_counting_started is a boolean, that indicates whether this + epoch timer has began yet. + current_epoch_start_height: + type: string + format: int64 + title: >- + current_epoch_start_height is the block height at which the current + epoch + + started. (The block height at which the timer last ticked) + description: |- + EpochInfo is a struct that describes the data going into + a timer defined by the x/epochs module. + additionalProperties: false + nullable: true + description: |- + QueryEpochInfosRequest defines the gRPC response structure for + querying all epoch info. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - epochs + description: >- + gRPC: `cosmos.epochs.v1beta1.Query/EpochInfos` + ([reference](/sdk/latest/api-reference/grpc/epochs#epochinfos)) + + + EpochInfos provide running epochInfos + x-grpc-method: cosmos.epochs.v1beta1.Query/EpochInfos + /cosmos/evidence/v1beta1/evidence: + get: + summary: AllEvidence + operationId: evidence_v1beta1_AllEvidence + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: evidence returns all evidences. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC + method. + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - evidence + description: >- + gRPC: `cosmos.evidence.v1beta1.Query/AllEvidence` + ([reference](/sdk/latest/api-reference/grpc/evidence#allevidence)) + + + AllEvidence queries all evidence. + x-grpc-method: cosmos.evidence.v1beta1.Query/AllEvidence + /cosmos/evidence/v1beta1/evidence/{hash}: + get: + summary: Evidence + operationId: evidence_v1beta1_Evidence + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + evidence: + description: evidence returns the requested evidence. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + description: QueryEvidenceResponse is the response type for the Query/Evidence RPC method. + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: hash + description: hash defines the evidence hash of the requested evidence. + in: path + required: true + schema: + type: string + - name: evidenceHash + description: |- + evidence_hash defines the hash of the requested evidence. + Deprecated: Use hash, a HEX encoded string, instead. + in: query + required: false + schema: + type: string + format: byte + tags: + - evidence + description: >- + gRPC: `cosmos.evidence.v1beta1.Query/Evidence` + ([reference](/sdk/latest/api-reference/grpc/evidence#evidence)) + + + Evidence queries evidence based on evidence hash. + x-grpc-method: cosmos.evidence.v1beta1.Query/Evidence + /cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}: + get: + summary: Allowance + operationId: feegrant_v1beta1_Allowance + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + allowance: + description: allowance is an allowance granted for grantee by granter. + type: object + properties: + granter: + type: string + description: granter is the address of the user granting an allowance of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of another + user's funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + title: Grant is stored in the KVStore to record a grant with full context + nullable: true + description: QueryAllowanceResponse is the response type for the Query/Allowance RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: granter + description: granter is the address of the user granting an allowance of their funds. + in: path + required: true + schema: + type: string + - name: grantee + description: grantee is the address of the user being granted an allowance of another user's funds. + in: path + required: true + schema: + type: string + tags: + - feegrant + description: >- + gRPC: `cosmos.feegrant.v1beta1.Query/Allowance` + ([reference](/sdk/latest/api-reference/grpc/feegrant#allowance)) + + + Allowance returns granted allowance to the grantee by the granter. + x-grpc-method: cosmos.feegrant.v1beta1.Query/Allowance + /cosmos/feegrant/v1beta1/allowances/{grantee}: + get: + summary: Allowances + operationId: feegrant_v1beta1_Allowances + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: granter is the address of the user granting an allowance of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of another + user's funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + title: Grant is stored in the KVStore to record a grant with full context + description: allowances are allowance's granted for grantee by granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryAllowancesResponse is the response type for the Query/Allowances RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: grantee + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - feegrant + description: >- + gRPC: `cosmos.feegrant.v1beta1.Query/Allowances` + ([reference](/sdk/latest/api-reference/grpc/feegrant#allowances)) + + + Allowances returns all the grants for the given grantee address. + x-grpc-method: cosmos.feegrant.v1beta1.Query/Allowances + /cosmos/feegrant/v1beta1/issued/{granter}: + get: + summary: AllowancesByGranter + operationId: feegrant_v1beta1_AllowancesByGranter + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: granter is the address of the user granting an allowance of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of another + user's funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + title: Grant is stored in the KVStore to record a grant with full context + description: allowances that have been issued by the granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: >- + QueryAllowancesByGranterResponse is the response type for the + Query/AllowancesByGranter RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: granter + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - feegrant + description: >- + gRPC: `cosmos.feegrant.v1beta1.Query/AllowancesByGranter` + ([reference](/sdk/latest/api-reference/grpc/feegrant#allowancesbygranter)) + + + AllowancesByGranter returns all the grants given by an address + x-grpc-method: cosmos.feegrant.v1beta1.Query/AllowancesByGranter + /cosmos/gov/v1/constitution: + get: + summary: Constitution + operationId: gov_v1_Constitution + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + constitution: + type: string + title: >- + QueryConstitutionResponse is the response type for the Query/Constitution RPC + method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1.Query/Constitution` + ([reference](/sdk/latest/api-reference/grpc/gov#constitution)) + + + Constitution queries the chain's constitution. + x-grpc-method: cosmos.gov.v1.Query/Constitution + /cosmos/gov/v1/params/{paramsType}: + get: + summary: Params (v1) + operationId: gov_v1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + voting_params: + description: |- + Deprecated: Prefer to use `params` instead. + voting_params defines the parameters related to voting. + type: object + properties: + voting_period: + type: string + description: Duration of the voting period. + nullable: true + nullable: true + additionalProperties: false + deposit_params: + description: |- + Deprecated: Prefer to use `params` instead. + deposit_params defines the parameters related to deposit. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: Minimum deposit for a proposal to enter voting period. + nullable: true + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + nullable: true + additionalProperties: false + tally_params: + description: |- + Deprecated: Prefer to use `params` instead. + tally_params defines the parameters related to tally. + type: object + properties: + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + veto_threshold: + type: string + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + nullable: true + additionalProperties: false + params: + description: params defines all the parameters of x/gov module. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: Minimum deposit for a proposal to enter voting period. + nullable: true + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + voting_period: + type: string + description: Duration of the voting period. + nullable: true + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + veto_threshold: + type: string + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + min_initial_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value that must be + paid at proposal submission. + proposal_cancel_ratio: + type: string + description: >- + The cancel ratio which will not be returned back to the depositors when a + proposal is cancelled. + proposal_cancel_dest: + type: string + description: >- + The address which will receive (proposal_cancel_ratio * deposit) proposal + deposits. + + If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be + burned. + expedited_voting_period: + type: string + description: Duration of the voting period of an expedited proposal. + nullable: true + expedited_threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.67.' + expedited_min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: Minimum expedited deposit for a proposal to enter voting period. + nullable: true + burn_vote_quorum: + type: boolean + title: burn deposits if a proposal does not meet quorum + burn_proposal_deposit_prevote: + type: boolean + title: burn deposits if the proposal does not enter voting period + burn_vote_veto: + type: boolean + title: burn deposits if quorum with vote type no_veto is met + min_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value minimum that + must be met when making a deposit. + + Default value: 0.01. Meaning that for a chain with a min_deposit of + 100stake, a deposit of 1stake would be + + required. + nullable: true + additionalProperties: false + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: paramsType + description: |- + params_type defines which parameters to query for, can be one of "voting", + "tallying" or "deposit". + in: path + required: true + schema: + type: string + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1.Query/Params` + ([reference](/sdk/latest/api-reference/grpc/gov#params-v1)) + + + Params queries all parameters of the gov module. + x-grpc-method: cosmos.gov.v1.Query/Params + /cosmos/gov/v1/proposals: + get: + summary: Proposals (v1) + operationId: gov_v1_Proposals + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id defines the unique id of the proposal. + messages: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + messages are the arbitrary messages to be executed if the proposal + passes. + nullable: true + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + nullable: true + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: >- + no_with_veto_count is the number of no with veto votes on a + proposal. + nullable: true + additionalProperties: false + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + nullable: true + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + nullable: true + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: total_deposit is the total deposit on the proposal. + nullable: true + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + nullable: true + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + nullable: true + metadata: + type: string + title: |- + metadata is any arbitrary metadata attached to the proposal. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#proposal-3 + title: + type: string + title: title is the title of the proposal + summary: + type: string + title: summary is a short summary of the proposal + proposer: + type: string + title: proposer is the address of the proposal submitter + expedited: + type: boolean + title: expedited defines if the proposal is expedited + failed_reason: + type: string + title: failed_reason defines the reason why the proposal failed + description: Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryProposalsResponse is the response type for the Query/Proposals RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalStatus + description: |- + proposal_status defines the status of the proposals. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + in: query + required: false + schema: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + - name: voter + description: voter defines the voter address for the proposals. + in: query + required: false + schema: + type: string + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: query + required: false + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1.Query/Proposals` + ([reference](/sdk/latest/api-reference/grpc/gov#proposals-v1)) + + + Proposals queries all proposals based on given status. + x-grpc-method: cosmos.gov.v1.Query/Proposals + /cosmos/gov/v1/proposals/{proposalId}: + get: + summary: Proposal (v1) + operationId: gov_v1_Proposal + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + proposal: + description: proposal is the requested governance proposal. + type: object + properties: + id: + type: string + format: uint64 + description: id defines the unique id of the proposal. + messages: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: messages are the arbitrary messages to be executed if the proposal passes. + nullable: true + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + nullable: true + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. + nullable: true + additionalProperties: false + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + nullable: true + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + nullable: true + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: total_deposit is the total deposit on the proposal. + nullable: true + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + nullable: true + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + nullable: true + metadata: + type: string + title: |- + metadata is any arbitrary metadata attached to the proposal. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#proposal-3 + title: + type: string + title: title is the title of the proposal + summary: + type: string + title: summary is a short summary of the proposal + proposer: + type: string + title: proposer is the address of the proposal submitter + expedited: + type: boolean + title: expedited defines if the proposal is expedited + failed_reason: + type: string + title: failed_reason defines the reason why the proposal failed + nullable: true + description: QueryProposalResponse is the response type for the Query/Proposal RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1.Query/Proposal` + ([reference](/sdk/latest/api-reference/grpc/gov#proposal-v1)) + + + Proposal queries proposal details based on ProposalID. + x-grpc-method: cosmos.gov.v1.Query/Proposal + /cosmos/gov/v1/proposals/{proposalId}/deposits: + get: + summary: Deposits (v1) + operationId: gov_v1_Deposits + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + deposits: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: amount to be deposited by depositor. + nullable: true + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + additionalProperties: false + description: deposits defines the requested deposits. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryDepositsResponse is the response type for the Query/Deposits RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1.Query/Deposits` + ([reference](/sdk/latest/api-reference/grpc/gov#deposits-v1)) + + + Deposits queries all deposits of a single proposal. + x-grpc-method: cosmos.gov.v1.Query/Deposits + /cosmos/gov/v1/proposals/{proposalId}/deposits/{depositor}: + get: + summary: Deposit (Query, v1) + operationId: gov_v1_Deposit + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + deposit: + description: deposit defines the requested deposit. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: amount to be deposited by depositor. + nullable: true + nullable: true + additionalProperties: false + description: QueryDepositResponse is the response type for the Query/Deposit RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: path + required: true + schema: + type: string + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1.Query/Deposit` + ([reference](/sdk/latest/api-reference/grpc/gov#deposit-query-v1)) + + + Deposit queries single deposit information based on proposalID, depositAddr. + x-grpc-method: cosmos.gov.v1.Query/Deposit + /cosmos/gov/v1/proposals/{proposalId}/tally: + get: + summary: TallyResult (v1) + operationId: gov_v1_TallyResult + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. + nullable: true + additionalProperties: false + description: QueryTallyResultResponse is the response type for the Query/Tally RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1.Query/TallyResult` + ([reference](/sdk/latest/api-reference/grpc/gov#tallyresult-v1)) + + + TallyResult queries the tally of a proposal vote. + x-grpc-method: cosmos.gov.v1.Query/TallyResult + /cosmos/gov/v1/proposals/{proposalId}/votes: + get: + summary: Votes (v1) + operationId: gov_v1_Votes + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain + duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + additionalProperties: false + description: options is the weighted vote options. + nullable: true + metadata: + type: string + title: >- + metadata is any arbitrary metadata attached to the vote. + + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#vote-5 + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + additionalProperties: false + description: votes defines the queried votes. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryVotesResponse is the response type for the Query/Votes RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - gov + description: |- + gRPC: `cosmos.gov.v1.Query/Votes` ([reference](/sdk/latest/api-reference/grpc/gov#votes-v1)) + + Votes queries votes of a given proposal. + x-grpc-method: cosmos.gov.v1.Query/Votes + /cosmos/gov/v1/proposals/{proposalId}/votes/{voter}: + get: + summary: Vote (Query, v1) + operationId: gov_v1_Vote + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + vote: + description: vote defines the queried vote. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain duplicate + vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + additionalProperties: false + description: options is the weighted vote options. + nullable: true + metadata: + type: string + title: >- + metadata is any arbitrary metadata attached to the vote. + + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#vote-5 + nullable: true + additionalProperties: false + description: QueryVoteResponse is the response type for the Query/Vote RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: voter + description: voter defines the voter address for the proposals. + in: path + required: true + schema: + type: string + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1.Query/Vote` + ([reference](/sdk/latest/api-reference/grpc/gov#vote-query-v1)) + + + Vote queries voted information based on proposalID, voterAddr. + x-grpc-method: cosmos.gov.v1.Query/Vote + /cosmos/gov/v1beta1/params/{paramsType}: + get: + summary: Params (v1beta1) + operationId: gov_v1beta1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + voting_params: + description: voting_params defines the parameters related to voting. + type: object + properties: + voting_period: + type: string + description: Duration of the voting period. + nullable: true + nullable: true + additionalProperties: false + deposit_params: + description: deposit_params defines the parameters related to deposit. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: Minimum deposit for a proposal to enter voting period. + nullable: true + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + nullable: true + additionalProperties: false + tally_params: + description: tally_params defines the parameters related to tally. + type: object + properties: + quorum: + type: string + format: byte + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + nullable: true + threshold: + type: string + format: byte + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + nullable: true + veto_threshold: + type: string + format: byte + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + nullable: true + nullable: true + additionalProperties: false + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: paramsType + description: |- + params_type defines which parameters to query for, can be one of "voting", + "tallying" or "deposit". + in: path + required: true + schema: + type: string + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/Params` + ([reference](/sdk/latest/api-reference/grpc/gov#params-v1beta1)) + + + Params queries all parameters of the gov module. + x-grpc-method: cosmos.gov.v1beta1.Query/Params + /cosmos/gov/v1beta1/proposals: + get: + summary: Proposals (v1beta1) + operationId: gov_v1beta1_Proposals + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + content: + description: content is the proposal's content. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + nullable: true + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + nullable: true + additionalProperties: false + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + nullable: true + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + nullable: true + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: total_deposit is the total deposit on the proposal. + nullable: true + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + nullable: true + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + nullable: true + description: Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryProposalsResponse is the response type for the Query/Proposals RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalStatus + description: |- + proposal_status defines the status of the proposals. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + in: query + required: false + schema: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + - name: voter + description: voter defines the voter address for the proposals. + in: query + required: false + schema: + type: string + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: query + required: false + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/Proposals` + ([reference](/sdk/latest/api-reference/grpc/gov#proposals-v1beta1)) + + + Proposals queries all proposals based on given status. + x-grpc-method: cosmos.gov.v1beta1.Query/Proposals + /cosmos/gov/v1beta1/proposals/{proposalId}: + get: + summary: Proposal (v1beta1) + operationId: gov_v1beta1_Proposal + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + proposal: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + content: + description: content is the proposal's content. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + nullable: true + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + nullable: true + additionalProperties: false + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + nullable: true + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + nullable: true + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: total_deposit is the total deposit on the proposal. + nullable: true + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + nullable: true + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + nullable: true + description: Proposal defines the core field members of a governance proposal. + nullable: true + description: QueryProposalResponse is the response type for the Query/Proposal RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/Proposal` + ([reference](/sdk/latest/api-reference/grpc/gov#proposal-v1beta1)) + + + Proposal queries proposal details based on ProposalID. + x-grpc-method: cosmos.gov.v1beta1.Query/Proposal + /cosmos/gov/v1beta1/proposals/{proposalId}/deposits: + get: + summary: Deposits (v1beta1) + operationId: gov_v1beta1_Deposits + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + deposits: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: amount to be deposited by depositor. + nullable: true + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + additionalProperties: false + description: deposits defines the requested deposits. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryDepositsResponse is the response type for the Query/Deposits RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/Deposits` + ([reference](/sdk/latest/api-reference/grpc/gov#deposits-v1beta1)) + + + Deposits queries all deposits of a single proposal. + x-grpc-method: cosmos.gov.v1beta1.Query/Deposits + /cosmos/gov/v1beta1/proposals/{proposalId}/deposits/{depositor}: + get: + summary: Deposit (Query, v1beta1) + operationId: gov_v1beta1_Deposit + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + deposit: + description: deposit defines the requested deposit. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: amount to be deposited by depositor. + nullable: true + nullable: true + additionalProperties: false + description: QueryDepositResponse is the response type for the Query/Deposit RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: path + required: true + schema: + type: string + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/Deposit` + ([reference](/sdk/latest/api-reference/grpc/gov#deposit-query-v1beta1)) + + + Deposit queries single deposit information based on proposalID, depositor address. + x-grpc-method: cosmos.gov.v1beta1.Query/Deposit + /cosmos/gov/v1beta1/proposals/{proposalId}/tally: + get: + summary: TallyResult (v1beta1) + operationId: gov_v1beta1_TallyResult + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + nullable: true + additionalProperties: false + description: QueryTallyResultResponse is the response type for the Query/Tally RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/TallyResult` + ([reference](/sdk/latest/api-reference/grpc/gov#tallyresult-v1beta1)) + + + TallyResult queries the tally of a proposal vote. + x-grpc-method: cosmos.gov.v1beta1.Query/TallyResult + /cosmos/gov/v1beta1/proposals/{proposalId}/votes: + get: + summary: Votes (v1beta1) + operationId: gov_v1beta1_Votes + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + option: + description: >- + Deprecated: Prefer to use `options` instead. This field is set in + queries + + if and only if `len(options) == 1` and that option has weight 1. In all + + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain + duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + additionalProperties: false + description: options is the weighted vote options. + nullable: true + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + additionalProperties: false + description: votes defines the queried votes. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryVotesResponse is the response type for the Query/Votes RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/Votes` + ([reference](/sdk/latest/api-reference/grpc/gov#votes-v1beta1)) + + + Votes queries votes of a given proposal. + x-grpc-method: cosmos.gov.v1beta1.Query/Votes + /cosmos/gov/v1beta1/proposals/{proposalId}/votes/{voter}: + get: + summary: Vote (Query, v1beta1) + operationId: gov_v1beta1_Vote + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + vote: + description: vote defines the queried vote. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + option: + description: |- + Deprecated: Prefer to use `options` instead. This field is set in queries + if and only if `len(options) == 1` and that option has weight 1. In all + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain duplicate + vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + additionalProperties: false + description: options is the weighted vote options. + nullable: true + nullable: true + additionalProperties: false + description: QueryVoteResponse is the response type for the Query/Vote RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: voter + description: voter defines the voter address for the proposals. + in: path + required: true + schema: + type: string + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/Vote` + ([reference](/sdk/latest/api-reference/grpc/gov#vote-query-v1beta1)) + + + Vote queries voted information based on proposalID, voterAddr. + x-grpc-method: cosmos.gov.v1beta1.Query/Vote + /cosmos/mint/v1beta1/annual_provisions: + get: + summary: AnnualProvisions + operationId: mint_v1beta1_AnnualProvisions + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + annual_provisions: + type: string + format: byte + description: annual_provisions is the current minting annual provisions value. + nullable: true + description: |- + QueryAnnualProvisionsResponse is the response type for the + Query/AnnualProvisions RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - mint + description: >- + gRPC: `cosmos.mint.v1beta1.Query/AnnualProvisions` + ([reference](/sdk/latest/api-reference/grpc/mint#annualprovisions)) + + + AnnualProvisions current minting annual provisions value. + x-grpc-method: cosmos.mint.v1beta1.Query/AnnualProvisions + /cosmos/mint/v1beta1/inflation: + get: + summary: Inflation + operationId: mint_v1beta1_Inflation + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + inflation: + type: string + format: byte + description: inflation is the current minting inflation value. + nullable: true + description: |- + QueryInflationResponse is the response type for the Query/Inflation RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - mint + description: >- + gRPC: `cosmos.mint.v1beta1.Query/Inflation` + ([reference](/sdk/latest/api-reference/grpc/mint#inflation)) + + + Inflation returns the current minting inflation value. + x-grpc-method: cosmos.mint.v1beta1.Query/Inflation + /cosmos/mint/v1beta1/params: + get: + summary: Params + operationId: mint_v1beta1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + mint_denom: + type: string + title: type of coin to mint + inflation_rate_change: + type: string + title: maximum annual change in inflation rate + inflation_max: + type: string + title: maximum inflation rate + inflation_min: + type: string + title: minimum inflation rate + goal_bonded: + type: string + title: goal of percent bonded atoms + blocks_per_year: + type: string + format: uint64 + title: expected blocks per year + max_supply: + type: string + description: |- + maximum supply for the token. + + A value of "0" indicates an unlimited (infinite) maximum supply. + nullable: true + additionalProperties: false + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - mint + description: >- + gRPC: `cosmos.mint.v1beta1.Query/Params` + ([reference](/sdk/latest/api-reference/grpc/mint#params)) + + + Params returns the total set of minting parameters. + x-grpc-method: cosmos.mint.v1beta1.Query/Params + /cosmos/slashing/v1beta1/params: + get: + summary: Params + operationId: slashing_v1beta1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + params: + type: object + properties: + signed_blocks_window: + type: string + format: int64 + min_signed_per_window: + type: string + format: byte + nullable: true + downtime_jail_duration: + type: string + nullable: true + slash_fraction_double_sign: + type: string + format: byte + nullable: true + slash_fraction_downtime: + type: string + format: byte + nullable: true + description: Params represents the parameters used for by the slashing module. + nullable: true + additionalProperties: false + title: QueryParamsResponse is the response type for the Query/Params RPC method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - slashing + description: >- + gRPC: `cosmos.slashing.v1beta1.Query/Params` + ([reference](/sdk/latest/api-reference/grpc/slashing#params)) + + + Params queries the parameters of slashing module + x-grpc-method: cosmos.slashing.v1beta1.Query/Params + /cosmos/slashing/v1beta1/signing_infos: + get: + summary: SigningInfos + operationId: slashing_v1beta1_SigningInfos + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + info: + type: array + items: + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: Height at which validator was first a candidate OR was un-jailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented every time a validator is bonded in a block + and + + _may_ have signed a pre-commit or not. This in conjunction with the + + signed_blocks_window param determines the index in the missed block + bitmap. + jailed_until: + type: string + format: date-time + description: Timestamp until which the validator is jailed due to liveness downtime. + nullable: true + tombstoned: + type: boolean + description: >- + Whether or not a validator has been tombstoned (killed out of validator + + set). It is set once the validator commits an equivocation or for any + other + + configured misbehavior. + missed_blocks_counter: + type: string + format: int64 + description: |- + A counter of missed (unsigned) blocks. It is used to avoid unnecessary + reads in the missed block bitmap. + description: |- + ValidatorSigningInfo defines a validator's signing info for monitoring their + liveness activity. + additionalProperties: false + title: info is the signing info of all validators + nullable: true + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + nullable: true + additionalProperties: false + title: |- + QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC + method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - slashing + description: >- + gRPC: `cosmos.slashing.v1beta1.Query/SigningInfos` + ([reference](/sdk/latest/api-reference/grpc/slashing#signinginfos)) + + + SigningInfos queries signing info of all validators + x-grpc-method: cosmos.slashing.v1beta1.Query/SigningInfos + /cosmos/slashing/v1beta1/signing_infos/{consAddress}: + get: + summary: SigningInfo + operationId: slashing_v1beta1_SigningInfo + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + val_signing_info: + title: val_signing_info is the signing info of requested val cons address + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: Height at which validator was first a candidate OR was un-jailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented every time a validator is bonded in a block and + + _may_ have signed a pre-commit or not. This in conjunction with the + + signed_blocks_window param determines the index in the missed block + bitmap. + jailed_until: + type: string + format: date-time + description: Timestamp until which the validator is jailed due to liveness downtime. + nullable: true + tombstoned: + type: boolean + description: >- + Whether or not a validator has been tombstoned (killed out of validator + + set). It is set once the validator commits an equivocation or for any + other + + configured misbehavior. + missed_blocks_counter: + type: string + format: int64 + description: |- + A counter of missed (unsigned) blocks. It is used to avoid unnecessary + reads in the missed block bitmap. + description: |- + ValidatorSigningInfo defines a validator's signing info for monitoring their + liveness activity. + nullable: true + additionalProperties: false + title: |- + QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC + method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: consAddress + description: cons_address is the address to query signing info of + in: path + required: true + schema: + type: string + tags: + - slashing + description: >- + gRPC: `cosmos.slashing.v1beta1.Query/SigningInfo` + ([reference](/sdk/latest/api-reference/grpc/slashing#signinginfo)) + + + SigningInfo queries the signing info of given cons address + x-grpc-method: cosmos.slashing.v1beta1.Query/SigningInfo + /cosmos/staking/v1beta1/delegations/{delegatorAddr}: + get: + summary: DelegatorDelegations + description: >- + gRPC: `cosmos.staking.v1beta1.Query/DelegatorDelegations` + ([reference](/sdk/latest/api-reference/grpc/staking#delegatordelegations)) + + + DelegatorDelegations queries all delegations of a given delegator address. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: staking_v1beta1_DelegatorDelegations + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + delegation_responses: + type: array + items: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + nullable: true + additionalProperties: false + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + nullable: true + additionalProperties: false + description: |- + DelegationResponse is equivalent to Delegation except that it contains a + balance in addition to shares which is more suitable for client responses. + additionalProperties: false + description: delegation_responses defines all the delegations' info of a delegator. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryDelegatorDelegationsResponse is response type for the + Query/DelegatorDelegations RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: delegatorAddr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - staking + x-grpc-method: cosmos.staking.v1beta1.Query/DelegatorDelegations + /cosmos/staking/v1beta1/delegators/{delegatorAddr}/redelegations: + get: + summary: Redelegations + description: >- + gRPC: `cosmos.staking.v1beta1.Query/Redelegations` + ([reference](/sdk/latest/api-reference/grpc/staking#redelegations)) + + + Redelegations queries redelegations of given address. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: staking_v1beta1_Redelegations + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + redelegation_responses: + type: array + items: + type: object + properties: + redelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_src_address: + type: string + description: >- + validator_src_address is the validator redelegation source operator + address. + validator_dst_address: + type: string + description: >- + validator_dst_address is the validator redelegation destination + operator address. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the redelegation + took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + nullable: true + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when redelegation + started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares + created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped + by external modules + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + additionalProperties: false + description: |- + entries are the redelegation entries. + + redelegation entries + nullable: true + description: >- + Redelegation contains the list of a particular delegator's redelegating + bonds + + from a particular source validator to a particular destination + validator. + nullable: true + additionalProperties: false + entries: + type: array + items: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the redelegation + took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + nullable: true + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when redelegation + started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares + created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped + by external modules + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + nullable: true + additionalProperties: false + balance: + type: string + description: >- + RedelegationEntryResponse is equivalent to a RedelegationEntry except + that it + + contains a balance in addition to shares which is more suitable for + client + + responses. + additionalProperties: false + nullable: true + description: |- + RedelegationResponse is equivalent to a Redelegation except that its entries + contain a balance in addition to shares which is more suitable for client + responses. + additionalProperties: false + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryRedelegationsResponse is response type for the Query/Redelegations RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: delegatorAddr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + schema: + type: string + - name: srcValidatorAddr + description: src_validator_addr defines the validator address to redelegate from. + in: query + required: false + schema: + type: string + - name: dstValidatorAddr + description: dst_validator_addr defines the validator address to redelegate to. + in: query + required: false + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - staking + x-grpc-method: cosmos.staking.v1beta1.Query/Redelegations + /cosmos/staking/v1beta1/delegators/{delegatorAddr}/unbonding_delegations: + get: + summary: DelegatorUnbondingDelegations + description: >- + gRPC: `cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations` + ([reference](/sdk/latest/api-reference/grpc/staking#delegatorunbondingdelegations)) + + + DelegatorUnbondingDelegations queries all unbonding delegations of a given + + delegator address. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: staking_v1beta1_DelegatorUnbondingDelegations + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + nullable: true + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to receive + at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: >- + UnbondingDelegationEntry defines an unbonding object with relevant + metadata. + additionalProperties: false + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + nullable: true + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. + additionalProperties: false + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryUnbondingDelegatorDelegationsResponse is response type for the + Query/UnbondingDelegatorDelegations RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: delegatorAddr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - staking + x-grpc-method: cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations + /cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators: + get: + summary: DelegatorValidators + description: >- + gRPC: `cosmos.staking.v1beta1.Query/DelegatorValidators` + ([reference](/sdk/latest/api-reference/grpc/staking#delegatorvalidators)) + + + DelegatorValidators queries all validators info for given delegator + + address. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: staking_v1beta1_DelegatorValidators + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + validators: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech + encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, as a + Protobuf Any. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded status + or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + nullable: true + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + nullable: true + additionalProperties: false + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to + complete unbonding. + nullable: true + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for + creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can + ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + nullable: true + additionalProperties: false + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + nullable: true + nullable: true + additionalProperties: false + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by + external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifying an unbonding of this + validator + description: >- + Validator defines a validator, together with the total amount of the + + Validator's bond shares and their exchange rate to coins. Slashing results + in + + a decrease in the exchange rate, allowing correct calculation of future + + undelegations without iterating over delegators. When coins are delegated to + + this validator, the validator is credited with a delegation whose number of + + bond shares is based on the amount of coins delegated divided by the current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. + description: validators defines the validators' info of a delegator. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryDelegatorValidatorsResponse is response type for the + Query/DelegatorValidators RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: delegatorAddr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - staking + x-grpc-method: cosmos.staking.v1beta1.Query/DelegatorValidators + /cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators/{validatorAddr}: + get: + summary: DelegatorValidator + operationId: staking_v1beta1_DelegatorValidator + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + validator: + description: validator defines the validator info. + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech + encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, as a + Protobuf Any. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded status or + not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + nullable: true + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + nullable: true + additionalProperties: false + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator + has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to + complete unbonding. + nullable: true + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for + creating a validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can + ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + nullable: true + additionalProperties: false + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + nullable: true + nullable: true + additionalProperties: false + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by + external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifying an unbonding of this + validator + nullable: true + description: |- + QueryDelegatorValidatorResponse response type for the + Query/DelegatorValidator RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: delegatorAddr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + schema: + type: string + - name: validatorAddr + description: validator_addr defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - staking + description: >- + gRPC: `cosmos.staking.v1beta1.Query/DelegatorValidator` + ([reference](/sdk/latest/api-reference/grpc/staking#delegatorvalidator)) + + + DelegatorValidator queries validator info for given delegator validator + + pair. + x-grpc-method: cosmos.staking.v1beta1.Query/DelegatorValidator + /cosmos/staking/v1beta1/historical_info/{height}: + get: + summary: HistoricalInfo + operationId: staking_v1beta1_HistoricalInfo + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + hist: + description: hist defines the historical info at the given height. + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + title: prev block info + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + valset: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; + bech encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, as a + Protobuf Any. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + nullable: true + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + nullable: true + additionalProperties: false + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator + to complete unbonding. + nullable: true + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used + for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator + can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + nullable: true + additionalProperties: false + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + nullable: true + nullable: true + additionalProperties: false + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by + external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifying an unbonding of + this validator + description: >- + Validator defines a validator, together with the total amount of the + + Validator's bond shares and their exchange rate to coins. Slashing + results in + + a decrease in the exchange rate, allowing correct calculation of future + + undelegations without iterating over delegators. When coins are + delegated to + + this validator, the validator is credited with a delegation whose number + of + + bond shares is based on the amount of coins delegated divided by the + current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. + nullable: true + nullable: true + additionalProperties: false + description: |- + QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: height + description: height defines at which height to query the historical info. + in: path + required: true + schema: + type: string + format: int64 + tags: + - staking + description: >- + gRPC: `cosmos.staking.v1beta1.Query/HistoricalInfo` + ([reference](/sdk/latest/api-reference/grpc/staking#historicalinfo)) + + + HistoricalInfo queries the historical info for given height. + x-grpc-method: cosmos.staking.v1beta1.Query/HistoricalInfo + /cosmos/staking/v1beta1/params: + get: + summary: Params + operationId: staking_v1beta1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + unbonding_time: + type: string + description: unbonding_time is the time duration of unbonding. + nullable: true + max_validators: + type: integer + format: int64 + description: max_validators is the maximum number of validators. + max_entries: + type: integer + format: int64 + description: >- + max_entries is the max entries for either unbonding delegation or + redelegation (per pair/trio). + historical_entries: + type: integer + format: int64 + description: historical_entries is the number of historical entries to persist. + bond_denom: + type: string + description: bond_denom defines the bondable coin denomination. + min_commission_rate: + type: string + title: >- + min_commission_rate is the chain-wide minimum commission rate that a + validator can charge their delegators + key_rotation_fee: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + key_rotation_fee is the fee charged when rotating a validator's consensus + key. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + description: QueryParamsResponse is response type for the Query/Params RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - staking + description: >- + gRPC: `cosmos.staking.v1beta1.Query/Params` + ([reference](/sdk/latest/api-reference/grpc/staking#params)) + + + Parameters queries the staking parameters. + x-grpc-method: cosmos.staking.v1beta1.Query/Params + /cosmos/staking/v1beta1/pool: + get: + summary: Pool + operationId: staking_v1beta1_Pool + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + pool: + description: pool defines the pool info. + type: object + properties: + not_bonded_tokens: + type: string + bonded_tokens: + type: string + nullable: true + additionalProperties: false + description: QueryPoolResponse is response type for the Query/Pool RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - staking + description: >- + gRPC: `cosmos.staking.v1beta1.Query/Pool` + ([reference](/sdk/latest/api-reference/grpc/staking#pool)) + + + Pool queries the pool info. + x-grpc-method: cosmos.staking.v1beta1.Query/Pool + /cosmos/staking/v1beta1/validators: + get: + summary: Validators + description: >- + gRPC: `cosmos.staking.v1beta1.Query/Validators` + ([reference](/sdk/latest/api-reference/grpc/staking#validators)) + + + Validators queries all validators that match the given status. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: staking_v1beta1_Validators + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + validators: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech + encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, as a + Protobuf Any. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded status + or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + nullable: true + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + nullable: true + additionalProperties: false + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to + complete unbonding. + nullable: true + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for + creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can + ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + nullable: true + additionalProperties: false + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + nullable: true + nullable: true + additionalProperties: false + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by + external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifying an unbonding of this + validator + description: >- + Validator defines a validator, together with the total amount of the + + Validator's bond shares and their exchange rate to coins. Slashing results + in + + a decrease in the exchange rate, allowing correct calculation of future + + undelegations without iterating over delegators. When coins are delegated to + + this validator, the validator is credited with a delegation whose number of + + bond shares is based on the amount of coins delegated divided by the current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. + description: validators contains all the queried validators. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + title: QueryValidatorsResponse is response type for the Query/Validators RPC method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: status + description: status enables to query for validators matching a given status. + in: query + required: false + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - staking + x-grpc-method: cosmos.staking.v1beta1.Query/Validators + /cosmos/staking/v1beta1/validators/{validatorAddr}: + get: + summary: Validator + operationId: staking_v1beta1_Validator + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + validator: + description: validator defines the validator info. + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech + encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, as a + Protobuf Any. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded status or + not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + nullable: true + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + nullable: true + additionalProperties: false + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator + has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to + complete unbonding. + nullable: true + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for + creating a validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can + ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + nullable: true + additionalProperties: false + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + nullable: true + nullable: true + additionalProperties: false + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by + external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifying an unbonding of this + validator + nullable: true + title: QueryValidatorResponse is response type for the Query/Validator RPC method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: validatorAddr + description: validator_addr defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - staking + description: >- + gRPC: `cosmos.staking.v1beta1.Query/Validator` + ([reference](/sdk/latest/api-reference/grpc/staking#validator)) + + + Validator queries validator info for given validator address. + x-grpc-method: cosmos.staking.v1beta1.Query/Validator + /cosmos/staking/v1beta1/validators/{validatorAddr}/delegations: + get: + summary: ValidatorDelegations + description: >- + gRPC: `cosmos.staking.v1beta1.Query/ValidatorDelegations` + ([reference](/sdk/latest/api-reference/grpc/staking#validatordelegations)) + + + ValidatorDelegations queries delegate info for given validator. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: staking_v1beta1_ValidatorDelegations + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + delegation_responses: + type: array + items: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + nullable: true + additionalProperties: false + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + nullable: true + additionalProperties: false + description: |- + DelegationResponse is equivalent to Delegation except that it contains a + balance in addition to shares which is more suitable for client responses. + additionalProperties: false + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + title: |- + QueryValidatorDelegationsResponse is response type for the + Query/ValidatorDelegations RPC method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: validatorAddr + description: validator_addr defines the validator address to query for. + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - staking + x-grpc-method: cosmos.staking.v1beta1.Query/ValidatorDelegations + /cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr}: + get: + summary: Delegation + operationId: staking_v1beta1_Delegation + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + delegation_response: + description: delegation_responses defines the delegation info of a delegation. + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + nullable: true + additionalProperties: false + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + description: QueryDelegationResponse is response type for the Query/Delegation RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: validatorAddr + description: validator_addr defines the validator address to query for. + in: path + required: true + schema: + type: string + - name: delegatorAddr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + schema: + type: string + tags: + - staking + description: >- + gRPC: `cosmos.staking.v1beta1.Query/Delegation` + ([reference](/sdk/latest/api-reference/grpc/staking#delegation)) + + + Delegation queries delegate info for given validator delegator pair. + x-grpc-method: cosmos.staking.v1beta1.Query/Delegation + /cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr}/unbonding_delegation: + get: + summary: UnbondingDelegation + operationId: staking_v1beta1_UnbondingDelegation + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + unbond: + description: unbond defines the unbonding information of a delegation. + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + nullable: true + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to receive at + completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: >- + UnbondingDelegationEntry defines an unbonding object with relevant + metadata. + additionalProperties: false + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + nullable: true + nullable: true + additionalProperties: false + description: |- + QueryDelegationResponse is response type for the Query/UnbondingDelegation + RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: validatorAddr + description: validator_addr defines the validator address to query for. + in: path + required: true + schema: + type: string + - name: delegatorAddr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + schema: + type: string + tags: + - staking + description: >- + gRPC: `cosmos.staking.v1beta1.Query/UnbondingDelegation` + ([reference](/sdk/latest/api-reference/grpc/staking#unbondingdelegation)) + + + UnbondingDelegation queries unbonding info for given validator delegator + + pair. + x-grpc-method: cosmos.staking.v1beta1.Query/UnbondingDelegation + /cosmos/staking/v1beta1/validators/{validatorAddr}/unbonding_delegations: + get: + summary: ValidatorUnbondingDelegations + description: >- + gRPC: `cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations` + ([reference](/sdk/latest/api-reference/grpc/staking#validatorunbondingdelegations)) + + + ValidatorUnbondingDelegations queries unbonding delegations of a validator. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: staking_v1beta1_ValidatorUnbondingDelegations + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + nullable: true + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to receive + at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: >- + UnbondingDelegationEntry defines an unbonding object with relevant + metadata. + additionalProperties: false + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + nullable: true + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. + additionalProperties: false + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryValidatorUnbondingDelegationsResponse is response type for the + Query/ValidatorUnbondingDelegations RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: validatorAddr + description: validator_addr defines the validator address to query for. + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - staking + x-grpc-method: cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations + /cosmos/tx/v1beta1/decode: + post: + summary: TxDecode + operationId: tx_v1beta1_TxDecode + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + $ref: '#/components/schemas/cosmos.tx.v1beta1.TxDecodeResponse' + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + requestBody: + content: + application/json: + schema: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + description: |- + TxDecodeRequest is the request type for the Service.TxDecode + RPC method. + description: |- + TxDecodeRequest is the request type for the Service.TxDecode + RPC method. + required: true + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/TxDecode` + ([reference](/sdk/latest/api-reference/grpc/tx#txdecode)) + + + TxDecode decodes the transaction. + x-grpc-method: cosmos.tx.v1beta1.Service/TxDecode + /cosmos/tx/v1beta1/decode/amino: + post: + summary: TxDecodeAmino + operationId: tx_v1beta1_TxDecodeAmino + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + amino_json: + type: string + description: |- + TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino + RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + requestBody: + content: + application/json: + schema: + type: object + properties: + amino_binary: + type: string + format: byte + description: |- + TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino + RPC method. + description: |- + TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino + RPC method. + required: true + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/TxDecodeAmino` + ([reference](/sdk/latest/api-reference/grpc/tx#txdecodeamino)) + + + TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. + x-grpc-method: cosmos.tx.v1beta1.Service/TxDecodeAmino + /cosmos/tx/v1beta1/encode: + post: + summary: TxEncode + operationId: tx_v1beta1_TxEncode + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the encoded transaction bytes. + nullable: true + description: |- + TxEncodeResponse is the response type for the + Service.TxEncode method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cosmos.tx.v1beta1.TxEncodeRequest' + description: |- + TxEncodeRequest is the request type for the Service.TxEncode + RPC method. + required: true + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/TxEncode` + ([reference](/sdk/latest/api-reference/grpc/tx#txencode)) + + + TxEncode encodes the transaction. + x-grpc-method: cosmos.tx.v1beta1.Service/TxEncode + /cosmos/tx/v1beta1/encode/amino: + post: + summary: TxEncodeAmino + operationId: tx_v1beta1_TxEncodeAmino + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + amino_binary: + type: string + format: byte + nullable: true + description: |- + TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino + RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + requestBody: + content: + application/json: + schema: + type: object + properties: + amino_json: + type: string + description: |- + TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino + RPC method. + description: |- + TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino + RPC method. + required: true + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/TxEncodeAmino` + ([reference](/sdk/latest/api-reference/grpc/tx#txencodeamino)) + + + TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. + x-grpc-method: cosmos.tx.v1beta1.Service/TxEncodeAmino + /cosmos/tx/v1beta1/simulate: + post: + summary: Simulate + operationId: tx_v1beta1_Simulate + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + gas_info: + description: gas_info is the information about gas used in the simulation. + type: object + properties: + gas_wanted: + type: string + format: uint64 + description: GasWanted is the maximum units of work we allow this tx to perform. + gas_used: + type: string + format: uint64 + description: GasUsed is the amount of gas actually consumed. + nullable: true + additionalProperties: false + result: + description: result is the result of the simulation. + type: object + properties: + data: + type: string + format: byte + description: >- + Data is any data returned from message or handler execution. It MUST be + + length prefixed in order to separate data from multiple message + executions. + + Deprecated. This field is still populated, but prefer msg_response instead + + because it also contains the Msg response typeURL. + nullable: true + log: + type: string + description: Log contains the log information from message or handler execution. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: >- + EventAttribute is a single key-value pair, associated with an + event. + additionalProperties: false + nullable: true + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + additionalProperties: false + description: |- + Events contains a slice of Event objects that were emitted during message + or handler execution. + nullable: true + msg_responses: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: msg_responses contains the Msg handler responses type packed in Anys. + nullable: true + nullable: true + description: |- + SimulateResponse is the response type for the + Service.SimulateRPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cosmos.tx.v1beta1.SimulateRequest' + description: |- + SimulateRequest is the request type for the Service.Simulate + RPC method. + required: true + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/Simulate` + ([reference](/sdk/latest/api-reference/grpc/tx#simulate)) + + + Simulate simulates executing a transaction for estimating gas usage. + x-grpc-method: cosmos.tx.v1beta1.Service/Simulate + /cosmos/tx/v1beta1/txs: + get: + summary: GetTxsEvent + operationId: tx_v1beta1_GetTxsEvent + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + $ref: '#/components/schemas/cosmos.tx.v1beta1.GetTxsEventResponse' + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: events + description: |- + events is the list of transaction event type. + Deprecated post v0.47.x: use query instead, which should contain a valid + events query. + in: query + required: false + explode: true + schema: + type: array + items: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + - name: orderBy + description: |2- + - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults + to ASC in this case. + - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order + - ORDER_BY_DESC: ORDER_BY_DESC defines descending order + in: query + required: false + schema: + type: string + enum: + - ORDER_BY_UNSPECIFIED + - ORDER_BY_ASC + - ORDER_BY_DESC + default: ORDER_BY_UNSPECIFIED + - name: page + description: |- + page is the page number to query, starts at 1. If not provided, will + default to first page. + in: query + required: false + schema: + type: string + format: uint64 + - name: limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: query + description: |- + query defines the transaction event query that is proxied to Tendermint's + TxSearch RPC method. The query must be valid. + in: query + required: false + schema: + type: string + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/GetTxsEvent` + ([reference](/sdk/latest/api-reference/grpc/tx#gettxsevent)) + + + GetTxsEvent fetches txs by event. + x-grpc-method: cosmos.tx.v1beta1.Service/GetTxsEvent + post: + summary: BroadcastTx + operationId: tx_v1beta1_BroadcastTx + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + tx_response: + description: tx_response is the queried TxResponses. + type: object + properties: + height: + type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: Result bytes, if any. + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: >- + Attribute defines an attribute wrapper where the key and + value are + + strings instead of raw bytes. + additionalProperties: false + nullable: true + description: >- + StringEvent defines en Event object wrapper where all the + attributes + + contain key/value pairs that are strings instead of raw bytes. + additionalProperties: false + description: >- + Events contains a slice of Event objects that were emitted during + some + + execution. + nullable: true + description: >- + ABCIMessageLog defines a structure containing an indexed tx ABCI message + log. + additionalProperties: false + description: The output of the application's logger (typed). May be non-deterministic. + nullable: true + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + description: The request transaction bytes. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + timestamp: + type: string + description: >- + Time of the previous block. For heights > 1, it's the weighted median of + + the timestamps of the valid votes in the block.LastCommit. For height == + 1, + + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: >- + EventAttribute is a single key-value pair, associated with an + event. + additionalProperties: false + nullable: true + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + additionalProperties: false + description: >- + Events defines all the events emitted by processing a transaction. Note, + + these events include those emitted by processing all the messages and + those + + emitted from the ante. Whereas Logs contains the events, with + + additional metadata, emitted only by processing the messages. + nullable: true + nullable: true + description: |- + BroadcastTxResponse is the response type for the + Service.BroadcastTx method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + requestBody: + content: + application/json: + schema: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + mode: + type: string + enum: + - BROADCAST_MODE_UNSPECIFIED + - BROADCAST_MODE_BLOCK + - BROADCAST_MODE_SYNC + - BROADCAST_MODE_ASYNC + default: BROADCAST_MODE_UNSPECIFIED + description: |- + BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC + method. + + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, + BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. + - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits + for a CheckTx execution response only. + - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client + returns immediately. + description: |- + BroadcastTxRequest is the request type for the Service.BroadcastTxRequest + RPC method. + description: |- + BroadcastTxRequest is the request type for the Service.BroadcastTxRequest + RPC method. + required: true + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/BroadcastTx` + ([reference](/sdk/latest/api-reference/grpc/tx#broadcasttx)) + + + BroadcastTx broadcast transaction. + x-grpc-method: cosmos.tx.v1beta1.Service/BroadcastTx + /cosmos/tx/v1beta1/txs/block/{height}: + get: + summary: GetBlockWithTxs + operationId: tx_v1beta1_GetBlockWithTxs + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + $ref: '#/components/schemas/cosmos.tx.v1beta1.GetBlockWithTxsResponse' + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: height + description: height is the height of the block to query. + in: path + required: true + schema: + type: string + format: int64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/GetBlockWithTxs` + ([reference](/sdk/latest/api-reference/grpc/tx#getblockwithtxs)) + + + GetBlockWithTxs fetches a block with decoded txs. + x-grpc-method: cosmos.tx.v1beta1.Service/GetBlockWithTxs + /cosmos/tx/v1beta1/txs/{hash}: + get: + summary: GetTx + operationId: tx_v1beta1_GetTx + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + $ref: '#/components/schemas/cosmos.tx.v1beta1.GetTxResponse' + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: hash + description: hash is the tx hash to query, encoded as a hex string. + in: path + required: true + schema: + type: string + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/GetTx` + ([reference](/sdk/latest/api-reference/grpc/tx#gettx)) + + + GetTx fetches a tx by hash. + x-grpc-method: cosmos.tx.v1beta1.Service/GetTx + /cosmos/upgrade/v1beta1/applied_plan/{name}: + get: + summary: AppliedPlan + operationId: upgrade_v1beta1_AppliedPlan + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + height: + type: string + format: int64 + description: height is the block height at which the plan was applied. + description: |- + QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: name + description: name is the name of the applied plan to query for. + in: path + required: true + schema: + type: string + tags: + - upgrade + description: >- + gRPC: `cosmos.upgrade.v1beta1.Query/AppliedPlan` + ([reference](/sdk/latest/api-reference/grpc/upgrade#appliedplan)) + + + AppliedPlan queries a previously applied upgrade plan by its name. + x-grpc-method: cosmos.upgrade.v1beta1.Query/AppliedPlan + /cosmos/upgrade/v1beta1/authority: + get: + summary: Authority + operationId: upgrade_v1beta1_Authority + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + address: + type: string + title: QueryAuthorityResponse is the response type for Query/Authority + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - upgrade + description: >- + gRPC: `cosmos.upgrade.v1beta1.Query/Authority` + ([reference](/sdk/latest/api-reference/grpc/upgrade#authority)) + + + Returns the account with authority to conduct upgrades + x-grpc-method: cosmos.upgrade.v1beta1.Query/Authority + /cosmos/upgrade/v1beta1/current_plan: + get: + summary: CurrentPlan + operationId: upgrade_v1beta1_CurrentPlan + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + plan: + description: plan is the current upgrade plan. + type: object + properties: + name: + type: string + description: >- + Sets the name for the upgrade. This name will be used by the upgraded + + version of the software to apply any special "on-upgrade" commands during + + the first BeginBlock method after the upgrade is applied. It is also used + + to detect whether a software version can handle a given upgrade. If no + + upgrade handler with this name has been set in the software, it will be + + assumed that the software is out-of-date when the upgrade Time or Height + is + + reached and the software will exit. + time: + type: string + format: date-time + description: >- + Deprecated: Time based upgrades have been deprecated. Time based upgrade + logic + + has been removed from the SDK. + + If this field is not empty, an error will be thrown. + nullable: true + height: + type: string + format: int64 + description: The height at which the upgrade must be performed. + info: + type: string + title: |- + Any application specific upgrade info to be included on-chain + such as a git commit that validators could automatically upgrade to + upgraded_client_state: + description: >- + Deprecated: UpgradedClientState field has been deprecated. IBC upgrade + logic has been + + moved to the IBC module in the sub module 02-client. + + If this field is not empty, an error will be thrown. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + nullable: true + description: |- + QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - upgrade + description: >- + gRPC: `cosmos.upgrade.v1beta1.Query/CurrentPlan` + ([reference](/sdk/latest/api-reference/grpc/upgrade#currentplan)) + + + CurrentPlan queries the current upgrade plan. + x-grpc-method: cosmos.upgrade.v1beta1.Query/CurrentPlan + /cosmos/upgrade/v1beta1/module_versions: + get: + summary: ModuleVersions + operationId: upgrade_v1beta1_ModuleVersions + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + module_versions: + type: array + items: + type: object + properties: + name: + type: string + title: name of the app module + version: + type: string + format: uint64 + title: consensus version of the app module + description: ModuleVersion specifies a module and its consensus version. + additionalProperties: false + description: module_versions is a list of module names with their consensus versions. + nullable: true + description: |- + QueryModuleVersionsResponse is the response type for the Query/ModuleVersions + RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: moduleName + description: |- + module_name is a field to query a specific module + consensus version from state. Leaving this empty will + fetch the full list of module versions from state + in: query + required: false + schema: + type: string + tags: + - upgrade + description: >- + gRPC: `cosmos.upgrade.v1beta1.Query/ModuleVersions` + ([reference](/sdk/latest/api-reference/grpc/upgrade#moduleversions)) + + + ModuleVersions queries the list of module versions from state. + x-grpc-method: cosmos.upgrade.v1beta1.Query/ModuleVersions + /cosmos/upgrade/v1beta1/upgraded_consensus_state/{lastHeight}: + get: + summary: UpgradedConsensusState + operationId: upgrade_v1beta1_UpgradedConsensusState + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + upgraded_consensus_state: + type: string + format: byte + nullable: true + description: >- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState + + RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: lastHeight + description: |- + last height of the current chain must be sent in request + as this is the height under which next consensus state is stored + in: path + required: true + schema: + type: string + format: int64 + tags: + - upgrade + description: >- + gRPC: `cosmos.upgrade.v1beta1.Query/UpgradedConsensusState` + ([reference](/sdk/latest/api-reference/grpc/upgrade#upgradedconsensusstate)) + + + UpgradedConsensusState queries the consensus state that will serve + + as a trusted kernel for the next version of this chain. It will only be + + stored at the last height of this chain. + + UpgradedConsensusState RPC not supported with legacy querier + + This rpc is deprecated now that IBC has its own replacement + + (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) + x-grpc-method: cosmos.upgrade.v1beta1.Query/UpgradedConsensusState +components: + schemas: + google.protobuf.Any: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + google.rpc.Status: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + additionalProperties: false + cosmos.auth.v1beta1.AddressBytesToStringResponse: + type: object + properties: + address_string: + type: string + description: AddressBytesToStringResponse is the response type for AddressString rpc method. + additionalProperties: false + cosmos.auth.v1beta1.AddressStringToBytesResponse: + type: object + properties: + address_bytes: + type: string + format: byte + nullable: true + description: AddressStringToBytesResponse is the response type for AddressBytes rpc method. + additionalProperties: false + cosmos.auth.v1beta1.BaseAccount: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + account_number: + type: string + format: uint64 + sequence: + type: string + format: uint64 + description: |- + BaseAccount defines a base account type. It contains all the necessary fields + for basic account functionality. Any custom account type should extend this + type for additional functionality (e.g. vesting). + cosmos.auth.v1beta1.Bech32PrefixResponse: + type: object + properties: + bech32_prefix: + type: string + description: Bech32PrefixResponse is the response type for Bech32Prefix rpc method. + additionalProperties: false + cosmos.auth.v1beta1.Params: + type: object + properties: + max_memo_characters: + type: string + format: uint64 + tx_sig_limit: + type: string + format: uint64 + tx_size_cost_per_byte: + type: string + format: uint64 + sig_verify_cost_ed25519: + type: string + format: uint64 + sig_verify_cost_secp256k1: + type: string + format: uint64 + description: Params defines the parameters for the auth module. + additionalProperties: false + cosmos.auth.v1beta1.QueryAccountAddressByIDResponse: + type: object + properties: + account_address: + type: string + title: QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method + additionalProperties: false + cosmos.auth.v1beta1.QueryAccountInfoResponse: + type: object + properties: + info: + description: info is the account info which is represented by BaseAccount. + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + account_number: + type: string + format: uint64 + sequence: + type: string + format: uint64 + nullable: true + description: QueryAccountInfoResponse is the Query/AccountInfo response type. + cosmos.auth.v1beta1.QueryAccountResponse: + type: object + properties: + account: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + description: QueryAccountResponse is the response type for the Query/Account RPC method. + cosmos.auth.v1beta1.QueryAccountsResponse: + type: object + properties: + accounts: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: accounts are the existing accounts + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryAccountsResponse is the response type for the Query/Accounts RPC method. + cosmos.auth.v1beta1.QueryModuleAccountByNameResponse: + type: object + properties: + account: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + description: >- + QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC + method. + cosmos.auth.v1beta1.QueryModuleAccountsResponse: + type: object + properties: + accounts: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + description: QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. + cosmos.auth.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_memo_characters: + type: string + format: uint64 + tx_sig_limit: + type: string + format: uint64 + tx_size_cost_per_byte: + type: string + format: uint64 + sig_verify_cost_ed25519: + type: string + format: uint64 + sig_verify_cost_secp256k1: + type: string + format: uint64 + nullable: true + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + cosmos.base.query.v1beta1.PageRequest: + type: object + properties: + key: + type: string + format: byte + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + nullable: true + offset: + type: string + format: uint64 + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + limit: + type: string + format: uint64 + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + count_total: + type: boolean + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + reverse: + type: boolean + description: reverse is set to true if results are to be returned in the descending order. + description: |- + message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } + title: |- + PageRequest is to be embedded in gRPC request messages for efficient + pagination. Ex: + additionalProperties: false + cosmos.base.query.v1beta1.PageResponse: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + additionalProperties: false + cosmos.authz.v1beta1.Grant: + type: object + properties: + authorization: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + expiration: + type: string + format: date-time + title: |- + time when the grant will expire and will be pruned. If null, then the grant + doesn't have a time expiration (other conditions in `authorization` + may apply to invalidate the grant) + nullable: true + description: |- + Grant gives permissions to execute + the provide method with expiration time. + cosmos.authz.v1beta1.GrantAuthorization: + type: object + properties: + granter: + type: string + grantee: + type: string + authorization: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + expiration: + type: string + format: date-time + nullable: true + title: |- + GrantAuthorization extends a grant with both the addresses of the grantee and granter. + It is used in genesis.proto and query.proto + cosmos.authz.v1beta1.QueryGranteeGrantsResponse: + type: object + properties: + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + authorization: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time + title: |- + GrantAuthorization extends a grant with both the addresses of the grantee and granter. + It is used in genesis.proto and query.proto + description: grants is a list of grants granted to the grantee. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. + cosmos.authz.v1beta1.QueryGranterGrantsResponse: + type: object + properties: + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + authorization: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time + title: |- + GrantAuthorization extends a grant with both the addresses of the grantee and granter. + It is used in genesis.proto and query.proto + description: grants is a list of grants granted by the granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. + cosmos.authz.v1beta1.QueryGrantsResponse: + type: object + properties: + grants: + type: array + items: + type: object + properties: + authorization: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time + title: |- + time when the grant will expire and will be pruned. If null, then the grant + doesn't have a time expiration (other conditions in `authorization` + may apply to invalidate the grant) + description: |- + Grant gives permissions to execute + the provide method with expiration time. + description: authorizations is a list of grants granted for grantee by granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryGrantsResponse is the response type for the Query/Authorizations RPC method. + cosmos.bank.v1beta1.DenomOwner: + type: object + properties: + address: + type: string + description: address defines the address that owns a particular denomination. + balance: + description: balance is the balance of the denominated coin for an account. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + description: |- + DenomOwner defines structure representing an account that owns or holds a + particular denominated token. It contains the account address and account + balance of the denominated token. + additionalProperties: false + cosmos.bank.v1beta1.DenomUnit: + type: object + properties: + denom: + type: string + description: denom represents the string name of the given denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: |- + exponent represents power of 10 exponent that one must + raise the base_denom to in order to equal the given DenomUnit's denom + 1 denom = 10^exponent base_denom + (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + additionalProperties: false + cosmos.bank.v1beta1.Metadata: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: denom represents the string name of the given denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: |- + exponent represents power of 10 exponent that one must + raise the base_denom to in order to equal the given DenomUnit's denom + 1 denom = 10^exponent base_denom + (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + nullable: true + base: + type: string + description: base represents the base denom (should be the DenomUnit with exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: |- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + be the same as the display. + uri: + type: string + description: URI to a document (on or off-chain) that contains additional information. Optional. + uri_hash: + type: string + description: |- + URIHash is a sha256 hash of a document pointed by URI. It's used to verify that + the document didn't change. Optional. + description: |- + Metadata represents a struct that describes + a basic token. + additionalProperties: false + cosmos.bank.v1beta1.Params: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + description: |- + Deprecated: Use of SendEnabled in params is deprecated. + For genesis, use the newly added send_enabled field in the genesis object. + Storage, lookup, and manipulation of this information is now in the keeper. + + As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files. + nullable: true + default_send_enabled: + type: boolean + description: Params defines the parameters for the bank module. + additionalProperties: false + cosmos.bank.v1beta1.QueryAllBalancesResponse: + type: object + properties: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: balances is the balances of all the coins. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryAllBalancesResponse is the response type for the Query/AllBalances RPC + method. + additionalProperties: false + cosmos.bank.v1beta1.QueryBalanceResponse: + type: object + properties: + balance: + description: balance is the balance of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + description: QueryBalanceResponse is the response type for the Query/Balance RPC method. + additionalProperties: false + cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse: + type: object + properties: + metadata: + description: metadata describes and provides all the client information for the requested token. + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: denom represents the string name of the given denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: |- + exponent represents power of 10 exponent that one must + raise the base_denom to in order to equal the given DenomUnit's denom + 1 denom = 10^exponent base_denom + (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: base represents the base denom (should be the DenomUnit with exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: |- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + be the same as the display. + uri: + type: string + description: URI to a document (on or off-chain) that contains additional information. Optional. + uri_hash: + type: string + description: |- + URIHash is a sha256 hash of a document pointed by URI. It's used to verify that + the document didn't change. Optional. + nullable: true + description: >- + QueryDenomMetadataByQueryStringResponse is the response type for the Query/DenomMetadata RPC + + method. Identical with QueryDenomMetadataResponse but receives denom as query string in + request. + additionalProperties: false + cosmos.bank.v1beta1.QueryDenomMetadataResponse: + type: object + properties: + metadata: + description: metadata describes and provides all the client information for the requested token. + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: denom represents the string name of the given denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: |- + exponent represents power of 10 exponent that one must + raise the base_denom to in order to equal the given DenomUnit's denom + 1 denom = 10^exponent base_denom + (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: base represents the base denom (should be the DenomUnit with exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: |- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + be the same as the display. + uri: + type: string + description: URI to a document (on or off-chain) that contains additional information. Optional. + uri_hash: + type: string + description: |- + URIHash is a sha256 hash of a document pointed by URI. It's used to verify that + the document didn't change. Optional. + nullable: true + description: |- + QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC + method. + additionalProperties: false + cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse: + type: object + properties: + denom_owners: + type: array + items: + type: object + properties: + address: + type: string + description: address defines the address that owns a particular denomination. + balance: + description: balance is the balance of the denominated coin for an account. + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DenomOwner defines structure representing an account that owns or holds a + particular denominated token. It contains the account address and account + balance of the denominated token. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryDenomOwnersByQueryResponse defines the RPC response of a DenomOwnersByQuery RPC query. + additionalProperties: false + cosmos.bank.v1beta1.QueryDenomOwnersResponse: + type: object + properties: + denom_owners: + type: array + items: + type: object + properties: + address: + type: string + description: address defines the address that owns a particular denomination. + balance: + description: balance is the balance of the denominated coin for an account. + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DenomOwner defines structure representing an account that owns or holds a + particular denominated token. It contains the account address and account + balance of the denominated token. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. + additionalProperties: false + cosmos.bank.v1beta1.QueryDenomsMetadataResponse: + type: object + properties: + metadatas: + type: array + items: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: denom represents the string name of the given denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: |- + exponent represents power of 10 exponent that one must + raise the base_denom to in order to equal the given DenomUnit's denom + 1 denom = 10^exponent base_denom + (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: base represents the base denom (should be the DenomUnit with exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: |- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + be the same as the display. + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional information. + Optional. + uri_hash: + type: string + description: |- + URIHash is a sha256 hash of a document pointed by URI. It's used to verify that + the document didn't change. Optional. + description: |- + Metadata represents a struct that describes + a basic token. + description: metadata provides the client information for all the registered tokens. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC + method. + additionalProperties: false + cosmos.bank.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params provides the parameters of the bank module. + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + description: >- + Deprecated: Use of SendEnabled in params is deprecated. + + For genesis, use the newly added send_enabled field in the genesis object. + + Storage, lookup, and manipulation of this information is now in the keeper. + + + As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis + files. + default_send_enabled: + type: boolean + nullable: true + description: QueryParamsResponse defines the response type for querying x/bank parameters. + additionalProperties: false + cosmos.bank.v1beta1.QuerySendEnabledResponse: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + nullable: true + pagination: + description: |- + pagination defines the pagination in the response. This field is only + populated if the denoms field in the request is empty. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QuerySendEnabledResponse defines the RPC response of a SendEnable query. + additionalProperties: false + cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse: + type: object + properties: + balance: + description: balance is the balance of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + description: |- + QuerySpendableBalanceByDenomResponse defines the gRPC response structure for + querying an account's spendable balance for a specific denom. + additionalProperties: false + cosmos.bank.v1beta1.QuerySpendableBalancesResponse: + type: object + properties: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: balances is the spendable balances of all the coins. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QuerySpendableBalancesResponse defines the gRPC response structure for querying + an account's spendable balances. + additionalProperties: false + cosmos.bank.v1beta1.QuerySupplyOfResponse: + type: object + properties: + amount: + description: amount is the supply of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + description: QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. + additionalProperties: false + cosmos.bank.v1beta1.QueryTotalSupplyResponse: + type: object + properties: + supply: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: supply is the supply of the coins + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + title: |- + QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC + method + additionalProperties: false + cosmos.bank.v1beta1.SendEnabled: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + additionalProperties: false + cosmos.base.v1beta1.Coin: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + cosmos.base.node.v1beta1.ConfigResponse: + type: object + properties: + minimum_gas_price: + type: string + pruning_keep_recent: + type: string + pruning_interval: + type: string + halt_height: + type: string + format: uint64 + description: ConfigResponse defines the response structure for the Config gRPC query. + additionalProperties: false + cosmos.base.node.v1beta1.StatusResponse: + type: object + properties: + earliest_store_height: + type: string + format: uint64 + title: earliest block height available in the store + height: + type: string + format: uint64 + title: current block height + timestamp: + type: string + format: date-time + title: block height timestamp + nullable: true + app_hash: + type: string + format: byte + title: app hash of the current block + nullable: true + validator_hash: + type: string + format: byte + title: validator hash provided by the consensus header + nullable: true + description: StateResponse defines the response structure for the status of a node. + additionalProperties: false + cosmos.base.tendermint.v1beta1.ABCIQueryResponse: + type: object + properties: + code: + type: integer + format: int64 + log: + type: string + title: nondeterministic + info: + type: string + title: nondeterministic + index: + type: string + format: int64 + key: + type: string + format: byte + nullable: true + value: + type: string + format: byte + nullable: true + proof_ops: + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + description: |- + ProofOp defines an operation used for calculating Merkle root. The data could + be arbitrary format, providing necessary data for example neighbouring node + hash. + + Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. + description: |- + ProofOps is Merkle proof defined by the list of ProofOps. + + Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. + nullable: true + height: + type: string + format: int64 + codespace: + type: string + description: |- + ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query. + + Note: This type is a duplicate of the ResponseQuery proto type defined in + Tendermint. + additionalProperties: false + cosmos.base.tendermint.v1beta1.Block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + description: >- + proposer_address is the original block proposer address, formatted as a Bech32 + string. + + In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 + string + + for better UX. + + + original proposer of the block + description: Header defines the structure of a Tendermint block header. + nullable: true + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + nullable: true + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus for + the + + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus for + the + + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two conflicting + votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set + of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators attempting + to mislead a light client. + nullable: true + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + nullable: true + description: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. + additionalProperties: false + cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + nullable: true + block: + title: 'Deprecated: please use `sdk_block` instead' + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a + block in the blockchain, + + including all blockchain data structures and the rules of + the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the previous + block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error + condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the signature is + for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a + set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + nullable: true + sdk_block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + description: >- + proposer_address is the original block proposer address, formatted as a Bech32 + string. + + In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 + string + + for better UX. + + + original proposer of the block + description: Header defines the structure of a Tendermint block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a + block in the blockchain, + + including all blockchain data structures and the rules of + the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the previous + block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error + condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the signature is + for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a + set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + description: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. + nullable: true + description: GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. + additionalProperties: false + cosmos.base.tendermint.v1beta1.GetBlockResultsResponse: + type: object + properties: + height: + type: string + format: int64 + description: height is the block height. + txs_results: + type: array + items: + type: object + properties: + code: + type: integer + format: int64 + data: + type: string + format: byte + log: + type: string + title: nondeterministic + info: + type: string + title: nondeterministic + gas_wanted: + type: string + format: int64 + gas_used: + type: string + format: int64 + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + title: nondeterministic + codespace: + type: string + description: |- + ExecTxResult contains results of executing one individual transaction. + + * Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted + description: txs_results contains the results of each transaction execution. + nullable: true + finalize_block_events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + description: |- + finalize_block_events contains consensus-level events emitted during block + finalization, including slashing, jailing, and validator set updates. + nullable: true + validator_updates: + type: array + items: + type: object + properties: + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + power: + type: string + format: int64 + description: validator_updates contains the validator updates for this block. + nullable: true + consensus_param_updates: + description: consensus_param_updates contains any consensus parameter updates for this block. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: |- + Max age of evidence, in blocks. + + The basic formula for calculating this is: MaxAgeDuration / {average block + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be committed in a + single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: |- + vote_extensions_enable_height configures the first height during which + vote extensions will be enabled. During this specified height, and for all + subsequent heights, precommit messages that do not contain valid extension data + will be considered invalid. Prior to this height, vote extensions will not + be used or accepted by validators on the network. + + Once enabled, vote extensions will be created by the application in ExtendVote, + passed to the application for validation in VerifyVoteExtension and given + to the application to use when proposing a block during PrepareProposal. + description: ABCIParams configure functionality specific to the Application Blockchain Interface. + authority: + type: object + properties: + authority: + type: string + nullable: true + app_hash: + type: string + format: byte + description: app_hash is the app hash after processing this block. + nullable: true + description: GetBlockResultsResponse is the response type for the Query/GetBlockResults RPC method. + additionalProperties: false + cosmos.base.tendermint.v1beta1.GetLatestBlockResponse: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + nullable: true + block: + title: 'Deprecated: please use `sdk_block` instead' + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a + block in the blockchain, + + including all blockchain data structures and the rules of + the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the previous + block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error + condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the signature is + for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a + set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + nullable: true + sdk_block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + description: >- + proposer_address is the original block proposer address, formatted as a Bech32 + string. + + In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 + string + + for better UX. + + + original proposer of the block + description: Header defines the structure of a Tendermint block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a + block in the blockchain, + + including all blockchain data structures and the rules of + the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the previous + block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error + condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the signature is + for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a + set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + description: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. + nullable: true + description: GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. + additionalProperties: false + cosmos.base.tendermint.v1beta1.GetLatestBlockResultsResponse: + type: object + properties: + height: + type: string + format: int64 + description: height is the block height. + txs_results: + type: array + items: + type: object + properties: + code: + type: integer + format: int64 + data: + type: string + format: byte + log: + type: string + title: nondeterministic + info: + type: string + title: nondeterministic + gas_wanted: + type: string + format: int64 + gas_used: + type: string + format: int64 + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + title: nondeterministic + codespace: + type: string + description: |- + ExecTxResult contains results of executing one individual transaction. + + * Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted + description: txs_results contains the results of each transaction execution. + nullable: true + finalize_block_events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + description: |- + finalize_block_events contains consensus-level events emitted during block + finalization, including slashing, jailing, and validator set updates. + nullable: true + validator_updates: + type: array + items: + type: object + properties: + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + power: + type: string + format: int64 + description: validator_updates contains the validator updates for this block. + nullable: true + consensus_param_updates: + description: consensus_param_updates contains any consensus parameter updates for this block. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: |- + Max age of evidence, in blocks. + + The basic formula for calculating this is: MaxAgeDuration / {average block + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be committed in a + single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: |- + vote_extensions_enable_height configures the first height during which + vote extensions will be enabled. During this specified height, and for all + subsequent heights, precommit messages that do not contain valid extension data + will be considered invalid. Prior to this height, vote extensions will not + be used or accepted by validators on the network. + + Once enabled, vote extensions will be created by the application in ExtendVote, + passed to the application for validation in VerifyVoteExtension and given + to the application to use when proposing a block during PrepareProposal. + description: ABCIParams configure functionality specific to the Application Blockchain Interface. + authority: + type: object + properties: + authority: + type: string + nullable: true + app_hash: + type: string + format: byte + description: app_hash is the app hash after processing this block. + nullable: true + description: >- + GetLatestBlockResultsResponse is the response type for the Query/GetLatestBlockResults RPC + method. + additionalProperties: false + cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse: + type: object + properties: + block_height: + type: string + format: int64 + validators: + type: array + items: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + nullable: true + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: >- + GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC + method. + cosmos.base.tendermint.v1beta1.GetNodeInfoResponse: + type: object + properties: + default_node_info: + type: object + properties: + protocol_version: + type: object + properties: + p2p: + type: string + format: uint64 + block: + type: string + format: uint64 + app: + type: string + format: uint64 + default_node_id: + type: string + listen_addr: + type: string + network: + type: string + version: + type: string + channels: + type: string + format: byte + moniker: + type: string + other: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + nullable: true + application_version: + type: object + properties: + name: + type: string + app_name: + type: string + version: + type: string + git_commit: + type: string + build_tags: + type: string + go_version: + type: string + build_deps: + type: array + items: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + cosmos_sdk_version: + type: string + description: VersionInfo is the type for the GetNodeInfoResponse message. + nullable: true + description: GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. + additionalProperties: false + cosmos.base.tendermint.v1beta1.GetSyncingResponse: + type: object + properties: + syncing: + type: boolean + earliest_block_height: + type: string + format: int64 + description: earliest_block_height is the earliest block height available on this node. + latest_block_height: + type: string + format: int64 + description: latest_block_height is the latest block height available on this node. + description: GetSyncingResponse is the response type for the Query/GetSyncing RPC method. + additionalProperties: false + cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse: + type: object + properties: + block_height: + type: string + format: int64 + validators: + type: array + items: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + nullable: true + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: >- + GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight + RPC method. + cosmos.base.tendermint.v1beta1.Header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + nullable: true + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + nullable: true + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + description: |- + proposer_address is the original block proposer address, formatted as a Bech32 string. + In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string + for better UX. + + original proposer of the block + description: Header defines the structure of a Tendermint block header. + additionalProperties: false + cosmos.base.tendermint.v1beta1.Module: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + additionalProperties: false + cosmos.base.tendermint.v1beta1.ProofOp: + type: object + properties: + type: + type: string + key: + type: string + format: byte + nullable: true + data: + type: string + format: byte + nullable: true + description: |- + ProofOp defines an operation used for calculating Merkle root. The data could + be arbitrary format, providing necessary data for example neighbouring node + hash. + + Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. + additionalProperties: false + cosmos.base.tendermint.v1beta1.ProofOps: + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + description: |- + ProofOp defines an operation used for calculating Merkle root. The data could + be arbitrary format, providing necessary data for example neighbouring node + hash. + + Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. + nullable: true + description: |- + ProofOps is Merkle proof defined by the list of ProofOps. + + Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. + additionalProperties: false + cosmos.base.tendermint.v1beta1.Validator: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + cosmos.base.tendermint.v1beta1.VersionInfo: + type: object + properties: + name: + type: string + app_name: + type: string + version: + type: string + git_commit: + type: string + build_tags: + type: string + go_version: + type: string + build_deps: + type: array + items: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + nullable: true + cosmos_sdk_version: + type: string + description: VersionInfo is the type for the GetNodeInfoResponse message. + additionalProperties: false + tendermint.abci.Event: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + nullable: true + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + additionalProperties: false + tendermint.abci.EventAttribute: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + additionalProperties: false + tendermint.abci.ExecTxResult: + type: object + properties: + code: + type: integer + format: int64 + data: + type: string + format: byte + nullable: true + log: + type: string + title: nondeterministic + info: + type: string + title: nondeterministic + gas_wanted: + type: string + format: int64 + gas_used: + type: string + format: int64 + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + title: nondeterministic + nullable: true + codespace: + type: string + description: |- + ExecTxResult contains results of executing one individual transaction. + + * Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted + additionalProperties: false + tendermint.abci.ValidatorUpdate: + type: object + properties: + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + nullable: true + power: + type: string + format: int64 + additionalProperties: false + tendermint.crypto.PublicKey: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: PublicKey defines the keys available for use with Validators + additionalProperties: false + tendermint.p2p.DefaultNodeInfo: + type: object + properties: + protocol_version: + type: object + properties: + p2p: + type: string + format: uint64 + block: + type: string + format: uint64 + app: + type: string + format: uint64 + nullable: true + default_node_id: + type: string + listen_addr: + type: string + network: + type: string + version: + type: string + channels: + type: string + format: byte + nullable: true + moniker: + type: string + other: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + nullable: true + additionalProperties: false + tendermint.p2p.DefaultNodeInfoOther: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + additionalProperties: false + tendermint.p2p.ProtocolVersion: + type: object + properties: + p2p: + type: string + format: uint64 + block: + type: string + format: uint64 + app: + type: string + format: uint64 + additionalProperties: false + tendermint.types.ABCIParams: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: |- + vote_extensions_enable_height configures the first height during which + vote extensions will be enabled. During this specified height, and for all + subsequent heights, precommit messages that do not contain valid extension data + will be considered invalid. Prior to this height, vote extensions will not + be used or accepted by validators on the network. + + Once enabled, vote extensions will be created by the application in ExtendVote, + passed to the application for validation in VerifyVoteExtension and given + to the application to use when proposing a block during PrepareProposal. + description: ABCIParams configure functionality specific to the Application Blockchain Interface. + additionalProperties: false + tendermint.types.AuthorityParams: + type: object + properties: + authority: + type: string + additionalProperties: false + tendermint.types.Block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + nullable: true + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + nullable: true + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus for + the + + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus for + the + + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two conflicting + votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set + of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators attempting + to mislead a light client. + nullable: true + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + nullable: true + additionalProperties: false + tendermint.types.BlockID: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + nullable: true + title: BlockID + additionalProperties: false + tendermint.types.BlockIDFlag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + tendermint.types.BlockParams: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + additionalProperties: false + tendermint.types.Commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + nullable: true + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + nullable: true + description: Commit contains the evidence that a block was committed by a set of validators. + additionalProperties: false + tendermint.types.CommitSig: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: CommitSig is a part of the Vote included in a Commit. + additionalProperties: false + tendermint.types.ConsensusParams: + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + nullable: true + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: |- + Max age of evidence, in blocks. + + The basic formula for calculating this is: MaxAgeDuration / {average block + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be committed in a + single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + nullable: true + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + nullable: true + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + nullable: true + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: |- + vote_extensions_enable_height configures the first height during which + vote extensions will be enabled. During this specified height, and for all + subsequent heights, precommit messages that do not contain valid extension data + will be considered invalid. Prior to this height, vote extensions will not + be used or accepted by validators on the network. + + Once enabled, vote extensions will be created by the application in ExtendVote, + passed to the application for validation in VerifyVoteExtension and given + to the application to use when proposing a block during PrepareProposal. + description: ABCIParams configure functionality specific to the Application Blockchain Interface. + nullable: true + authority: + type: object + properties: + authority: + type: string + nullable: true + description: |- + ConsensusParams contains consensus critical parameters that determine the + validity of blocks. + additionalProperties: false + tendermint.types.Data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + nullable: true + title: Data contains the set of transactions included in the block + additionalProperties: false + tendermint.types.DuplicateVoteEvidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote signature by the validator if they participated in consensus for the + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + nullable: true + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote signature by the validator if they participated in consensus for the + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + nullable: true + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. + additionalProperties: false + tendermint.types.Evidence: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote signature by the validator if they participated in consensus for the + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote signature by the validator if they participated in consensus for the + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. + nullable: true + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators attempting to mislead + a light client. + nullable: true + additionalProperties: false + tendermint.types.EvidenceList: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote signature by the validator if they participated in consensus for the + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote signature by the validator if they participated in consensus for the + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two conflicting + votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in + the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators attempting to + mislead a light client. + nullable: true + additionalProperties: false + tendermint.types.EvidenceParams: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: |- + Max age of evidence, in blocks. + + The basic formula for calculating this is: MaxAgeDuration / {average block + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + nullable: true + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be committed in a single + block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + additionalProperties: false + tendermint.types.Header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + nullable: true + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + nullable: true + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + additionalProperties: false + tendermint.types.LightBlock: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + nullable: true + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + nullable: true + additionalProperties: false + tendermint.types.LightClientAttackEvidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + nullable: true + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a + light client. + additionalProperties: false + tendermint.types.PartSetHeader: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + additionalProperties: false + tendermint.types.SignedHeader: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + nullable: true + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + nullable: true + additionalProperties: false + tendermint.types.SignedMsgType: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + tendermint.types.Validator: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + nullable: true + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + tendermint.types.ValidatorParams: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + additionalProperties: false + tendermint.types.ValidatorSet: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + total_voting_power: + type: string + format: int64 + additionalProperties: false + tendermint.types.VersionParams: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + additionalProperties: false + tendermint.types.Vote: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + nullable: true + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote signature by the validator if they participated in consensus for the + associated block. + nullable: true + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + nullable: true + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + nullable: true + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + additionalProperties: false + tendermint.version.Consensus: + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + additionalProperties: false + cosmos.consensus.v1.QueryParamsResponse: + type: object + properties: + params: + description: |- + params are the tendermint consensus params stored in the consensus module. + Please note that `params.version` is not populated in this response, it is + tracked separately in the x/upgrade module. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: |- + Max age of evidence, in blocks. + + The basic formula for calculating this is: MaxAgeDuration / {average block + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be committed in a + single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: |- + vote_extensions_enable_height configures the first height during which + vote extensions will be enabled. During this specified height, and for all + subsequent heights, precommit messages that do not contain valid extension data + will be considered invalid. Prior to this height, vote extensions will not + be used or accepted by validators on the network. + + Once enabled, vote extensions will be created by the application in ExtendVote, + passed to the application for validation in VerifyVoteExtension and given + to the application to use when proposing a block during PrepareProposal. + description: ABCIParams configure functionality specific to the Application Blockchain Interface. + authority: + type: object + properties: + authority: + type: string + nullable: true + description: QueryParamsResponse defines the response type for querying x/consensus parameters. + additionalProperties: false + cosmos.base.v1beta1.DecCoin: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + cosmos.distribution.v1beta1.DelegationDelegatorReward: + type: object + properties: + validator_address: + type: string + reward: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + nullable: true + description: |- + DelegationDelegatorReward represents the properties + of a delegator's delegation reward. + additionalProperties: false + cosmos.distribution.v1beta1.DelegatorStartingInfo: + type: object + properties: + previous_period: + type: string + format: uint64 + stake: + type: string + height: + type: string + format: uint64 + description: |- + DelegatorStartingInfo represents the starting info for a delegator reward + period. It tracks the previous validator period, the delegation's amount of + staking token, and the creation height (to check later on if any slashes have + occurred). NOTE: Even though validators are slashed to whole staking tokens, + the delegators within the validator may be left with less than a full token, + thus sdk.Dec is used. + additionalProperties: false + cosmos.distribution.v1beta1.Params: + type: object + properties: + community_tax: + type: string + base_proposer_reward: + type: string + description: |- + Deprecated: The base_proposer_reward field is deprecated and is no longer used + in the x/distribution module's reward mechanism. + bonus_proposer_reward: + type: string + description: |- + Deprecated: The bonus_proposer_reward field is deprecated and is no longer used + in the x/distribution module's reward mechanism. + withdraw_addr_enabled: + type: boolean + description: Params defines the set of params for the distribution module. + additionalProperties: false + cosmos.distribution.v1beta1.QueryCommunityPoolResponse: + type: object + properties: + pool: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + description: pool defines community pool's coins. + nullable: true + description: |- + QueryCommunityPoolResponse is the response type for the Query/CommunityPool + RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryDelegationRewardsResponse: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + description: rewards defines the rewards accrued by a delegation. + nullable: true + description: |- + QueryDelegationRewardsResponse is the response type for the + Query/DelegationRewards RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + validator_address: + type: string + reward: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + description: |- + DelegationDelegatorReward represents the properties + of a delegator's delegation reward. + description: rewards defines all the rewards accrued by a delegator. + nullable: true + total: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + description: total defines the sum of all the rewards. + nullable: true + description: |- + QueryDelegationTotalRewardsResponse is the response type for the + Query/DelegationTotalRewards RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryDelegatorStartingInfoResponse: + type: object + properties: + starting_info: + description: starting_info defines the starting info of a delegator. + type: object + properties: + previous_period: + type: string + format: uint64 + stake: + type: string + height: + type: string + format: uint64 + nullable: true + description: |- + QueryDelegatorStartingInfoResponse is the response type for the + Query/DelegatorStartingInfo RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse: + type: object + properties: + validators: + type: array + items: + type: string + description: validators defines the validators a delegator is delegating for. + description: |- + QueryDelegatorValidatorsResponse is the response type for the + Query/DelegatorValidators RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse: + type: object + properties: + withdraw_address: + type: string + description: withdraw_address defines the delegator address to query for. + description: |- + QueryDelegatorWithdrawAddressResponse is the response type for the + Query/DelegatorWithdrawAddress RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + community_tax: + type: string + base_proposer_reward: + type: string + description: |- + Deprecated: The base_proposer_reward field is deprecated and is no longer used + in the x/distribution module's reward mechanism. + bonus_proposer_reward: + type: string + description: |- + Deprecated: The bonus_proposer_reward field is deprecated and is no longer used + in the x/distribution module's reward mechanism. + withdraw_addr_enabled: + type: boolean + nullable: true + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryValidatorCommissionResponse: + type: object + properties: + commission: + description: commission defines the commission the validator received. + type: object + properties: + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + nullable: true + title: |- + QueryValidatorCommissionResponse is the response type for the + Query/ValidatorCommission RPC method + additionalProperties: false + cosmos.distribution.v1beta1.QueryValidatorCurrentRewardsResponse: + type: object + properties: + rewards: + description: rewards defines the current rewards of a validator. + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + period: + type: string + format: uint64 + nullable: true + description: |- + QueryValidatorCurrentRewardsResponse is the response type for the + Query/ValidatorCurrentRewards RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse: + type: object + properties: + operator_address: + type: string + description: operator_address defines the validator operator address. + self_bond_rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + description: self_bond_rewards defines the self delegations rewards. + nullable: true + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + description: commission defines the commission the validator received. + nullable: true + description: >- + QueryValidatorDistributionInfoResponse is the response type for the + Query/ValidatorDistributionInfo RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryValidatorHistoricalRewardsResponse: + type: object + properties: + rewards: + description: rewards defines the historical rewards of a validator. + type: object + properties: + cumulative_reward_ratio: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + reference_count: + type: integer + format: int64 + title: |- + ValidatorHistoricalRewards represents historical rewards for a validator. + Height is implicit within the store key. + Cumulative reward ratio is the sum from the zeroeth period + until this period of rewards / tokens, per the spec. + The reference count indicates the number of objects + which might need to reference this historical entry at any point. + ReferenceCount = + number of outstanding delegations which ended the associated period (and + might need to read that record) + + number of slashes which ended the associated period (and might need to + read that record) + + one per validator for the zeroeth period, set on initialization + nullable: true + description: |- + QueryValidatorHistoricalRewardsResponse is the response type for the + Query/ValidatorHistoricalRewards RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse: + type: object + properties: + rewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + description: |- + ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards + for a validator inexpensive to track, allows simple sanity checks. + nullable: true + description: |- + QueryValidatorOutstandingRewardsResponse is the response type for the + Query/ValidatorOutstandingRewards RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryValidatorSlashesResponse: + type: object + properties: + slashes: + type: array + items: + type: object + properties: + validator_period: + type: string + format: uint64 + fraction: + type: string + description: |- + ValidatorSlashEvent represents a validator slash event. + Height is implicit within the store key. + This is needed to calculate appropriate amount of staking tokens + for delegations which are withdrawn after a slash has occurred. + description: slashes defines the slashes the validator received. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryValidatorSlashesResponse is the response type for the + Query/ValidatorSlashes RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.ValidatorAccumulatedCommission: + type: object + properties: + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + nullable: true + description: |- + ValidatorAccumulatedCommission represents accumulated commission + for a validator kept as a running counter, can be withdrawn at any time. + additionalProperties: false + cosmos.distribution.v1beta1.ValidatorCurrentRewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + nullable: true + period: + type: string + format: uint64 + description: |- + ValidatorCurrentRewards represents current rewards and current + period for a validator kept as a running counter and incremented + each block as long as the validator's tokens remain constant. + additionalProperties: false + cosmos.distribution.v1beta1.ValidatorHistoricalRewards: + type: object + properties: + cumulative_reward_ratio: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + nullable: true + reference_count: + type: integer + format: int64 + title: |- + ValidatorHistoricalRewards represents historical rewards for a validator. + Height is implicit within the store key. + Cumulative reward ratio is the sum from the zeroeth period + until this period of rewards / tokens, per the spec. + The reference count indicates the number of objects + which might need to reference this historical entry at any point. + ReferenceCount = + number of outstanding delegations which ended the associated period (and + might need to read that record) + + number of slashes which ended the associated period (and might need to + read that record) + + one per validator for the zeroeth period, set on initialization + additionalProperties: false + cosmos.distribution.v1beta1.ValidatorOutstandingRewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + nullable: true + description: |- + ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards + for a validator inexpensive to track, allows simple sanity checks. + additionalProperties: false + cosmos.distribution.v1beta1.ValidatorSlashEvent: + type: object + properties: + validator_period: + type: string + format: uint64 + fraction: + type: string + description: |- + ValidatorSlashEvent represents a validator slash event. + Height is implicit within the store key. + This is needed to calculate appropriate amount of staking tokens + for delegations which are withdrawn after a slash has occurred. + additionalProperties: false + cosmos.epochs.v1beta1.EpochInfo: + type: object + properties: + identifier: + type: string + description: identifier is a unique reference to this particular timer. + start_time: + type: string + format: date-time + description: |- + start_time is the time at which the timer first ever ticks. + If start_time is in the future, the epoch will not begin until the start + time. + nullable: true + duration: + type: string + description: |- + duration is the time in between epoch ticks. + In order for intended behavior to be met, duration should + be greater than the chains expected block time. + Duration must be non-zero. + nullable: true + current_epoch: + type: string + format: int64 + description: |- + current_epoch is the current epoch number, or in other words, + how many times has the timer 'ticked'. + The first tick (current_epoch=1) is defined as + the first block whose blocktime is greater than the EpochInfo start_time. + current_epoch_start_time: + type: string + format: date-time + description: |- + current_epoch_start_time describes the start time of the current timer + interval. The interval is (current_epoch_start_time, + current_epoch_start_time + duration] When the timer ticks, this is set to + current_epoch_start_time = last_epoch_start_time + duration only one timer + tick for a given identifier can occur per block. + + NOTE! The current_epoch_start_time may diverge significantly from the + wall-clock time the epoch began at. Wall-clock time of epoch start may be + >> current_epoch_start_time. Suppose current_epoch_start_time = 10, + duration = 5. Suppose the chain goes offline at t=14, and comes back online + at t=30, and produces blocks at every successive time. (t=31, 32, etc.) + * The t=30 block will start the epoch for (10, 15] + * The t=31 block will start the epoch for (15, 20] + * The t=32 block will start the epoch for (20, 25] + * The t=33 block will start the epoch for (25, 30] + * The t=34 block will start the epoch for (30, 35] + * The **t=36** block will start the epoch for (35, 40] + nullable: true + epoch_counting_started: + type: boolean + description: |- + epoch_counting_started is a boolean, that indicates whether this + epoch timer has began yet. + current_epoch_start_height: + type: string + format: int64 + title: |- + current_epoch_start_height is the block height at which the current epoch + started. (The block height at which the timer last ticked) + description: |- + EpochInfo is a struct that describes the data going into + a timer defined by the x/epochs module. + additionalProperties: false + cosmos.epochs.v1beta1.QueryCurrentEpochResponse: + type: object + properties: + current_epoch: + type: string + format: int64 + description: |- + QueryCurrentEpochResponse defines the gRPC response structure for + querying an epoch by its identifier. + additionalProperties: false + cosmos.epochs.v1beta1.QueryEpochInfosResponse: + type: object + properties: + epochs: + type: array + items: + type: object + properties: + identifier: + type: string + description: identifier is a unique reference to this particular timer. + start_time: + type: string + format: date-time + description: |- + start_time is the time at which the timer first ever ticks. + If start_time is in the future, the epoch will not begin until the start + time. + duration: + type: string + description: |- + duration is the time in between epoch ticks. + In order for intended behavior to be met, duration should + be greater than the chains expected block time. + Duration must be non-zero. + current_epoch: + type: string + format: int64 + description: |- + current_epoch is the current epoch number, or in other words, + how many times has the timer 'ticked'. + The first tick (current_epoch=1) is defined as + the first block whose blocktime is greater than the EpochInfo start_time. + current_epoch_start_time: + type: string + format: date-time + description: |- + current_epoch_start_time describes the start time of the current timer + interval. The interval is (current_epoch_start_time, + current_epoch_start_time + duration] When the timer ticks, this is set to + current_epoch_start_time = last_epoch_start_time + duration only one timer + tick for a given identifier can occur per block. + + NOTE! The current_epoch_start_time may diverge significantly from the + wall-clock time the epoch began at. Wall-clock time of epoch start may be + >> current_epoch_start_time. Suppose current_epoch_start_time = 10, + duration = 5. Suppose the chain goes offline at t=14, and comes back online + at t=30, and produces blocks at every successive time. (t=31, 32, etc.) + * The t=30 block will start the epoch for (10, 15] + * The t=31 block will start the epoch for (15, 20] + * The t=32 block will start the epoch for (20, 25] + * The t=33 block will start the epoch for (25, 30] + * The t=34 block will start the epoch for (30, 35] + * The **t=36** block will start the epoch for (35, 40] + epoch_counting_started: + type: boolean + description: |- + epoch_counting_started is a boolean, that indicates whether this + epoch timer has began yet. + current_epoch_start_height: + type: string + format: int64 + title: |- + current_epoch_start_height is the block height at which the current epoch + started. (The block height at which the timer last ticked) + description: |- + EpochInfo is a struct that describes the data going into + a timer defined by the x/epochs module. + nullable: true + description: |- + QueryEpochInfosRequest defines the gRPC response structure for + querying all epoch info. + additionalProperties: false + cosmos.evidence.v1beta1.QueryAllEvidenceResponse: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: evidence returns all evidences. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC + method. + cosmos.evidence.v1beta1.QueryEvidenceResponse: + type: object + properties: + evidence: + description: evidence returns the requested evidence. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + description: QueryEvidenceResponse is the response type for the Query/Evidence RPC method. + cosmos.feegrant.v1beta1.Grant: + type: object + properties: + granter: + type: string + description: granter is the address of the user granting an allowance of their funds. + grantee: + type: string + description: grantee is the address of the user being granted an allowance of another user's funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + title: Grant is stored in the KVStore to record a grant with full context + cosmos.feegrant.v1beta1.QueryAllowanceResponse: + type: object + properties: + allowance: + description: allowance is an allowance granted for grantee by granter. + type: object + properties: + granter: + type: string + description: granter is the address of the user granting an allowance of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of another user's + funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + title: Grant is stored in the KVStore to record a grant with full context + nullable: true + description: QueryAllowanceResponse is the response type for the Query/Allowance RPC method. + cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: granter is the address of the user granting an allowance of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of another user's + funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + title: Grant is stored in the KVStore to record a grant with full context + description: allowances that have been issued by the granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: >- + QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC + method. + cosmos.feegrant.v1beta1.QueryAllowancesResponse: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: granter is the address of the user granting an allowance of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of another user's + funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + title: Grant is stored in the KVStore to record a grant with full context + description: allowances are allowance's granted for grantee by granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryAllowancesResponse is the response type for the Query/Allowances RPC method. + cosmos.gov.v1.Deposit: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: amount to be deposited by depositor. + nullable: true + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + additionalProperties: false + cosmos.gov.v1.DepositParams: + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + nullable: true + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + description: DepositParams defines the params for deposits on governance proposals. + additionalProperties: false + cosmos.gov.v1.Params: + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + nullable: true + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + voting_period: + type: string + description: Duration of the voting period. + nullable: true + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + veto_threshold: + type: string + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + min_initial_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value that must be paid at proposal + submission. + proposal_cancel_ratio: + type: string + description: >- + The cancel ratio which will not be returned back to the depositors when a proposal is + cancelled. + proposal_cancel_dest: + type: string + description: |- + The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. + If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. + expedited_voting_period: + type: string + description: Duration of the voting period of an expedited proposal. + nullable: true + expedited_threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.67.' + expedited_min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum expedited deposit for a proposal to enter voting period. + nullable: true + burn_vote_quorum: + type: boolean + title: burn deposits if a proposal does not meet quorum + burn_proposal_deposit_prevote: + type: boolean + title: burn deposits if the proposal does not enter voting period + burn_vote_veto: + type: boolean + title: burn deposits if quorum with vote type no_veto is met + min_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value minimum that must be met when + making a deposit. + + Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit + of 1stake would be + + required. + description: Params defines the parameters for the x/gov module. + additionalProperties: false + cosmos.gov.v1.Proposal: + type: object + properties: + id: + type: string + format: uint64 + description: id defines the unique id of the proposal. + messages: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: messages are the arbitrary messages to be executed if the proposal passes. + nullable: true + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + nullable: true + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. + nullable: true + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + nullable: true + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + nullable: true + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + nullable: true + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + nullable: true + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + nullable: true + metadata: + type: string + title: |- + metadata is any arbitrary metadata attached to the proposal. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#proposal-3 + title: + type: string + title: title is the title of the proposal + summary: + type: string + title: summary is a short summary of the proposal + proposer: + type: string + title: proposer is the address of the proposal submitter + expedited: + type: boolean + title: expedited defines if the proposal is expedited + failed_reason: + type: string + title: failed_reason defines the reason why the proposal failed + description: Proposal defines the core field members of a governance proposal. + cosmos.gov.v1.ProposalStatus: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + cosmos.gov.v1.QueryConstitutionResponse: + type: object + properties: + constitution: + type: string + title: QueryConstitutionResponse is the response type for the Query/Constitution RPC method + additionalProperties: false + cosmos.gov.v1.QueryDepositResponse: + type: object + properties: + deposit: + description: deposit defines the requested deposit. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: amount to be deposited by depositor. + nullable: true + description: QueryDepositResponse is the response type for the Query/Deposit RPC method. + additionalProperties: false + cosmos.gov.v1.QueryDepositsResponse: + type: object + properties: + deposits: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: amount to be deposited by depositor. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + description: deposits defines the requested deposits. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryDepositsResponse is the response type for the Query/Deposits RPC method. + additionalProperties: false + cosmos.gov.v1.QueryParamsResponse: + type: object + properties: + voting_params: + description: |- + Deprecated: Prefer to use `params` instead. + voting_params defines the parameters related to voting. + type: object + properties: + voting_period: + type: string + description: Duration of the voting period. + nullable: true + deposit_params: + description: |- + Deprecated: Prefer to use `params` instead. + deposit_params defines the parameters related to deposit. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + tally_params: + description: |- + Deprecated: Prefer to use `params` instead. + tally_params defines the parameters related to tally. + type: object + properties: + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + veto_threshold: + type: string + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + nullable: true + params: + description: params defines all the parameters of x/gov module. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + voting_period: + type: string + description: Duration of the voting period. + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + veto_threshold: + type: string + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + min_initial_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value that must be paid at + proposal submission. + proposal_cancel_ratio: + type: string + description: >- + The cancel ratio which will not be returned back to the depositors when a proposal + is cancelled. + proposal_cancel_dest: + type: string + description: |- + The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. + If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. + expedited_voting_period: + type: string + description: Duration of the voting period of an expedited proposal. + expedited_threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.67.' + expedited_min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum expedited deposit for a proposal to enter voting period. + burn_vote_quorum: + type: boolean + title: burn deposits if a proposal does not meet quorum + burn_proposal_deposit_prevote: + type: boolean + title: burn deposits if the proposal does not enter voting period + burn_vote_veto: + type: boolean + title: burn deposits if quorum with vote type no_veto is met + min_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value minimum that must be met + when making a deposit. + + Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a + deposit of 1stake would be + + required. + nullable: true + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + cosmos.gov.v1.QueryProposalResponse: + type: object + properties: + proposal: + description: proposal is the requested governance proposal. + type: object + properties: + id: + type: string + format: uint64 + description: id defines the unique id of the proposal. + messages: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: messages are the arbitrary messages to be executed if the proposal passes. + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + metadata: + type: string + title: |- + metadata is any arbitrary metadata attached to the proposal. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#proposal-3 + title: + type: string + title: title is the title of the proposal + summary: + type: string + title: summary is a short summary of the proposal + proposer: + type: string + title: proposer is the address of the proposal submitter + expedited: + type: boolean + title: expedited defines if the proposal is expedited + failed_reason: + type: string + title: failed_reason defines the reason why the proposal failed + nullable: true + description: QueryProposalResponse is the response type for the Query/Proposal RPC method. + cosmos.gov.v1.QueryProposalsResponse: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id defines the unique id of the proposal. + messages: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: messages are the arbitrary messages to be executed if the proposal passes. + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + metadata: + type: string + title: |- + metadata is any arbitrary metadata attached to the proposal. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#proposal-3 + title: + type: string + title: title is the title of the proposal + summary: + type: string + title: summary is a short summary of the proposal + proposer: + type: string + title: proposer is the address of the proposal submitter + expedited: + type: boolean + title: expedited defines if the proposal is expedited + failed_reason: + type: string + title: failed_reason defines the reason why the proposal failed + description: Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryProposalsResponse is the response type for the Query/Proposals RPC + method. + cosmos.gov.v1.QueryTallyResultResponse: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. + nullable: true + description: QueryTallyResultResponse is the response type for the Query/Tally RPC method. + additionalProperties: false + cosmos.gov.v1.QueryVoteResponse: + type: object + properties: + vote: + description: vote defines the queried vote. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain duplicate vote + options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. + metadata: + type: string + title: >- + metadata is any arbitrary metadata attached to the vote. + + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#vote-5 + nullable: true + description: QueryVoteResponse is the response type for the Query/Vote RPC method. + additionalProperties: false + cosmos.gov.v1.QueryVotesResponse: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain duplicate vote + options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. + metadata: + type: string + title: >- + metadata is any arbitrary metadata attached to the vote. + + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#vote-5 + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + description: votes defines the queried votes. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryVotesResponse is the response type for the Query/Votes RPC method. + additionalProperties: false + cosmos.gov.v1.TallyParams: + type: object + properties: + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + veto_threshold: + type: string + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + description: TallyParams defines the params for tallying votes on governance proposals. + additionalProperties: false + cosmos.gov.v1.TallyResult: + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. + description: TallyResult defines a standard tally for a governance proposal. + additionalProperties: false + cosmos.gov.v1.Vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + options: + type: array + items: + type: object + properties: + option: + description: option defines the valid vote options, it must not contain duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. + nullable: true + metadata: + type: string + title: >- + metadata is any arbitrary metadata attached to the vote. + + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#vote-5 + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + additionalProperties: false + cosmos.gov.v1.VoteOption: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: |- + VoteOption enumerates the valid vote options for a given governance proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + cosmos.gov.v1.VotingParams: + type: object + properties: + voting_period: + type: string + description: Duration of the voting period. + nullable: true + description: VotingParams defines the params for voting on governance proposals. + additionalProperties: false + cosmos.gov.v1.WeightedVoteOption: + type: object + properties: + option: + description: option defines the valid vote options, it must not contain duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + additionalProperties: false + cosmos.gov.v1beta1.Deposit: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: amount to be deposited by depositor. + nullable: true + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + additionalProperties: false + cosmos.gov.v1beta1.DepositParams: + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + nullable: true + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + description: DepositParams defines the params for deposits on governance proposals. + additionalProperties: false + cosmos.gov.v1beta1.Proposal: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + content: + description: content is the proposal's content. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + nullable: true + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + nullable: true + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + nullable: true + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + nullable: true + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + nullable: true + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + nullable: true + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + nullable: true + description: Proposal defines the core field members of a governance proposal. + cosmos.gov.v1beta1.ProposalStatus: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + cosmos.gov.v1beta1.QueryDepositResponse: + type: object + properties: + deposit: + description: deposit defines the requested deposit. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: amount to be deposited by depositor. + nullable: true + description: QueryDepositResponse is the response type for the Query/Deposit RPC method. + additionalProperties: false + cosmos.gov.v1beta1.QueryDepositsResponse: + type: object + properties: + deposits: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: amount to be deposited by depositor. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + description: deposits defines the requested deposits. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryDepositsResponse is the response type for the Query/Deposits RPC method. + additionalProperties: false + cosmos.gov.v1beta1.QueryParamsResponse: + type: object + properties: + voting_params: + description: voting_params defines the parameters related to voting. + type: object + properties: + voting_period: + type: string + description: Duration of the voting period. + nullable: true + deposit_params: + description: deposit_params defines the parameters related to deposit. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + tally_params: + description: tally_params defines the parameters related to tally. + type: object + properties: + quorum: + type: string + format: byte + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + format: byte + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + veto_threshold: + type: string + format: byte + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + nullable: true + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + cosmos.gov.v1beta1.QueryProposalResponse: + type: object + properties: + proposal: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + content: + description: content is the proposal's content. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + description: Proposal defines the core field members of a governance proposal. + nullable: true + description: QueryProposalResponse is the response type for the Query/Proposal RPC method. + cosmos.gov.v1beta1.QueryProposalsResponse: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + content: + description: content is the proposal's content. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + description: Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryProposalsResponse is the response type for the Query/Proposals RPC + method. + cosmos.gov.v1beta1.QueryTallyResultResponse: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + nullable: true + description: QueryTallyResultResponse is the response type for the Query/Tally RPC method. + additionalProperties: false + cosmos.gov.v1beta1.QueryVoteResponse: + type: object + properties: + vote: + description: vote defines the queried vote. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + option: + description: |- + Deprecated: Prefer to use `options` instead. This field is set in queries + if and only if `len(options) == 1` and that option has weight 1. In all + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain duplicate vote + options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. + nullable: true + description: QueryVoteResponse is the response type for the Query/Vote RPC method. + additionalProperties: false + cosmos.gov.v1beta1.QueryVotesResponse: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + option: + description: |- + Deprecated: Prefer to use `options` instead. This field is set in queries + if and only if `len(options) == 1` and that option has weight 1. In all + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain duplicate vote + options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + description: votes defines the queried votes. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryVotesResponse is the response type for the Query/Votes RPC method. + additionalProperties: false + cosmos.gov.v1beta1.TallyParams: + type: object + properties: + quorum: + type: string + format: byte + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + nullable: true + threshold: + type: string + format: byte + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + nullable: true + veto_threshold: + type: string + format: byte + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + nullable: true + description: TallyParams defines the params for tallying votes on governance proposals. + additionalProperties: false + cosmos.gov.v1beta1.TallyResult: + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + description: TallyResult defines a standard tally for a governance proposal. + additionalProperties: false + cosmos.gov.v1beta1.Vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + option: + description: |- + Deprecated: Prefer to use `options` instead. This field is set in queries + if and only if `len(options) == 1` and that option has weight 1. In all + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + options: + type: array + items: + type: object + properties: + option: + description: option defines the valid vote options, it must not contain duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. + nullable: true + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + additionalProperties: false + cosmos.gov.v1beta1.VoteOption: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: |- + VoteOption enumerates the valid vote options for a given governance proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + cosmos.gov.v1beta1.VotingParams: + type: object + properties: + voting_period: + type: string + description: Duration of the voting period. + nullable: true + description: VotingParams defines the params for voting on governance proposals. + additionalProperties: false + cosmos.gov.v1beta1.WeightedVoteOption: + type: object + properties: + option: + description: option defines the valid vote options, it must not contain duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + additionalProperties: false + cosmos.mint.v1beta1.Params: + type: object + properties: + mint_denom: + type: string + title: type of coin to mint + inflation_rate_change: + type: string + title: maximum annual change in inflation rate + inflation_max: + type: string + title: maximum inflation rate + inflation_min: + type: string + title: minimum inflation rate + goal_bonded: + type: string + title: goal of percent bonded atoms + blocks_per_year: + type: string + format: uint64 + title: expected blocks per year + max_supply: + type: string + description: |- + maximum supply for the token. + + A value of "0" indicates an unlimited (infinite) maximum supply. + description: Params defines the parameters for the x/mint module. + additionalProperties: false + cosmos.mint.v1beta1.QueryAnnualProvisionsResponse: + type: object + properties: + annual_provisions: + type: string + format: byte + description: annual_provisions is the current minting annual provisions value. + nullable: true + description: |- + QueryAnnualProvisionsResponse is the response type for the + Query/AnnualProvisions RPC method. + additionalProperties: false + cosmos.mint.v1beta1.QueryInflationResponse: + type: object + properties: + inflation: + type: string + format: byte + description: inflation is the current minting inflation value. + nullable: true + description: |- + QueryInflationResponse is the response type for the Query/Inflation RPC + method. + additionalProperties: false + cosmos.mint.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + mint_denom: + type: string + title: type of coin to mint + inflation_rate_change: + type: string + title: maximum annual change in inflation rate + inflation_max: + type: string + title: maximum inflation rate + inflation_min: + type: string + title: minimum inflation rate + goal_bonded: + type: string + title: goal of percent bonded atoms + blocks_per_year: + type: string + format: uint64 + title: expected blocks per year + max_supply: + type: string + description: |- + maximum supply for the token. + + A value of "0" indicates an unlimited (infinite) maximum supply. + nullable: true + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + cosmos.slashing.v1beta1.Params: + type: object + properties: + signed_blocks_window: + type: string + format: int64 + min_signed_per_window: + type: string + format: byte + nullable: true + downtime_jail_duration: + type: string + nullable: true + slash_fraction_double_sign: + type: string + format: byte + nullable: true + slash_fraction_downtime: + type: string + format: byte + nullable: true + description: Params represents the parameters used for by the slashing module. + additionalProperties: false + cosmos.slashing.v1beta1.QueryParamsResponse: + type: object + properties: + params: + type: object + properties: + signed_blocks_window: + type: string + format: int64 + min_signed_per_window: + type: string + format: byte + downtime_jail_duration: + type: string + slash_fraction_double_sign: + type: string + format: byte + slash_fraction_downtime: + type: string + format: byte + description: Params represents the parameters used for by the slashing module. + nullable: true + title: QueryParamsResponse is the response type for the Query/Params RPC method + additionalProperties: false + cosmos.slashing.v1beta1.QuerySigningInfoResponse: + type: object + properties: + val_signing_info: + title: val_signing_info is the signing info of requested val cons address + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: Height at which validator was first a candidate OR was un-jailed + index_offset: + type: string + format: int64 + description: |- + Index which is incremented every time a validator is bonded in a block and + _may_ have signed a pre-commit or not. This in conjunction with the + signed_blocks_window param determines the index in the missed block bitmap. + jailed_until: + type: string + format: date-time + description: Timestamp until which the validator is jailed due to liveness downtime. + tombstoned: + type: boolean + description: |- + Whether or not a validator has been tombstoned (killed out of validator + set). It is set once the validator commits an equivocation or for any other + configured misbehavior. + missed_blocks_counter: + type: string + format: int64 + description: |- + A counter of missed (unsigned) blocks. It is used to avoid unnecessary + reads in the missed block bitmap. + description: |- + ValidatorSigningInfo defines a validator's signing info for monitoring their + liveness activity. + nullable: true + title: |- + QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC + method + additionalProperties: false + cosmos.slashing.v1beta1.QuerySigningInfosResponse: + type: object + properties: + info: + type: array + items: + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: Height at which validator was first a candidate OR was un-jailed + index_offset: + type: string + format: int64 + description: |- + Index which is incremented every time a validator is bonded in a block and + _may_ have signed a pre-commit or not. This in conjunction with the + signed_blocks_window param determines the index in the missed block bitmap. + jailed_until: + type: string + format: date-time + description: Timestamp until which the validator is jailed due to liveness downtime. + tombstoned: + type: boolean + description: |- + Whether or not a validator has been tombstoned (killed out of validator + set). It is set once the validator commits an equivocation or for any other + configured misbehavior. + missed_blocks_counter: + type: string + format: int64 + description: |- + A counter of missed (unsigned) blocks. It is used to avoid unnecessary + reads in the missed block bitmap. + description: |- + ValidatorSigningInfo defines a validator's signing info for monitoring their + liveness activity. + title: info is the signing info of all validators + nullable: true + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + nullable: true + title: |- + QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC + method + additionalProperties: false + cosmos.slashing.v1beta1.ValidatorSigningInfo: + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: Height at which validator was first a candidate OR was un-jailed + index_offset: + type: string + format: int64 + description: |- + Index which is incremented every time a validator is bonded in a block and + _may_ have signed a pre-commit or not. This in conjunction with the + signed_blocks_window param determines the index in the missed block bitmap. + jailed_until: + type: string + format: date-time + description: Timestamp until which the validator is jailed due to liveness downtime. + nullable: true + tombstoned: + type: boolean + description: |- + Whether or not a validator has been tombstoned (killed out of validator + set). It is set once the validator commits an equivocation or for any other + configured misbehavior. + missed_blocks_counter: + type: string + format: int64 + description: |- + A counter of missed (unsigned) blocks. It is used to avoid unnecessary + reads in the missed block bitmap. + description: |- + ValidatorSigningInfo defines a validator's signing info for monitoring their + liveness activity. + additionalProperties: false + cosmos.staking.v1beta1.BondStatus: + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. + cosmos.staking.v1beta1.Commission: + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for creating a + validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever charge, as a + fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator commission, as a + fraction. + nullable: true + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + nullable: true + description: Commission defines commission parameters for a given validator. + additionalProperties: false + cosmos.staking.v1beta1.CommissionRates: + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever charge, as a + fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator commission, as a + fraction. + description: |- + CommissionRates defines the initial commission rates to be used for creating + a validator. + additionalProperties: false + cosmos.staking.v1beta1.Delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + additionalProperties: false + cosmos.staking.v1beta1.DelegationResponse: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + nullable: true + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + nullable: true + description: |- + DelegationResponse is equivalent to Delegation except that it contains a + balance in addition to shares which is more suitable for client responses. + additionalProperties: false + cosmos.staking.v1beta1.Description: + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + description: Description defines a validator description. + additionalProperties: false + cosmos.staking.v1beta1.HistoricalInfo: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + title: prev block info + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + nullable: true + valset: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech encoded in + JSON. + consensus_pubkey: + description: consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: jailed defined whether the validator has been jailed from bonded status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator has + begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to complete + unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for creating + a validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: min_self_delegation is the validator's self declared minimum self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by external + modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: list of unbonding ids, each uniquely identifying an unbonding of this validator + description: |- + Validator defines a validator, together with the total amount of the + Validator's bond shares and their exchange rate to coins. Slashing results in + a decrease in the exchange rate, allowing correct calculation of future + undelegations without iterating over delegators. When coins are delegated to + this validator, the validator is credited with a delegation whose number of + bond shares is based on the amount of coins delegated divided by the current + exchange rate. Voting power can be calculated as total bonded shares + multiplied by exchange rate. + nullable: true + description: |- + HistoricalInfo contains header and validator information for a given block. + It is stored as part of staking module's state, which persists the `n` most + recent HistoricalInfo + (`n` is set by the staking module's `historical_entries` parameter). + cosmos.staking.v1beta1.Params: + type: object + properties: + unbonding_time: + type: string + description: unbonding_time is the time duration of unbonding. + nullable: true + max_validators: + type: integer + format: int64 + description: max_validators is the maximum number of validators. + max_entries: + type: integer + format: int64 + description: >- + max_entries is the max entries for either unbonding delegation or redelegation (per + pair/trio). + historical_entries: + type: integer + format: int64 + description: historical_entries is the number of historical entries to persist. + bond_denom: + type: string + description: bond_denom defines the bondable coin denomination. + min_commission_rate: + type: string + title: >- + min_commission_rate is the chain-wide minimum commission rate that a validator can + charge their delegators + description: Params defines the parameters for the x/staking module. + additionalProperties: false + cosmos.staking.v1beta1.Pool: + type: object + properties: + not_bonded_tokens: + type: string + bonded_tokens: + type: string + description: |- + Pool is used for tracking bonded and not-bonded token supply of the bond + denomination. + additionalProperties: false + cosmos.staking.v1beta1.QueryDelegationResponse: + type: object + properties: + delegation_response: + description: delegation_responses defines the delegation info of a delegation. + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + nullable: true + description: QueryDelegationResponse is response type for the Query/Delegation RPC method. + additionalProperties: false + cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse: + type: object + properties: + delegation_responses: + type: array + items: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: |- + DelegationResponse is equivalent to Delegation except that it contains a + balance in addition to shares which is more suitable for client responses. + description: delegation_responses defines all the delegations' info of a delegator. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryDelegatorDelegationsResponse is response type for the + Query/DelegatorDelegations RPC method. + additionalProperties: false + cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to receive at + completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by external + modules + description: UnbondingDelegationEntry defines an unbonding object with relevant metadata. + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryUnbondingDelegatorDelegationsResponse is response type for the + Query/UnbondingDelegatorDelegations RPC method. + additionalProperties: false + cosmos.staking.v1beta1.QueryDelegatorValidatorResponse: + type: object + properties: + validator: + description: validator defines the validator info. + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech encoded in + JSON. + consensus_pubkey: + description: consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: jailed defined whether the validator has been jailed from bonded status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator has begun + unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to complete + unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for creating a + validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: min_self_delegation is the validator's self declared minimum self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: strictly positive if this validator's unbonding has been stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: list of unbonding ids, each uniquely identifying an unbonding of this validator + nullable: true + description: |- + QueryDelegatorValidatorResponse response type for the + Query/DelegatorValidator RPC method. + cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse: + type: object + properties: + validators: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech encoded in + JSON. + consensus_pubkey: + description: consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: jailed defined whether the validator has been jailed from bonded status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator has + begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to complete + unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for creating + a validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: min_self_delegation is the validator's self declared minimum self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by external + modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: list of unbonding ids, each uniquely identifying an unbonding of this validator + description: |- + Validator defines a validator, together with the total amount of the + Validator's bond shares and their exchange rate to coins. Slashing results in + a decrease in the exchange rate, allowing correct calculation of future + undelegations without iterating over delegators. When coins are delegated to + this validator, the validator is credited with a delegation whose number of + bond shares is based on the amount of coins delegated divided by the current + exchange rate. Voting power can be calculated as total bonded shares + multiplied by exchange rate. + description: validators defines the validators' info of a delegator. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryDelegatorValidatorsResponse is response type for the + Query/DelegatorValidators RPC method. + cosmos.staking.v1beta1.QueryHistoricalInfoResponse: + type: object + properties: + hist: + description: hist defines the historical info at the given height. + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + title: prev block info + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + valset: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech encoded + in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, as a Protobuf + Any. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded status or + not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator has + begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to + complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for + creating a validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: min_self_delegation is the validator's self declared minimum self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by external + modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifying an unbonding of this + validator + description: |- + Validator defines a validator, together with the total amount of the + Validator's bond shares and their exchange rate to coins. Slashing results in + a decrease in the exchange rate, allowing correct calculation of future + undelegations without iterating over delegators. When coins are delegated to + this validator, the validator is credited with a delegation whose number of + bond shares is based on the amount of coins delegated divided by the current + exchange rate. Voting power can be calculated as total bonded shares + multiplied by exchange rate. + nullable: true + description: |- + QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC + method. + cosmos.staking.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + unbonding_time: + type: string + description: unbonding_time is the time duration of unbonding. + max_validators: + type: integer + format: int64 + description: max_validators is the maximum number of validators. + max_entries: + type: integer + format: int64 + description: >- + max_entries is the max entries for either unbonding delegation or redelegation (per + pair/trio). + historical_entries: + type: integer + format: int64 + description: historical_entries is the number of historical entries to persist. + bond_denom: + type: string + description: bond_denom defines the bondable coin denomination. + min_commission_rate: + type: string + title: >- + min_commission_rate is the chain-wide minimum commission rate that a validator can + charge their delegators + nullable: true + description: QueryParamsResponse is response type for the Query/Params RPC method. + additionalProperties: false + cosmos.staking.v1beta1.QueryPoolResponse: + type: object + properties: + pool: + description: pool defines the pool info. + type: object + properties: + not_bonded_tokens: + type: string + bonded_tokens: + type: string + nullable: true + description: QueryPoolResponse is response type for the Query/Pool RPC method. + additionalProperties: false + cosmos.staking.v1beta1.QueryRedelegationsResponse: + type: object + properties: + redelegation_responses: + type: array + items: + type: object + properties: + redelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_src_address: + type: string + description: validator_src_address is the validator redelegation source operator address. + validator_dst_address: + type: string + description: >- + validator_dst_address is the validator redelegation destination operator + address. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created by + redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by external + modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + description: |- + entries are the redelegation entries. + + redelegation entries + description: |- + Redelegation contains the list of a particular delegator's redelegating bonds + from a particular source validator to a particular destination validator. + entries: + type: array + items: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created by + redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by external + modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + balance: + type: string + description: |- + RedelegationEntryResponse is equivalent to a RedelegationEntry except that it + contains a balance in addition to shares which is more suitable for client + responses. + description: |- + RedelegationResponse is equivalent to a Redelegation except that its entries + contain a balance in addition to shares which is more suitable for client + responses. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryRedelegationsResponse is response type for the Query/Redelegations RPC + method. + additionalProperties: false + cosmos.staking.v1beta1.QueryUnbondingDelegationResponse: + type: object + properties: + unbond: + description: unbond defines the unbonding information of a delegation. + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to receive at + completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by external + modules + description: UnbondingDelegationEntry defines an unbonding object with relevant metadata. + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + nullable: true + description: |- + QueryDelegationResponse is response type for the Query/UnbondingDelegation + RPC method. + additionalProperties: false + cosmos.staking.v1beta1.QueryValidatorDelegationsResponse: + type: object + properties: + delegation_responses: + type: array + items: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: |- + DelegationResponse is equivalent to Delegation except that it contains a + balance in addition to shares which is more suitable for client responses. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + title: |- + QueryValidatorDelegationsResponse is response type for the + Query/ValidatorDelegations RPC method + additionalProperties: false + cosmos.staking.v1beta1.QueryValidatorResponse: + type: object + properties: + validator: + description: validator defines the validator info. + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech encoded in + JSON. + consensus_pubkey: + description: consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: jailed defined whether the validator has been jailed from bonded status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator has begun + unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to complete + unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for creating a + validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: min_self_delegation is the validator's self declared minimum self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: strictly positive if this validator's unbonding has been stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: list of unbonding ids, each uniquely identifying an unbonding of this validator + nullable: true + title: QueryValidatorResponse is response type for the Query/Validator RPC method + cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to receive at + completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by external + modules + description: UnbondingDelegationEntry defines an unbonding object with relevant metadata. + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryValidatorUnbondingDelegationsResponse is response type for the + Query/ValidatorUnbondingDelegations RPC method. + additionalProperties: false + cosmos.staking.v1beta1.QueryValidatorsResponse: + type: object + properties: + validators: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech encoded in + JSON. + consensus_pubkey: + description: consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: jailed defined whether the validator has been jailed from bonded status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator has + begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to complete + unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for creating + a validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: min_self_delegation is the validator's self declared minimum self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by external + modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: list of unbonding ids, each uniquely identifying an unbonding of this validator + description: |- + Validator defines a validator, together with the total amount of the + Validator's bond shares and their exchange rate to coins. Slashing results in + a decrease in the exchange rate, allowing correct calculation of future + undelegations without iterating over delegators. When coins are delegated to + this validator, the validator is credited with a delegation whose number of + bond shares is based on the amount of coins delegated divided by the current + exchange rate. Voting power can be calculated as total bonded shares + multiplied by exchange rate. + description: validators contains all the queried validators. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + title: QueryValidatorsResponse is response type for the Query/Validators RPC method + cosmos.staking.v1beta1.Redelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_src_address: + type: string + description: validator_src_address is the validator redelegation source operator address. + validator_dst_address: + type: string + description: validator_dst_address is the validator redelegation destination operator address. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: shares_dst is the amount of destination-validator shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: Strictly positive if this entry's unbonding has been stopped by external modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + description: |- + entries are the redelegation entries. + + redelegation entries + nullable: true + description: |- + Redelegation contains the list of a particular delegator's redelegating bonds + from a particular source validator to a particular destination validator. + additionalProperties: false + cosmos.staking.v1beta1.RedelegationEntry: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + nullable: true + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: shares_dst is the amount of destination-validator shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: Strictly positive if this entry's unbonding has been stopped by external modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + additionalProperties: false + cosmos.staking.v1beta1.RedelegationEntryResponse: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: shares_dst is the amount of destination-validator shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: Strictly positive if this entry's unbonding has been stopped by external modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + nullable: true + balance: + type: string + description: |- + RedelegationEntryResponse is equivalent to a RedelegationEntry except that it + contains a balance in addition to shares which is more suitable for client + responses. + additionalProperties: false + cosmos.staking.v1beta1.RedelegationResponse: + type: object + properties: + redelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_src_address: + type: string + description: validator_src_address is the validator redelegation source operator address. + validator_dst_address: + type: string + description: validator_dst_address is the validator redelegation destination operator address. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created by + redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by external + modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + description: |- + entries are the redelegation entries. + + redelegation entries + description: |- + Redelegation contains the list of a particular delegator's redelegating bonds + from a particular source validator to a particular destination validator. + nullable: true + entries: + type: array + items: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created by + redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by external + modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + balance: + type: string + description: |- + RedelegationEntryResponse is equivalent to a RedelegationEntry except that it + contains a balance in addition to shares which is more suitable for client + responses. + nullable: true + description: |- + RedelegationResponse is equivalent to a Redelegation except that its entries + contain a balance in addition to shares which is more suitable for client + responses. + additionalProperties: false + cosmos.staking.v1beta1.UnbondingDelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: initial_balance defines the tokens initially scheduled to receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: Strictly positive if this entry's unbonding has been stopped by external modules + description: UnbondingDelegationEntry defines an unbonding object with relevant metadata. + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + nullable: true + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. + additionalProperties: false + cosmos.staking.v1beta1.UnbondingDelegationEntry: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + nullable: true + initial_balance: + type: string + description: initial_balance defines the tokens initially scheduled to receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: Strictly positive if this entry's unbonding has been stopped by external modules + description: UnbondingDelegationEntry defines an unbonding object with relevant metadata. + additionalProperties: false + cosmos.staking.v1beta1.Validator: + type: object + properties: + operator_address: + type: string + description: operator_address defines the address of the validator's operator; bech encoded in JSON. + consensus_pubkey: + description: consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + jailed: + type: boolean + description: jailed defined whether the validator has been jailed from bonded status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + nullable: true + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + nullable: true + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator has begun + unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to complete + unbonding. + nullable: true + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for creating a + validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever charge, as + a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator commission, + as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + nullable: true + min_self_delegation: + type: string + description: min_self_delegation is the validator's self declared minimum self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: strictly positive if this validator's unbonding has been stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: list of unbonding ids, each uniquely identifying an unbonding of this validator + description: |- + Validator defines a validator, together with the total amount of the + Validator's bond shares and their exchange rate to coins. Slashing results in + a decrease in the exchange rate, allowing correct calculation of future + undelegations without iterating over delegators. When coins are delegated to + this validator, the validator is credited with a delegation whose number of + bond shares is based on the amount of coins delegated divided by the current + exchange rate. Voting power can be calculated as total bonded shares + multiplied by exchange rate. + cosmos.base.abci.v1beta1.ABCIMessageLog: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + description: |- + Events contains a slice of Event objects that were emitted during some + execution. + nullable: true + description: ABCIMessageLog defines a structure containing an indexed tx ABCI message log. + additionalProperties: false + cosmos.base.abci.v1beta1.Attribute: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + additionalProperties: false + cosmos.base.abci.v1beta1.GasInfo: + type: object + properties: + gas_wanted: + type: string + format: uint64 + description: GasWanted is the maximum units of work we allow this tx to perform. + gas_used: + type: string + format: uint64 + description: GasUsed is the amount of gas actually consumed. + description: GasInfo defines tx execution gas context. + additionalProperties: false + cosmos.base.abci.v1beta1.Result: + type: object + properties: + data: + type: string + format: byte + description: |- + Data is any data returned from message or handler execution. It MUST be + length prefixed in order to separate data from multiple message executions. + Deprecated. This field is still populated, but prefer msg_response instead + because it also contains the Msg response typeURL. + nullable: true + log: + type: string + description: Log contains the log information from message or handler execution. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + description: |- + Events contains a slice of Event objects that were emitted during message + or handler execution. + nullable: true + msg_responses: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: msg_responses contains the Msg handler responses type packed in Anys. + nullable: true + description: Result is the union of ResponseFormat and ResponseCheckTx. + cosmos.base.abci.v1beta1.StringEvent: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + nullable: true + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + additionalProperties: false + cosmos.base.abci.v1beta1.TxResponse: + type: object + properties: + height: + type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: Result bytes, if any. + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + description: |- + Events contains a slice of Event objects that were emitted during some + execution. + description: ABCIMessageLog defines a structure containing an indexed tx ABCI message log. + description: The output of the application's logger (typed). May be non-deterministic. + nullable: true + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + description: The request transaction bytes. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + timestamp: + type: string + description: |- + Time of the previous block. For heights > 1, it's the weighted median of + the timestamps of the valid votes in the block.LastCommit. For height == 1, + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + description: |- + Events defines all the events emitted by processing a transaction. Note, + these events include those emitted by processing all the messages and those + emitted from the ante. Whereas Logs contains the events, with + additional metadata, emitted only by processing the messages. + nullable: true + description: |- + TxResponse defines a structure containing relevant tx data and metadata. The + tags are stringified and the log is JSON decoded. + cosmos.crypto.multisig.v1beta1.CompactBitArray: + type: object + properties: + extra_bits_stored: + type: integer + format: int64 + elems: + type: string + format: byte + nullable: true + description: |- + CompactBitArray is an implementation of a space efficient bit array. + This is used to ensure that the encoded data takes up a minimal amount of + space after proto encoding. + This is not thread safe, and is not intended for concurrent usage. + additionalProperties: false + cosmos.tx.signing.v1beta1.SignMode: + type: string + enum: + - SIGN_MODE_UNSPECIFIED + - SIGN_MODE_DIRECT + - SIGN_MODE_TEXTUAL + - SIGN_MODE_DIRECT_AUX + - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 + default: SIGN_MODE_UNSPECIFIED + description: |- + SignMode represents a signing mode with its own security guarantees. + + This enum should be considered a registry of all known sign modes + in the Cosmos ecosystem. Apps are not expected to support all known + sign modes. Apps that would like to support custom sign modes are + encouraged to open a small PR against this file to add a new case + to this SignMode enum describing their sign mode so that different + apps have a consistent version of this enum. + + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected. + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx. + - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some + human-readable textual representation on top of the binary representation + from SIGN_MODE_DIRECT. + + Since: cosmos-sdk 0.50 + - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not + require signers signing over other signers' `signer_info`. + + Since: cosmos-sdk 0.46 + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future. + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + but is not implemented on the SDK by default. To enable EIP-191, you need + to pass a custom `TxConfig` that has an implementation of + `SignModeHandler` for EIP-191. The SDK may decide to fully support + EIP-191 in the future. + + Since: cosmos-sdk 0.45.2 + cosmos.tx.v1beta1.AuthInfo: + type: object + properties: + signer_infos: + type: array + items: + type: object + $ref: '#/components/schemas/cosmos.tx.v1beta1.SignerInfo' + description: |- + signer_infos defines the signing modes for the required signers. The number + and order of elements must match the required signers from TxBody's + messages. The first element is the primary signer and the one which pays + the fee. + nullable: true + fee: + description: |- + Fee is the fee and gas limit for the transaction. The first signer is the + primary signer and the one which pays the fee. The fee can be calculated + based on the cost of evaluating the body and doing signature verification + of the signers. This can be estimated via simulation. + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + title: amount is the amount of coins to be paid as a fee + nullable: true + gas_limit: + type: string + format: uint64 + title: |- + gas_limit is the maximum gas that can be used in transaction processing + before an out of gas error occurs + payer: + type: string + description: |- + if unset, the first signer is responsible for paying the fees. If set, the + specified account must pay the fees. the payer must be a tx signer (and + thus have signed this field in AuthInfo). setting this field does *not* + change the ordering of required signers for the transaction. + granter: + type: string + title: |- + if set, the fee payer (either the first signer or the value of the payer + field) requests that a fee grant be used to pay fees instead of the fee + payer's own balance. If an appropriate fee grant does not exist or the + chain does not support fee grants, this will fail + nullable: true + additionalProperties: false + tip: + description: |- + Tip is the optional tip used for transactions fees paid in another denom. + + This field is ignored if the chain didn't enable tips, i.e. didn't add the + `TipDecorator` in its posthandler. + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + title: amount is the amount of the tip + nullable: true + tipper: + type: string + title: tipper is the address of the account paying for the tip + nullable: true + additionalProperties: false + description: |- + AuthInfo describes the fee and signer modes that are used to sign a + transaction. + additionalProperties: false + cosmos.tx.v1beta1.BroadcastMode: + type: string + enum: + - BROADCAST_MODE_UNSPECIFIED + - BROADCAST_MODE_BLOCK + - BROADCAST_MODE_SYNC + - BROADCAST_MODE_ASYNC + default: BROADCAST_MODE_UNSPECIFIED + description: |- + BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC + method. + + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, + BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. + - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits + for a CheckTx execution response only. + - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client + returns immediately. + cosmos.tx.v1beta1.BroadcastTxRequest: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + nullable: true + mode: + type: string + enum: + - BROADCAST_MODE_UNSPECIFIED + - BROADCAST_MODE_BLOCK + - BROADCAST_MODE_SYNC + - BROADCAST_MODE_ASYNC + default: BROADCAST_MODE_UNSPECIFIED + description: |- + BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC + method. + + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, + BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. + - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits + for a CheckTx execution response only. + - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client + returns immediately. + nullable: true + description: |- + BroadcastTxRequest is the request type for the Service.BroadcastTxRequest + RPC method. + additionalProperties: false + cosmos.tx.v1beta1.BroadcastTxResponse: + type: object + properties: + tx_response: + description: tx_response is the queried TxResponses. + type: object + properties: + height: + type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: Result bytes, if any. + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + description: |- + Events contains a slice of Event objects that were emitted during some + execution. + description: ABCIMessageLog defines a structure containing an indexed tx ABCI message log. + description: The output of the application's logger (typed). May be non-deterministic. + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + description: The request transaction bytes. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + timestamp: + type: string + description: |- + Time of the previous block. For heights > 1, it's the weighted median of + the timestamps of the valid votes in the block.LastCommit. For height == 1, + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + description: |- + Events defines all the events emitted by processing a transaction. Note, + these events include those emitted by processing all the messages and those + emitted from the ante. Whereas Logs contains the events, with + additional metadata, emitted only by processing the messages. + nullable: true + description: |- + BroadcastTxResponse is the response type for the + Service.BroadcastTx method. + cosmos.tx.v1beta1.Fee: + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: amount is the amount of coins to be paid as a fee + nullable: true + gas_limit: + type: string + format: uint64 + title: |- + gas_limit is the maximum gas that can be used in transaction processing + before an out of gas error occurs + payer: + type: string + description: |- + if unset, the first signer is responsible for paying the fees. If set, the + specified account must pay the fees. the payer must be a tx signer (and + thus have signed this field in AuthInfo). setting this field does *not* + change the ordering of required signers for the transaction. + granter: + type: string + title: |- + if set, the fee payer (either the first signer or the value of the payer + field) requests that a fee grant be used to pay fees instead of the fee + payer's own balance. If an appropriate fee grant does not exist or the + chain does not support fee grants, this will fail + description: |- + Fee includes the amount of coins paid in fees and the maximum + gas to be used by the transaction. The ratio yields an effective "gasprice", + which must be above some minimum to be accepted into the mempool. + additionalProperties: false + cosmos.tx.v1beta1.GetBlockWithTxsResponse: + type: object + properties: + txs: + type: array + items: + type: object + $ref: '#/components/schemas/cosmos.tx.v1beta1.Tx' + description: txs are the transactions in the block. + nullable: true + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + nullable: true + title: Data contains the set of transactions included in the block + nullable: true + additionalProperties: false + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + nullable: true + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + nullable: true + additionalProperties: false + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + nullable: true + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + nullable: true + additionalProperties: false + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a + block in the blockchain, + + including all blockchain data structures and the rules of + the application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the previous + block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error + condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the signature is + for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: CommitSig is a part of the Vote included in a Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was committed by a + set of validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use with + Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + proposer: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use with + Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: PublicKey defines the keys available for use with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + nullable: true + additionalProperties: false + additionalProperties: false + nullable: true + nullable: true + additionalProperties: false + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: CommitSig is a part of the Vote included in a Commit. + additionalProperties: false + nullable: true + description: Commit contains the evidence that a block was committed by a set of validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs + method. + additionalProperties: false + cosmos.tx.v1beta1.GetTxResponse: + type: object + properties: + tx: + $ref: '#/components/schemas/cosmos.tx.v1beta1.Tx' + description: tx is the queried transaction. + nullable: true + tx_response: + description: tx_response is the queried TxResponses. + type: object + properties: + height: + type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: Result bytes, if any. + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + additionalProperties: false + nullable: true + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + additionalProperties: false + description: |- + Events contains a slice of Event objects that were emitted during some + execution. + nullable: true + description: ABCIMessageLog defines a structure containing an indexed tx ABCI message log. + additionalProperties: false + description: The output of the application's logger (typed). May be non-deterministic. + nullable: true + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + description: The request transaction bytes. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + timestamp: + type: string + description: |- + Time of the previous block. For heights > 1, it's the weighted median of + the timestamps of the valid votes in the block.LastCommit. For height == 1, + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + additionalProperties: false + nullable: true + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + additionalProperties: false + description: |- + Events defines all the events emitted by processing a transaction. Note, + these events include those emitted by processing all the messages and those + emitted from the ante. Whereas Logs contains the events, with + additional metadata, emitted only by processing the messages. + nullable: true + nullable: true + description: GetTxResponse is the response type for the Service.GetTx method. + additionalProperties: false + cosmos.tx.v1beta1.GetTxsEventResponse: + type: object + properties: + txs: + type: array + items: + type: object + $ref: '#/components/schemas/cosmos.tx.v1beta1.Tx' + description: txs is the list of queried transactions. + nullable: true + tx_responses: + type: array + items: + type: object + properties: + height: + type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: Result bytes, if any. + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + additionalProperties: false + nullable: true + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + additionalProperties: false + description: |- + Events contains a slice of Event objects that were emitted during some + execution. + nullable: true + description: ABCIMessageLog defines a structure containing an indexed tx ABCI message log. + additionalProperties: false + description: The output of the application's logger (typed). May be non-deterministic. + nullable: true + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + description: The request transaction bytes. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + timestamp: + type: string + description: |- + Time of the previous block. For heights > 1, it's the weighted median of + the timestamps of the valid votes in the block.LastCommit. For height == 1, + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + additionalProperties: false + nullable: true + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + additionalProperties: false + description: |- + Events defines all the events emitted by processing a transaction. Note, + these events include those emitted by processing all the messages and those + emitted from the ante. Whereas Logs contains the events, with + additional metadata, emitted only by processing the messages. + nullable: true + description: |- + TxResponse defines a structure containing relevant tx data and metadata. The + tags are stringified and the log is JSON decoded. + description: tx_responses is the list of queried TxResponses. + nullable: true + pagination: + description: |- + pagination defines a pagination for the response. + Deprecated post v0.46.x: use total instead. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + total: + type: string + format: uint64 + title: total is total number of results available + description: |- + GetTxsEventResponse is the response type for the Service.TxsByEvents + RPC method. + additionalProperties: false + cosmos.tx.v1beta1.ModeInfo: + type: object + properties: + single: + title: single represents a single signer + type: object + properties: + mode: + title: mode is the signing mode of the single signer + type: string + enum: + - SIGN_MODE_UNSPECIFIED + - SIGN_MODE_DIRECT + - SIGN_MODE_TEXTUAL + - SIGN_MODE_DIRECT_AUX + - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 + default: SIGN_MODE_UNSPECIFIED + description: |- + SignMode represents a signing mode with its own security guarantees. + + This enum should be considered a registry of all known sign modes + in the Cosmos ecosystem. Apps are not expected to support all known + sign modes. Apps that would like to support custom sign modes are + encouraged to open a small PR against this file to add a new case + to this SignMode enum describing their sign mode so that different + apps have a consistent version of this enum. + + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected. + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx. + - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some + human-readable textual representation on top of the binary representation + from SIGN_MODE_DIRECT. + + Since: cosmos-sdk 0.50 + - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not + require signers signing over other signers' `signer_info`. + + Since: cosmos-sdk 0.46 + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future. + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + but is not implemented on the SDK by default. To enable EIP-191, you need + to pass a custom `TxConfig` that has an implementation of + `SignModeHandler` for EIP-191. The SDK may decide to fully support + EIP-191 in the future. + + Since: cosmos-sdk 0.45.2 + nullable: true + nullable: true + additionalProperties: false + multi: + $ref: '#/components/schemas/cosmos.tx.v1beta1.ModeInfo.Multi' + title: multi represents a nested multisig signer + nullable: true + description: ModeInfo describes the signing mode of a single or nested multisig signer. + additionalProperties: false + cosmos.tx.v1beta1.ModeInfo.Multi: + type: object + properties: + bitarray: + title: bitarray specifies which keys within the multisig are signing + type: object + properties: + extra_bits_stored: + type: integer + format: int64 + elems: + type: string + format: byte + nullable: true + description: |- + CompactBitArray is an implementation of a space efficient bit array. + This is used to ensure that the encoded data takes up a minimal amount of + space after proto encoding. + This is not thread safe, and is not intended for concurrent usage. + nullable: true + additionalProperties: false + mode_infos: + type: array + items: + type: object + $ref: '#/components/schemas/cosmos.tx.v1beta1.ModeInfo' + title: |- + mode_infos is the corresponding modes of the signers of the multisig + which could include nested multisig public keys + nullable: true + title: Multi is the mode info for a multisig public key + additionalProperties: false + cosmos.tx.v1beta1.ModeInfo.Single: + type: object + properties: + mode: + title: mode is the signing mode of the single signer + type: string + enum: + - SIGN_MODE_UNSPECIFIED + - SIGN_MODE_DIRECT + - SIGN_MODE_TEXTUAL + - SIGN_MODE_DIRECT_AUX + - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 + default: SIGN_MODE_UNSPECIFIED + description: |- + SignMode represents a signing mode with its own security guarantees. + + This enum should be considered a registry of all known sign modes + in the Cosmos ecosystem. Apps are not expected to support all known + sign modes. Apps that would like to support custom sign modes are + encouraged to open a small PR against this file to add a new case + to this SignMode enum describing their sign mode so that different + apps have a consistent version of this enum. + + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected. + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx. + - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some + human-readable textual representation on top of the binary representation + from SIGN_MODE_DIRECT. + + Since: cosmos-sdk 0.50 + - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not + require signers signing over other signers' `signer_info`. + + Since: cosmos-sdk 0.46 + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future. + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + but is not implemented on the SDK by default. To enable EIP-191, you need + to pass a custom `TxConfig` that has an implementation of + `SignModeHandler` for EIP-191. The SDK may decide to fully support + EIP-191 in the future. + + Since: cosmos-sdk 0.45.2 + nullable: true + title: |- + Single is the mode info for a single signer. It is structured as a message + to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the + future + additionalProperties: false + cosmos.tx.v1beta1.OrderBy: + type: string + enum: + - ORDER_BY_UNSPECIFIED + - ORDER_BY_ASC + - ORDER_BY_DESC + default: ORDER_BY_UNSPECIFIED + description: >- + - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy + defaults + + to ASC in this case. + - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order + - ORDER_BY_DESC: ORDER_BY_DESC defines descending order + title: OrderBy defines the sorting order + cosmos.tx.v1beta1.SignerInfo: + type: object + properties: + public_key: + description: |- + public_key is the public key of the signer. It is optional for accounts + that already exist in state. If unset, the verifier can use the required \ + signer address for this position and lookup the public key. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + mode_info: + $ref: '#/components/schemas/cosmos.tx.v1beta1.ModeInfo' + title: |- + mode_info describes the signing mode of the signer and is a nested + structure to support nested multisig pubkey's + nullable: true + sequence: + type: string + format: uint64 + description: |- + sequence is the sequence of the account, which describes the + number of committed transactions signed by a given address. It is used to + prevent replay attacks. + description: |- + SignerInfo describes the public key and signing mode of a single top-level + signer. + cosmos.tx.v1beta1.SimulateRequest: + type: object + properties: + tx: + $ref: '#/components/schemas/cosmos.tx.v1beta1.Tx' + description: |- + tx is the transaction to simulate. + Deprecated. Send raw tx bytes instead. + nullable: true + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + nullable: true + description: |- + SimulateRequest is the request type for the Service.Simulate + RPC method. + cosmos.tx.v1beta1.SimulateResponse: + type: object + properties: + gas_info: + description: gas_info is the information about gas used in the simulation. + type: object + properties: + gas_wanted: + type: string + format: uint64 + description: GasWanted is the maximum units of work we allow this tx to perform. + gas_used: + type: string + format: uint64 + description: GasUsed is the amount of gas actually consumed. + nullable: true + result: + description: result is the result of the simulation. + type: object + properties: + data: + type: string + format: byte + description: |- + Data is any data returned from message or handler execution. It MUST be + length prefixed in order to separate data from multiple message executions. + Deprecated. This field is still populated, but prefer msg_response instead + because it also contains the Msg response typeURL. + log: + type: string + description: Log contains the log information from message or handler execution. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + description: |- + Events contains a slice of Event objects that were emitted during message + or handler execution. + msg_responses: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: msg_responses contains the Msg handler responses type packed in Anys. + nullable: true + description: |- + SimulateResponse is the response type for the + Service.SimulateRPC method. + cosmos.tx.v1beta1.Tip: + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: amount is the amount of the tip + nullable: true + tipper: + type: string + title: tipper is the address of the account paying for the tip + description: Tip is the tip used for meta-transactions. + additionalProperties: false + cosmos.tx.v1beta1.Tx: + type: object + properties: + body: + title: body is the processable content of the transaction + type: object + properties: + messages: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: |- + messages is a list of messages to be executed. The required signers of + those messages define the number and order of elements in AuthInfo's + signer_infos and Tx's signatures. Each required signer address is added to + the list only the first time it occurs. + By convention, the first required signer (usually from the first message) + is referred to as the primary signer and pays the fee for the whole + transaction. + nullable: true + memo: + type: string + description: |- + memo is any arbitrary note/comment to be added to the transaction. + WARNING: in clients, any publicly exposed text should not be called memo, + but should be called `note` instead (see + https://github.com/cosmos/cosmos-sdk/issues/9122). + timeout_height: + type: string + format: uint64 + description: |- + timeout_height is the block height after which this transaction will not + be processed by the chain. + unordered: + type: boolean + description: >- + unordered, when set to true, indicates that the transaction signer(s) + + intend for the transaction to be evaluated and executed in an un-ordered + + fashion. Specifically, the account's nonce will NOT be checked or + + incremented, which allows for fire-and-forget as well as concurrent + + transaction execution. + + + Note, when set to true, the existing 'timeout_timestamp' value must + + be set and will be used to correspond to a timestamp in which the transaction is + deemed + + valid. + + + When true, the sequence value MUST be 0, and any transaction with unordered=true and + a non-zero sequence value will + + be rejected. + + External services that make assumptions about sequence values may need to be updated + because of this. + timeout_timestamp: + type: string + format: date-time + description: |- + timeout_timestamp is the block time after which this transaction will not + be processed by the chain. + + Note, if unordered=true this value MUST be set + and will act as a short-lived TTL in which the transaction is deemed valid + and kept in memory to prevent duplicates. + nullable: true + extension_options: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: |- + extension_options are arbitrary options that can be added by chains + when the default options are not sufficient. If any of these are present + and can't be handled, the transaction will be rejected + nullable: true + non_critical_extension_options: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: |- + extension_options are arbitrary options that can be added by chains + when the default options are not sufficient. If any of these are present + and can't be handled, they will be ignored + nullable: true + description: TxBody is the body of a transaction that all signers sign over. + nullable: true + auth_info: + $ref: '#/components/schemas/cosmos.tx.v1beta1.AuthInfo' + title: |- + auth_info is the authorization related content of the transaction, + specifically signers, signer modes and fee + nullable: true + signatures: + type: array + items: + type: string + format: byte + description: |- + signatures is a list of signatures that matches the length and order of + AuthInfo's signer_infos to allow connecting signature meta information like + public key and signing mode by position. + nullable: true + description: Tx is the standard type used for broadcasting transactions. + additionalProperties: false + cosmos.tx.v1beta1.TxBody: + type: object + properties: + messages: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: |- + messages is a list of messages to be executed. The required signers of + those messages define the number and order of elements in AuthInfo's + signer_infos and Tx's signatures. Each required signer address is added to + the list only the first time it occurs. + By convention, the first required signer (usually from the first message) + is referred to as the primary signer and pays the fee for the whole + transaction. + nullable: true + memo: + type: string + description: |- + memo is any arbitrary note/comment to be added to the transaction. + WARNING: in clients, any publicly exposed text should not be called memo, + but should be called `note` instead (see + https://github.com/cosmos/cosmos-sdk/issues/9122). + timeout_height: + type: string + format: uint64 + description: |- + timeout_height is the block height after which this transaction will not + be processed by the chain. + unordered: + type: boolean + description: >- + unordered, when set to true, indicates that the transaction signer(s) + + intend for the transaction to be evaluated and executed in an un-ordered + + fashion. Specifically, the account's nonce will NOT be checked or + + incremented, which allows for fire-and-forget as well as concurrent + + transaction execution. + + + Note, when set to true, the existing 'timeout_timestamp' value must + + be set and will be used to correspond to a timestamp in which the transaction is deemed + + valid. + + + When true, the sequence value MUST be 0, and any transaction with unordered=true and a + non-zero sequence value will + + be rejected. + + External services that make assumptions about sequence values may need to be updated + because of this. + timeout_timestamp: + type: string + format: date-time + description: |- + timeout_timestamp is the block time after which this transaction will not + be processed by the chain. + + Note, if unordered=true this value MUST be set + and will act as a short-lived TTL in which the transaction is deemed valid + and kept in memory to prevent duplicates. + nullable: true + extension_options: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: |- + extension_options are arbitrary options that can be added by chains + when the default options are not sufficient. If any of these are present + and can't be handled, the transaction will be rejected + nullable: true + non_critical_extension_options: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: |- + extension_options are arbitrary options that can be added by chains + when the default options are not sufficient. If any of these are present + and can't be handled, they will be ignored + nullable: true + description: TxBody is the body of a transaction that all signers sign over. + cosmos.tx.v1beta1.TxDecodeAminoRequest: + type: object + properties: + amino_binary: + type: string + format: byte + nullable: true + description: |- + TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino + RPC method. + additionalProperties: false + cosmos.tx.v1beta1.TxDecodeAminoResponse: + type: object + properties: + amino_json: + type: string + description: |- + TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino + RPC method. + additionalProperties: false + cosmos.tx.v1beta1.TxDecodeRequest: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + nullable: true + description: |- + TxDecodeRequest is the request type for the Service.TxDecode + RPC method. + additionalProperties: false + cosmos.tx.v1beta1.TxDecodeResponse: + type: object + properties: + tx: + $ref: '#/components/schemas/cosmos.tx.v1beta1.Tx' + description: tx is the decoded transaction. + nullable: true + description: |- + TxDecodeResponse is the response type for the + Service.TxDecode method. + additionalProperties: false + cosmos.tx.v1beta1.TxEncodeAminoRequest: + type: object + properties: + amino_json: + type: string + description: |- + TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino + RPC method. + additionalProperties: false + cosmos.tx.v1beta1.TxEncodeAminoResponse: + type: object + properties: + amino_binary: + type: string + format: byte + nullable: true + description: |- + TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino + RPC method. + additionalProperties: false + cosmos.tx.v1beta1.TxEncodeRequest: + type: object + properties: + tx: + $ref: '#/components/schemas/cosmos.tx.v1beta1.Tx' + description: tx is the transaction to encode. + nullable: true + description: |- + TxEncodeRequest is the request type for the Service.TxEncode + RPC method. + cosmos.tx.v1beta1.TxEncodeResponse: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the encoded transaction bytes. + nullable: true + description: |- + TxEncodeResponse is the response type for the + Service.TxEncode method. + additionalProperties: false + cosmos.upgrade.v1beta1.ModuleVersion: + type: object + properties: + name: + type: string + title: name of the app module + version: + type: string + format: uint64 + title: consensus version of the app module + description: ModuleVersion specifies a module and its consensus version. + additionalProperties: false + cosmos.upgrade.v1beta1.Plan: + type: object + properties: + name: + type: string + description: |- + Sets the name for the upgrade. This name will be used by the upgraded + version of the software to apply any special "on-upgrade" commands during + the first BeginBlock method after the upgrade is applied. It is also used + to detect whether a software version can handle a given upgrade. If no + upgrade handler with this name has been set in the software, it will be + assumed that the software is out-of-date when the upgrade Time or Height is + reached and the software will exit. + time: + type: string + format: date-time + description: |- + Deprecated: Time based upgrades have been deprecated. Time based upgrade logic + has been removed from the SDK. + If this field is not empty, an error will be thrown. + nullable: true + height: + type: string + format: int64 + description: The height at which the upgrade must be performed. + info: + type: string + title: |- + Any application specific upgrade info to be included on-chain + such as a git commit that validators could automatically upgrade to + upgraded_client_state: + description: |- + Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been + moved to the IBC module in the sub module 02-client. + If this field is not empty, an error will be thrown. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + description: Plan specifies information about a planned upgrade and when it should occur. + cosmos.upgrade.v1beta1.QueryAppliedPlanResponse: + type: object + properties: + height: + type: string + format: int64 + description: height is the block height at which the plan was applied. + description: |- + QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC + method. + additionalProperties: false + cosmos.upgrade.v1beta1.QueryAuthorityResponse: + type: object + properties: + address: + type: string + title: QueryAuthorityResponse is the response type for Query/Authority + additionalProperties: false + cosmos.upgrade.v1beta1.QueryCurrentPlanResponse: + type: object + properties: + plan: + description: plan is the current upgrade plan. + type: object + properties: + name: + type: string + description: |- + Sets the name for the upgrade. This name will be used by the upgraded + version of the software to apply any special "on-upgrade" commands during + the first BeginBlock method after the upgrade is applied. It is also used + to detect whether a software version can handle a given upgrade. If no + upgrade handler with this name has been set in the software, it will be + assumed that the software is out-of-date when the upgrade Time or Height is + reached and the software will exit. + time: + type: string + format: date-time + description: |- + Deprecated: Time based upgrades have been deprecated. Time based upgrade logic + has been removed from the SDK. + If this field is not empty, an error will be thrown. + height: + type: string + format: int64 + description: The height at which the upgrade must be performed. + info: + type: string + title: |- + Any application specific upgrade info to be included on-chain + such as a git commit that validators could automatically upgrade to + upgraded_client_state: + description: >- + Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has + been + + moved to the IBC module in the sub module 02-client. + + If this field is not empty, an error will be thrown. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + description: |- + QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC + method. + cosmos.upgrade.v1beta1.QueryModuleVersionsResponse: + type: object + properties: + module_versions: + type: array + items: + type: object + properties: + name: + type: string + title: name of the app module + version: + type: string + format: uint64 + title: consensus version of the app module + description: ModuleVersion specifies a module and its consensus version. + description: module_versions is a list of module names with their consensus versions. + nullable: true + description: |- + QueryModuleVersionsResponse is the response type for the Query/ModuleVersions + RPC method. + additionalProperties: false + cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse: + type: object + properties: + upgraded_consensus_state: + type: string + format: byte + nullable: true + description: >- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState + + RPC method. + additionalProperties: false +tags: + - name: auth + - name: authz + - name: bank + - name: base + - name: consensus + - name: distribution + - name: epochs + - name: evidence + - name: feegrant + - name: gov + - name: mint + - name: slashing + - name: staking + - name: tx + - name: upgrade +servers: + - url: https://cosmos-rest.publicnode.com + description: >- + Community-run public endpoint serving Cosmos Hub. Not operated by the Cosmos SDK team, and + running a different SDK version than these pages document. Endpoints for modules the chain + does not include return 501. + - url: http://localhost:1317 + description: Your own node. Requires api.enable in app.toml. diff --git a/sdk/latest/api-reference/transactions.mdx b/sdk/latest/api-reference/transactions.mdx new file mode 100644 index 00000000..bc69d1d2 --- /dev/null +++ b/sdk/latest/api-reference/transactions.mdx @@ -0,0 +1,97 @@ +--- +title: "Sending Transactions" +description: "The envelope around a transaction message, and the three steps that put it on chain." +--- + +The [gRPC Services](/sdk/latest/api-reference/grpc/index) module pages give each transaction message its fields, its signer, and its JSON body. This page covers the envelope those bodies go into. For the model behind messages and transactions, see [Transactions, Messages, and Queries](/sdk/latest/learn/concepts/transactions). + +## The envelope + +A transaction is a wrapper around one or more messages and includes the information needed to authorize and pay for them: + +```json +{ + "body": { + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "cosmos1...", + "to_address": "cosmos1...", + "amount": [{ "denom": "uatom", "amount": "1000000" }] + } + ], + "memo": "", + "timeout_height": "0", + "unordered": false, + "timeout_timestamp": null, + "extension_options": [], + "non_critical_extension_options": [] + }, + "auth_info": { + "signer_infos": [], + "fee": { + "amount": [{ "denom": "uatom", "amount": "5000" }], + "gas_limit": "200000", + "payer": "", + "granter": "" + }, + "tip": null + }, + "signatures": [] +} +``` + +The `messages` array holds exactly what a module page shows under In a transaction. The `@type` field is the type URL, and it selects the handler. Everything else is envelope, and defaults are correct unless stated otherwise: `payer` and `granter` apply to fee grants, `unordered` and `timeout_timestamp` to unordered transactions. + +Several messages can go in one transaction. They execute in order and atomically. + +## The three steps + +Building, signing, and broadcasting are separate operations. Separating them is what allows offline signing. The commands below are the shortest path; [Generating, Signing and Broadcasting Transactions](/sdk/latest/node/txs) covers multisig, offline signing, and the same flow in Go, gRPC, REST, and CosmJS. + +```bash +# 1. Build +simd tx bank send mykey cosmos1recipient... 1000000uatom \ + --chain-id cosmoshub-4 --node https://your-rpc-endpoint:443 \ + --gas auto --gas-adjustment 1.5 --gas-prices 0.005uatom \ + --generate-only > unsigned.json + +# 2. Sign +simd tx sign unsigned.json --from mykey \ + --chain-id cosmoshub-4 --node https://your-rpc-endpoint:443 \ + --output-document signed.json + +# 3. Broadcast +simd tx broadcast signed.json --broadcast-mode sync +``` + +Signing covers the chain ID, account number, and sequence, which is what binds a signature to one chain and one use. Given a node, `sign` fetches the account number and sequence itself; offline signing supplies them with `--offline --account-number --sequence`. + +The key must control the address in the message's signer field. The module pages name that field for every message. See [Setting up the keyring](/sdk/latest/node/keyring) for managing the keys these commands sign with. + +Broadcasting returns a transaction hash, not a result. Query for it: + +```bash +simd query tx <hash> +``` + +A `code` of 0 is success. + +For what gas measures and how the limit and price above are applied, see [Execution Context, Gas, and Events](/sdk/latest/learn/concepts/context-gas-events). + +The API surfaces broadcast directly through `cosmos.tx.v1beta1.Service/BroadcastTx` on gRPC or `POST /cosmos/tx/v1beta1/txs` on REST. Both take the signed transaction as bytes, so building and signing still happen first. + +## Governance-gated messages + +Some messages take `authority` as their signer, meaning the governance module account, which no one holds a key for. They execute only through a passed governance proposal, wrapped in `MsgSubmitProposal`. See [Proposal submission](/sdk/latest/modules/gov/README#proposal-submission) for the deposit and voting periods a proposal has to clear. The module pages flag every one. `MsgUpdateParams` on each module is the common case. + +The address the message needs: + +```bash +grpcurl -plaintext -d '{"name":"gov"}' localhost:9090 \ + cosmos.auth.v1beta1.Query/ModuleAccountByName +``` + +## Related + +The module pages under [gRPC Services](/sdk/latest/api-reference/grpc/index) carry the message list, field tables, signer, and JSON body for every transaction message. diff --git a/sdk/latest/guides/tooling/autocli.mdx b/sdk/latest/guides/tooling/autocli.mdx index f67e1783..b1ece4ed 100644 --- a/sdk/latest/guides/tooling/autocli.mdx +++ b/sdk/latest/guides/tooling/autocli.mdx @@ -10,6 +10,8 @@ title: Writing CLI Commands `autocli` generates CLI commands and flags for each method defined in your gRPC service. By default, it generates a command for each gRPC service method. The commands are named based on the name of the service method. +The [API reference](/sdk/latest/api-reference/index) documents the services the standard modules define, which is what their generated commands call. + For example, given the following protobuf definition for a service: ```protobuf diff --git a/sdk/latest/learn/concepts/cli-grpc-rest.mdx b/sdk/latest/learn/concepts/cli-grpc-rest.mdx index ffd57c08..dba482da 100644 --- a/sdk/latest/learn/concepts/cli-grpc-rest.mdx +++ b/sdk/latest/learn/concepts/cli-grpc-rest.mdx @@ -137,6 +137,8 @@ This collects module options and address codecs and hands them to `AutoCLI`, whi gRPC is the primary programmatic interface for interacting with a Cosmos chain. It uses Protocol Buffers to define strongly typed request and response structures and supports generated clients for many programming languages. +Every query method and transaction message of the standard modules is documented in the [API reference](/sdk/latest/api-reference/index), with a field table and a runnable example for each. + Each module exposes its functionality through two protobuf services: - A `Query` service for read-only access to module state @@ -190,6 +192,8 @@ For more usage examples, see [Interact with the Node](/sdk/latest/node/interact- The Cosmos SDK also exposes a REST API. REST endpoints are not written by hand; they are generated automatically from the same protobuf definitions used by gRPC, using **gRPC-gateway**. +The generated routes for the standard modules, with a request playground for each, are in the [REST reference](/sdk/latest/api-reference/index). + gRPC-gateway reads HTTP annotations in the `.proto` files and generates a reverse proxy that translates REST requests into gRPC calls: ```protobuf diff --git a/sdk/latest/learn/concepts/encoding.mdx b/sdk/latest/learn/concepts/encoding.mdx index 5f6db2bb..c15ac919 100644 --- a/sdk/latest/learn/concepts/encoding.mdx +++ b/sdk/latest/learn/concepts/encoding.mdx @@ -41,7 +41,7 @@ The Cosmos SDK uses protobuf in two encoding modes: **Binary encoding** is the default for everything that participates in consensus: transactions written to blocks, state stored in KV stores, and genesis data. Binary encoding is compact and deterministic. When a transaction is broadcast to the network, it travels as protobuf binary. When a module writes state, it serializes values to protobuf binary before calling `Set` on the store. -**JSON encoding** is used for human-readable output: the [CLI, gRPC-gateway REST endpoints](/sdk/latest/learn/concepts/cli-grpc-rest), and off-chain tooling. The Cosmos SDK uses protobuf's JSON encoding (`ProtoMarshalJSON`) rather than standard Go JSON, which preserves field names from the `.proto` schema and handles special types like `Any` correctly. +**JSON encoding** is used for human-readable output: the [CLI, gRPC-gateway REST endpoints](/sdk/latest/learn/concepts/cli-grpc-rest), and off-chain tooling. The Cosmos SDK uses protobuf's JSON encoding (`ProtoMarshalJSON`) rather than standard Go JSON, which preserves field names from the `.proto` schema and handles special types like `Any` correctly. For the concrete forms these produce on the wire, including the conventions the SDK layers on `string` and `bytes`, see [gRPC services](/sdk/latest/api-reference/grpc/index). It is important to keep in mind that **binary encoding is consensus-critical**. Two validators must produce identical binary bytes for identical data. JSON is only used where humans or external clients need to read the data; it never influences the AppHash. diff --git a/sdk/latest/node/interact-node.mdx b/sdk/latest/node/interact-node.mdx index 8fe2f939..fb46a15f 100644 --- a/sdk/latest/node/interact-node.mdx +++ b/sdk/latest/node/interact-node.mdx @@ -64,6 +64,8 @@ You should see two delegations, the first one made from the `gentx`, and the sec The Protobuf ecosystem developed tools for different use cases, including code-generation from `*.proto` files into various languages. These tools allow the building of clients easily. Often, the client connection (i.e. the transport) can be plugged and replaced very easily. This section explores one of the most popular transports: [gRPC](/sdk/latest/learn/concepts/cli-grpc-rest). +The methods available to call, with a `grpcurl` example for each, are in the [API reference](/sdk/latest/api-reference/index). + Since the code generation library largely depends on your own tech stack, three alternatives are presented: * `grpcurl` for generic debugging and testing, @@ -268,6 +270,8 @@ CosmJS documentation can be found at [Link](https://cosmos.github.io/cosmjs). {/ As described in the [gRPC guide](/sdk/latest/learn/concepts/cli-grpc-rest), all gRPC services on the Cosmos SDK are made available for more convenient REST-based queries through gRPC-gateway. The format of the URL path is based on the Protobuf service method's full-qualified name, but may contain small customizations so that final URLs look more idiomatic. For example, the REST endpoint for the `cosmos.bank.v1beta1.Query/AllBalances` method is `GET /cosmos/bank/v1beta1/balances/{address}`. Request arguments are passed as query parameters. +Rather than deriving each path, the [API reference](/sdk/latest/api-reference/index) lists every generated route for the standard modules. + Note that the REST endpoints are not enabled by default. To enable them, edit the `api` section of your `~/.simapp/config/app.toml` file: ```toml diff --git a/sdk/latest/node/run-node.mdx b/sdk/latest/node/run-node.mdx index 17732ebf..5c925f8c 100644 --- a/sdk/latest/node/run-node.mdx +++ b/sdk/latest/node/run-node.mdx @@ -270,6 +270,7 @@ Your node is now running and producing blocks. You have successfully initialized ## Next steps - [Interact with the node](/sdk/latest/node/interact-node) to send transactions and query state +- [API reference](/sdk/latest/api-reference/index) for every query method and transaction message the standard modules expose - [Generate and sign transactions](/sdk/latest/node/txs) to learn advanced transaction workflows - [Key rotation](/sdk/latest/keys/key-rotation) to understand the consensus key in `priv_validator_key.json` and how a validator replaces it - [Cosmos-KMS and remote signing](/sdk/latest/kms/remote-signing) to move that key off the node entirely \ No newline at end of file diff --git a/sdk/latest/node/txs.mdx b/sdk/latest/node/txs.mdx index 3c4504b1..1ffd3530 100644 --- a/sdk/latest/node/txs.mdx +++ b/sdk/latest/node/txs.mdx @@ -35,6 +35,8 @@ simd tx bank send $MY_VALIDATOR_ADDRESS $RECIPIENT 1000stake --chain-id my-test- This will output the unsigned transaction as JSON in the console. The unsigned transaction can also be saved to a file (to be passed around between signers more easily) by appending `> unsigned_tx.json` to the above command. +For what each field in that JSON means, see [Sending Transactions](/sdk/latest/api-reference/transactions#the-envelope) in the API reference. + ### Signing a Transaction Signing a transaction using the CLI requires the unsigned transaction to be saved in a file. For this example, assume the unsigned transaction is in a file called `unsigned_tx.json` in the current directory (see previous paragraph on how to do that). Then, simply run the following command: diff --git a/sdk/latest/tutorials/example/01-prerequisites.mdx b/sdk/latest/tutorials/example/01-prerequisites.mdx index 23aad9f5..12c390f8 100644 --- a/sdk/latest/tutorials/example/01-prerequisites.mdx +++ b/sdk/latest/tutorials/example/01-prerequisites.mdx @@ -3,7 +3,7 @@ title: Prerequisites description: Install dependencies --- -Before starting the tutorial, make sure you have the following tools installed. +Before starting the tutorial, make sure you have the following tools installed on your machine. <Warning> This tutorial is intended for macOS and Linux systems. Other systems may have additional requirements. @@ -11,12 +11,12 @@ This tutorial is intended for macOS and Linux systems. Other systems may have ad ## Go -The example chain requires Go 1.25 or higher. +The example chain requires Go 1.26 or higher. ```bash go version -# go version go1.25.0 linux/amd64 # Linux -# go version go1.25.0 darwin/arm64 # macOS +# go version go1.26.5 linux/amd64 # Linux +# go version go1.26.5 darwin/arm64 # macOS ``` If Go is not installed, download it from [go.dev/dl](https://go.dev/dl). diff --git a/sdk/latest/tutorials/example/02-quickstart.mdx b/sdk/latest/tutorials/example/02-quickstart.mdx index 32dcf0cb..860293eb 100644 --- a/sdk/latest/tutorials/example/02-quickstart.mdx +++ b/sdk/latest/tutorials/example/02-quickstart.mdx @@ -65,8 +65,8 @@ This shows that the fee to increment the counter is stored as a module parameter ```yaml params: add_cost: - - amount: "100" - denom: stake + - amount: "100" + denom: stake max_add_value: "100" ``` diff --git a/sdk/latest/tutorials/example/03-build-a-module.mdx b/sdk/latest/tutorials/example/03-build-a-module.mdx index 01d82c19..3cfb4059 100644 --- a/sdk/latest/tutorials/example/03-build-a-module.mdx +++ b/sdk/latest/tutorials/example/03-build-a-module.mdx @@ -5,7 +5,7 @@ description: Build a simple counter module from scratch in minutes In [quickstart](/sdk/latest/tutorials/example/02-quickstart), you started a chain and submitted a transaction to increase the counter. In this tutorial, you'll build a simple counter module from scratch. It follows the same overall structure as the full `x/counter`, but uses a stripped-down version so you can focus on the core steps of building and wiring a module yourself. -By the end, you'll have built a working module and wired it into a running chain. For a deeper dive into how modules work in the Cosmos SDK, see [Intro to Modules](/sdk/latest/learn/concepts/modules). +By the end, you'll have built a working module and wired it into a running chain. For a deeper dive into how modules work in the Cosmos SDK, see [Intro to Modules](/sdk/latest/learn/concepts/modules). <Note> Before continuing, you must follow the [Prerequisites guide](/sdk/latest/tutorials/example/01-prerequisites) to make sure everything is installed. @@ -626,7 +626,7 @@ Store the counter keeper on `ExampleApp` so the rest of the app can reference it ```go // counter tutorial app wiring 2: add the counter keeper field below -CounterKeeper *counterkeeper.Keeper +CounterKeeper *counterkeeper.Keeper ``` ### 3. Store Key @@ -719,10 +719,31 @@ Open a second terminal and submit a transaction that adds `4` to the counter: exampled tx counter add 4 --from alice --chain-id demo --yes ``` -If the transaction succeeds, the response should include `code: 0`, which means the chain accepted and executed the transaction without an application error: +If the transaction succeeds, the response should include `code: 0`, which means the chain accepted the +transaction and it passed validation without an application error: -``` +```text code: 0 +codespace: "" +data: "" +events: [] +gas_used: "0" +gas_wanted: "0" +height: "0" +info: "" +logs: [] +raw_log: "" +timestamp: "" +tx: null +txhash: 548D95784704575A347140E05A3ED84A05067DF4AD43F8E6FA20C94FAE8430E0 +``` + +This is the broadcast acknowledgement, returned before the transaction is in a block, so `height: "0"` +and the empty fields are expected rather than a sign of failure. To see the executed result, query the +transaction by its hash: + +```bash +exampled query tx <txhash> ``` ### Query the chain diff --git a/sdk/latest/tutorials/example/04-counter-walkthrough.mdx b/sdk/latest/tutorials/example/04-counter-walkthrough.mdx index e0e158e1..5c308cfd 100644 --- a/sdk/latest/tutorials/example/04-counter-walkthrough.mdx +++ b/sdk/latest/tutorials/example/04-counter-walkthrough.mdx @@ -129,7 +129,12 @@ func (m msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) return nil, sdkerrors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", m.authority, msg.Authority) } - return &types.MsgUpdateParamsResponse{}, m.SetParams(ctx, msg.Params) + + if err := m.SetParams(ctx, msg.Params); err != nil { + return nil, err + } + + return &types.MsgUpdateParamsResponse{}, nil } ``` @@ -141,6 +146,23 @@ authority: authtypes.NewModuleAddress(govtypes.ModuleName).String(), This pattern, storing authority in the keeper and checking it in `MsgServer`, is the standard Cosmos SDK approach to governance-gated configuration. +To point a module at a different authority, `NewKeeper` accepts functional options. `WithAuthority` replaces the default after the keeper is built: + +```go +// x/counter/keeper/keeper.go +type Options func(k *Keeper) + +// WithAuthority sets a custom authority on the module. This allows developers to set accounts other than the +// governance module to control this module's params. +func WithAuthority(authority string) Options { + return func(k *Keeper) { + k.authority = authority + } +} +``` + +Most chains keep the governance default, so `app.go` passes no options. + ## Expected keepers and fee collection @@ -177,6 +199,8 @@ app.CounterKeeper = counterkeeper.NewKeeper( ) ``` +The full signature is `NewKeeper(storeService, cdc, bankKeeper, opts ...Options)`. The trailing options are how you override the default governance authority, covered in [the authority pattern](#the-authority-pattern) above. + ### Try it Submit an add transaction and the configured `AddCost` fee will be charged from the sender: @@ -224,10 +248,6 @@ type Keeper struct { ```go func (k *Keeper) AddCount(ctx context.Context, sender string, amount uint64) (uint64, error) { - if amount >= math.MaxUint64 { - return 0, ErrNumTooLarge - } - params, err := k.GetParams(ctx) if err != nil { return 0, err @@ -237,6 +257,21 @@ func (k *Keeper) AddCount(ctx context.Context, sender string, amount uint64) (ui return 0, ErrExceedsMaxAdd } + count, err := k.GetCount(ctx) + if err != nil { + return 0, err + } + + // Reject adds that would wrap the counter past the top of the uint64 range. + // Written as a subtraction so the check itself cannot overflow. MaxAddValue + // usually keeps amount small, but setting it to 0 disables that cap, so the + // result has to be checked here rather than inferred from the input. + if amount > math.MaxUint64-count { + return 0, ErrNumTooLarge + } + + // Charge the user if add cost is set. All validation happens above, so a + // rejected add never reaches this point. if !params.AddCost.IsZero() { senderAddr, err := sdk.AccAddressFromBech32(sender) if err != nil { @@ -247,11 +282,6 @@ func (k *Keeper) AddCount(ctx context.Context, sender string, amount uint64) (ui } } - count, err := k.GetCount(ctx) - if err != nil { - return 0, err - } - newCount := count + amount if err := k.counter.Set(ctx, newCount); err != nil { return 0, err @@ -271,14 +301,17 @@ func (k *Keeper) AddCount(ctx context.Context, sender string, amount uint64) (ui } ``` +Note the shape of the overflow guard. Go wraps silently on unsigned overflow, so `count + amount` exceeding the `uint64` range would leave the counter holding a smaller number with no error raised. Testing the input alone cannot catch that, because the value that overflows is the sum. Comparing `amount` against `math.MaxUint64 - count` tests the result while keeping the comparison itself inside the range. Any module doing unchecked arithmetic on user-supplied values needs the same treatment. + All the business logic, validation, fee charging, state mutation, events, and telemetry, lives in `AddCount`. The `MsgServer` stays thin: ```go -func (m msgServer) Add(ctx context.Context, req *types.MsgAddRequest) (*types.MsgAddResponse, error) { - newCount, err := m.AddCount(ctx, req.GetSender(), req.GetAdd()) +func (m msgServer) Add(ctx context.Context, request *types.MsgAddRequest) (*types.MsgAddResponse, error) { + newCount, err := m.AddCount(ctx, request.GetSender(), request.GetAdd()) if err != nil { return nil, err } + return &types.MsgAddResponse{UpdatedCount: newCount}, nil } ``` @@ -312,13 +345,14 @@ Rather than returning generic errors, `x/counter` defines named sentinel errors ```go // keeper/errors.go var ( - ErrNumTooLarge = errors.Register("counter", 0, "requested integer to add is too large") - ErrExceedsMaxAdd = errors.Register("counter", 1, "add value exceeds max allowed") - ErrInsufficientFunds = errors.Register("counter", 2, "insufficient funds to pay add cost") + // Codes start at 2: code 0 is reserved for success and code 1 for internal errors. + ErrNumTooLarge = errors.Register("counter", 2, "requested integer to add is too large") + ErrExceedsMaxAdd = errors.Register("counter", 3, "add value exceeds max allowed") + ErrInsufficientFunds = errors.Register("counter", 4, "insufficient funds to pay add cost") ) ``` -Registered errors produce structured error responses on-chain that clients can match against by code, not just by string. Each error code must be unique within the module and greater than zero (code `1` is reserved for internal SDK errors). To check whether an error is of a specific sentinel type, use `errors.Is(err, ErrInsufficientFunds)` — this works correctly even when the error has been wrapped with additional context via `errorsmod.Wrap` or `errorsmod.Wrapf`. +Registered errors produce structured error responses on-chain that clients can match against by code, not just by string. Each error code must be unique within the module and start at `2`: code `0` is the ABCI success code, and code `1` is reserved for internal errors. Registering an error as code `0` is accepted silently, but a transaction failing with it reports `code: 0`, which every client reads as success. To check whether an error is of a specific sentinel type, use `errors.Is(err, ErrInsufficientFunds)`. This works correctly even when the error has been wrapped with additional context via `errorsmod.Wrap` or `errorsmod.Wrapf`. All validation — both stateless field checks and stateful business logic checks — should live in the `msgServer` method or the keeper function it calls. The older `ValidateBasic` method on message types is deprecated: prefer performing all validation inside the message server. If your message type does implement `ValidateBasic`, the SDK still calls it for backward compatibility, but new modules should not rely on it. @@ -380,15 +414,23 @@ func (a AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Service: "example.counter.Query", EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ - {RpcMethod: "Count", Use: "count", Short: "Query the current counter value"}, + { + RpcMethod: "Count", + Use: "count", + Short: "Query the current counter value", + }, }, }, Tx: &autocliv1.ServiceCommandDescriptor{ Service: "example.counter.Msg", EnhanceCustomCommand: true, RpcCommandOptions: []*autocliv1.RpcCommandOptions{ - {RpcMethod: "Add", Use: "add [amount]", Short: "Add to the counter", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "add"}}}, + { + RpcMethod: "Add", + Use: "add [amount]", + Short: "Add to the counter", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "add"}}, + }, }, }, } @@ -554,7 +596,7 @@ s.bankKeeper.SendCoinsFromAccountToModuleFn = func(...) error { ## Gas -`minimum-gas-prices` in `app.toml` sets the minimum fee a node requires before it will accept and relay a transaction. The local dev chain started by `make start` leaves this empty, so transactions are accepted with no fee beyond the `AddCost` module parameter. +`minimum-gas-prices` in `app.toml` sets the minimum fee a node requires before it will accept and relay a transaction. The local dev chain started by `make start` sets this to `0stake`, so transactions are accepted with no fee beyond the `AddCost` module parameter. To require a minimum network fee, set it in `app.toml`: diff --git a/sdk/latest/tutorials/example/05-run-and-test.mdx b/sdk/latest/tutorials/example/05-run-and-test.mdx index 1f36cf62..b272fc87 100644 --- a/sdk/latest/tutorials/example/05-run-and-test.mdx +++ b/sdk/latest/tutorials/example/05-run-and-test.mdx @@ -34,32 +34,62 @@ make start Re-running `make start` resets state automatically. There is no separate reset command. -## Localnet (multi-validator) +## Localnet (multi-node) -Use localnet when you want a setup that is closer to a real network. It runs multiple validators in Docker so you can test multi-node behavior locally. +Localnet runs four nodes in Docker to give you a setup closer to a real network than the single-node chain. `scripts/localnet/init.sh` creates a genesis transaction for `node0` only, so the network is **one validator plus three full nodes**, not four validators. The chain ID is `example-localnet`, and each node has a single key named `validator` rather than the `alice` and `bob` accounts used by `make start`. -For a multi-validator setup using Docker: +Before you begin, note that this section needs Docker running, and that the following host ports must be free: `26656`, `26657`, `1317`, `9090` for `node0`, then `26666`, `26667`, `1318`, `9091` for `node1`, `26676`, `26677`, `1319`, `9092` for `node2`, and `26686`, `26687`, `1320`, `9093` for `node3`. ```bash -# Initialize localnet configuration +# Build the node image and initialize four node directories under build/localnet. +# Takes several minutes the first time, since it compiles the chain in Docker. make localnet-init -# Start all validators +# Start all four nodes make localnet-start -# View logs +# Follow the logs. This does not exit on its own; press Ctrl+C to stop following make localnet-logs # Stop make localnet-stop -# Clean all localnet data +# Delete build/localnet immediately, without confirming make localnet-clean ``` +### Confirm the network is healthy + +Each node exposes its own RPC port. Check that every node has found the other three and that they are advancing together: + +```bash +for port in 26657 26667 26677 26687; do + curl -s http://localhost:$port/status | grep -o '"latest_block_height":"[0-9]*"' + curl -s http://localhost:$port/net_info | grep -o '"n_peers":"[0-9]*"' +done +``` + +Each node should report `"n_peers":"3"` and a block height that climbs on repeated calls. + +### Send a transaction + +The localnet uses a different chain ID and key name than `make start`, so the commands in the CLI reference below need adjusting. Run them inside a container: + +```bash +docker exec node0 exampled tx counter add 7 \ + --from validator --chain-id example-localnet \ + --keyring-backend test --home /data/node0 --yes +``` + +Then confirm the state replicated by querying a different node: + +```bash +docker exec node2 exampled query counter count --home /data/node2 +``` + ## CLI reference -Once the chain is running, these are the core [CLI](/sdk/latest/learn/concepts/cli-grpc-rest#cli) commands you'll use to inspect state and submit transactions. +Once the chain is running, these are the core [CLI](/sdk/latest/learn/concepts/cli-grpc-rest#cli) commands you'll use to inspect state and submit transactions. For the gRPC and REST equivalents of every query and transaction the standard modules define, see the [API reference](/sdk/latest/api-reference/index). ### Query commands @@ -87,10 +117,86 @@ exampled tx counter add 10 --from alice --chain-id demo --yes # Add with a gas limit exampled tx counter add 10 --from alice --chain-id demo --gas 200000 --yes -# Update module parameters (requires governance authority) -exampled tx counter update-params --from alice --chain-id demo --yes ``` +### Updating module parameters + +Counter params are governance-gated. `MsgUpdateParams` accepts only the gov module address as its +authority, so there is no direct CLI command for it: signing `update-params` with a user key such as +`alice` always fails with `ErrInvalidSigner`. Params change through a governance proposal instead. + +Look up the gov module address for your chain, which is the only valid authority: + +```bash +exampled query auth module-account gov +``` + +Write a `proposal.json` containing the message, using that address as `authority`. On the local `demo` +chain the value is `cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn`: + +```json +{ + "messages": [ + { + "@type": "/example.counter.MsgUpdateParams", + "authority": "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn", + "params": { + "max_add_value": "50", + "add_cost": [{"denom": "stake", "amount": "200"}] + } + } + ], + "metadata": "ipfs://CID", + "deposit": "10000000stake", + "title": "Update counter params", + "summary": "Set max_add_value to 50 and add_cost to 200stake" +} +``` + +The `deposit` must meet the chain's `min_deposit`, which is `10000000stake` locally. Check it with +`exampled query gov params`. Then submit and vote: + +```bash +exampled tx gov submit-proposal proposal.json --from alice --chain-id demo --yes +exampled tx gov vote 1 yes --from alice --chain-id demo --yes +``` + +Check progress with `exampled query gov proposals`. + +<Note> +The local chain uses the default 48 hour `voting_period`, so a proposal submitted this way sits in +`PROPOSAL_STATUS_VOTING_PERIOD` for two days and the params do not change during a normal dev session. +</Note> + +To watch a param change actually take effect locally, shorten the voting period. Editing +`genesis.json` before `make start` does not work, because `scripts/local_node.sh` deletes the whole +home directory on every run. Let `make start` create the chain first, then stop it and edit in place: + +```bash +# 1. Let make start create ~/.exampleapp, then stop it with Ctrl+C +make start + +# 2. Lower both governance voting periods in the generated genesis. +# app_state.gov.params.voting_period, for example "20s" +# app_state.gov.params.expedited_voting_period must stay strictly shorter, for example "10s" +vi ~/.exampleapp/config/genesis.json + +# 3. Wipe block history so the edited genesis is re-read, keeping keys and config +exampled comet unsafe-reset-all + +# 4. Start the node directly. Do not use make start again, it would delete your edit +exampled start +``` + +Submit and vote as above, wait out the shortened period, and the proposal reaches +`PROPOSAL_STATUS_PASSED` and `exampled query counter params` reflects the new values. + +`exampled tx gov draft-proposal` can generate a skeleton, but it is an interactive terminal picker rather +than a scriptable command. Its top-level list offers only `text`, `community-pool-spend`, +`software-upgrade`, `cancel-software-upgrade`, and `other`, and choosing `other` opens a scroll-only list +of fully qualified message type URLs that typing does not filter. Writing the JSON by hand, as above, is +the more direct path. + ### Useful flags These flags are the ones you'll use most often while iterating locally. @@ -120,9 +226,9 @@ The most common settings to change during development: | Setting | Default | Description | |---|---|---| -| `minimum-gas-prices` | `"0stake"` | Minimum fee the node accepts before processing a transaction | +| `minimum-gas-prices` | `"0stake"` | Minimum fee the node accepts before processing a transaction. Set by this chain in `exampled/cmd/commands.go`, not by the SDK, whose own default is empty | | `pruning` | `"default"` | How much historical state to keep (`default`, `nothing`, `everything`, `custom`) | -| `api.enable` | `true` | Enables the REST API on port 1317 | +| `api.enable` | `true` after `make start` | Enables the REST API on port 1317. The SDK default is `false`; `scripts/local_node.sh` turns it on for local development | | `grpc.enable` | `true` | Enables the gRPC server on port 9090 | ### config.toml @@ -133,7 +239,7 @@ The settings most likely to change during development: |---|---|---| | `moniker` | `"test"` | Human-readable name for the node | | `log_level` | `"info"` | Log verbosity (`debug`, `info`, `error`) | -| `consensus.timeout_commit` | `"5s"` | How long to wait after a block is committed before starting the next one | +| `consensus.timeout_commit` | `"5s"` | How long to wait after a block is committed before starting the next one. The SDK raises CometBFT's own 1s default to 5s | | `p2p.seeds` | `""` | Seed nodes to connect to on a live network | | `p2p.persistent_peers` | `""` | Peers to maintain permanent connections to | @@ -208,6 +314,12 @@ make test-sim Simulation requires the `sims` build tag, which the Makefile targets handle automatically. +Each of these runs the simulation across 38 built-in seeds, so expect roughly ten minutes per target. The Makefile deliberately uses smaller values than the SDK defaults of 500 blocks and 200 operations per block, which across 38 seeds take hours. To simulate more deeply, override them: + +```bash +make test-sim-full SIM_NUM_BLOCKS=500 SIM_BLOCK_SIZE=200 SIM_TIMEOUT=4h +``` + ## Lint Linting is the quickest way to catch style problems and common code-quality issues before CI or code review does. @@ -228,9 +340,9 @@ make lint-fix Use this table as a quick reference for choosing the right validation command for the kind of change you made. -| Command | What it validates | -|---|---| -| `go test ./x/counter/...` | Keeper, MsgServer, QueryServer in isolation | -| `go test -run TestE2ETestSuite ./tests/...` | Full transaction and query flow on a live node | -| `make test-sim-full` | Non-determinism and invariant violations | -| `make lint` | Code style and static analysis | +| Command | What it validates | Typical runtime | +|---|---|---| +| `go test ./x/counter/...` | Keeper, MsgServer, QueryServer in isolation | seconds | +| `go test -run TestE2ETestSuite ./tests/...` | Full transaction and query flow on a live node | under a minute | +| `make test-sim-full` | Non-determinism and invariant violations | around ten minutes | +| `make lint` | Code style and static analysis | a few minutes | diff --git a/sdk/next/api-reference/grpc/auth.mdx b/sdk/next/api-reference/grpc/auth.mdx new file mode 100644 index 00000000..41e1e868 --- /dev/null +++ b/sdk/next/api-reference/grpc/auth.mdx @@ -0,0 +1,384 @@ +--- +title: "Auth" +description: "gRPC queries and transaction messages defined by the auth module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### Account + +Account returns account details based on address. + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/Account` | +| REST | `GET /cosmos/auth/v1beta1/accounts/{address}` | + +Request `QueryAccountRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | address defines the address to query for. Encoded as cosmos.AddressString. | + +Response `QueryAccountResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `account` | `Any` | account defines the account of the corresponding address. One of: `/cosmos.auth.v1beta1.BaseAccount`. | + +```bash +grpcurl -plaintext -d '{"address":"<string>"}' \ + localhost:9090 cosmos.auth.v1beta1.Query/Account +``` + +### AccountAddressByID + +AccountAddressByID returns account address based on account number. + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/AccountAddressByID` | +| REST | `GET /cosmos/auth/v1beta1/address_by_id/{accountId}` | + +Request `QueryAccountAddressByIDRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `id` | `int64` | Deprecated, use account_id instead id is the account number of the address to be queried. This field should have been an uint64 (like all account numbers), and will be updated to uint64 in a future version of the auth query. Deprecated. | +| `account_id` | `uint64` | account_id is the account number of the address to be queried. | + +Response `QueryAccountAddressByIDResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `account_address` | `string` | Encoded as cosmos.AddressString. | + +```bash +grpcurl -plaintext -d '{"account_id":"1"}' \ + localhost:9090 cosmos.auth.v1beta1.Query/AccountAddressByID +``` + +### AccountInfo + +AccountInfo queries account info which is common to all account types. + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/AccountInfo` | +| REST | `GET /cosmos/auth/v1beta1/account_info/{address}` | + +Request `QueryAccountInfoRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | address is the account address string. Encoded as cosmos.AddressString. | + +Response `QueryAccountInfoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `info` | [`BaseAccount`](#cosmos-auth-v1beta1-baseaccount) | info is the account info which is represented by BaseAccount. | + +```bash +grpcurl -plaintext -d '{"address":"<string>"}' \ + localhost:9090 cosmos.auth.v1beta1.Query/AccountInfo +``` + +### Accounts + +Accounts returns all the existing accounts. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/Accounts` | +| REST | `GET /cosmos/auth/v1beta1/accounts` | + +Request `QueryAccountsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryAccountsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `accounts` | `Any`[] | accounts are the existing accounts One of: `/cosmos.auth.v1beta1.BaseAccount`. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.auth.v1beta1.Query/Accounts +``` + +### AddressBytesToString + +AddressBytesToString converts Account Address bytes to string + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/AddressBytesToString` | +| REST | `GET /cosmos/auth/v1beta1/bech32/{addressBytes}` | + +Request `AddressBytesToStringRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address_bytes` | `bytes` | | + +Response `AddressBytesToStringResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `address_string` | `string` | | + +```bash +grpcurl -plaintext -d '{"address_bytes":""}' \ + localhost:9090 cosmos.auth.v1beta1.Query/AddressBytesToString +``` + +### AddressStringToBytes + +AddressStringToBytes converts Address string to bytes + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/AddressStringToBytes` | +| REST | `GET /cosmos/auth/v1beta1/bech32/{addressString}` | + +Request `AddressStringToBytesRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address_string` | `string` | | + +Response `AddressStringToBytesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `address_bytes` | `bytes` | | + +```bash +grpcurl -plaintext -d '{"address_string":"<string>"}' \ + localhost:9090 cosmos.auth.v1beta1.Query/AddressStringToBytes +``` + +### Bech32Prefix + +Bech32Prefix queries bech32Prefix + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/Bech32Prefix` | +| REST | `GET /cosmos/auth/v1beta1/bech32` | + +Request `Bech32PrefixRequest`: + +This message has no fields. + +Response `Bech32PrefixResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `bech32_prefix` | `string` | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.auth.v1beta1.Query/Bech32Prefix +``` + +### ModuleAccountByName + +ModuleAccountByName returns the module account info by module name + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/ModuleAccountByName` | +| REST | `GET /cosmos/auth/v1beta1/module_accounts/{name}` | + +Request `QueryModuleAccountByNameRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `name` | `string` | | + +Response `QueryModuleAccountByNameResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `account` | `Any` | One of: `/cosmos.auth.v1beta1.ModuleAccount`. | + +```bash +grpcurl -plaintext -d '{"name":"<string>"}' \ + localhost:9090 cosmos.auth.v1beta1.Query/ModuleAccountByName +``` + +### ModuleAccounts + +ModuleAccounts returns all the existing module accounts. + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/ModuleAccounts` | +| REST | `GET /cosmos/auth/v1beta1/module_accounts` | + +Request `QueryModuleAccountsRequest`: + +This message has no fields. + +Response `QueryModuleAccountsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `accounts` | `Any`[] | One of: `/cosmos.auth.v1beta1.ModuleAccount`. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.auth.v1beta1.Query/ModuleAccounts +``` + +### Params + +Params queries all parameters. + +| | | +| --- | --- | +| gRPC | `cosmos.auth.v1beta1.Query/Params` | +| REST | `GET /cosmos/auth/v1beta1/params` | + +Request `QueryParamsRequest`: + +This message has no fields. + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `params` | [`Params`](#cosmos-auth-v1beta1-params) | params defines the parameters of the module. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.auth.v1beta1.Query/Params +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/next/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/next/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/next/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### UpdateParams + +UpdateParams defines a (governance) operation for updating the x/auth module parameters. The authority defaults to the x/gov module account. + +| | | +| --- | --- | +| Type URL | `/cosmos.auth.v1beta1.MsgUpdateParams` | +| Handler | `cosmos.auth.v1beta1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/x/auth/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `params` | [`Params`](#cosmos-auth-v1beta1-params) | params defines the x/auth parameters to update. NOTE: All parameters must be supplied. | + +In a transaction: + +```json +{ + "@type": "/cosmos.auth.v1beta1.MsgUpdateParams", + "authority": "<string>", + "params": { + "max_memo_characters": "1", + "tx_sig_limit": "1", + "tx_size_cost_per_byte": "1", + "sig_verify_cost_ed25519": "1", + "sig_verify_cost_secp256k1": "1", + "sig_verify_cost_mldsa65": "1" + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.auth.v1beta1.BaseAccount + +BaseAccount defines a base account type. It contains all the necessary fields for basic account functionality. Any custom account type should extend this type for additional functionality (e.g. vesting). + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | Encoded as cosmos.AddressString. | +| `pub_key` | `Any` | | +| `account_number` | `uint64` | | +| `sequence` | `uint64` | | + +### cosmos.auth.v1beta1.Params + +Params defines the parameters for the auth module. + +| Field | Type | Description | +| --- | --- | --- | +| `max_memo_characters` | `uint64` | | +| `tx_sig_limit` | `uint64` | | +| `tx_size_cost_per_byte` | `uint64` | | +| `sig_verify_cost_ed25519` | `uint64` | | +| `sig_verify_cost_secp256k1` | `uint64` | | +| `sig_verify_cost_mldsa65` | `uint64` | | + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + + diff --git a/sdk/next/api-reference/grpc/authz.mdx b/sdk/next/api-reference/grpc/authz.mdx new file mode 100644 index 00000000..8868d2b4 --- /dev/null +++ b/sdk/next/api-reference/grpc/authz.mdx @@ -0,0 +1,279 @@ +--- +title: "Authz" +description: "gRPC queries and transaction messages defined by the authz module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### GranteeGrants + +GranteeGrants returns a list of `GrantAuthorization` by grantee. + +| | | +| --- | --- | +| gRPC | `cosmos.authz.v1beta1.Query/GranteeGrants` | +| REST | `GET /cosmos/authz/v1beta1/grants/grantee/{grantee}` | + +Request `QueryGranteeGrantsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `grantee` | `string` | Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines a pagination for the request. | + +Response `QueryGranteeGrantsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `grants` | [`GrantAuthorization`](#cosmos-authz-v1beta1-grantauthorization)[] | grants is a list of grants granted to the grantee. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines a pagination for the response. | + +```bash +grpcurl -plaintext -d '{"grantee":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.authz.v1beta1.Query/GranteeGrants +``` + +### GranterGrants + +GranterGrants returns list of `GrantAuthorization`, granted by granter. + +| | | +| --- | --- | +| gRPC | `cosmos.authz.v1beta1.Query/GranterGrants` | +| REST | `GET /cosmos/authz/v1beta1/grants/granter/{granter}` | + +Request `QueryGranterGrantsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines a pagination for the request. | + +Response `QueryGranterGrantsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `grants` | [`GrantAuthorization`](#cosmos-authz-v1beta1-grantauthorization)[] | grants is a list of grants granted by the granter. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines a pagination for the response. | + +```bash +grpcurl -plaintext -d '{"granter":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.authz.v1beta1.Query/GranterGrants +``` + +### Grants + +Returns list of `Authorization`, granted to the grantee by the granter. + +| | | +| --- | --- | +| gRPC | `cosmos.authz.v1beta1.Query/Grants` | +| REST | `GET /cosmos/authz/v1beta1/grants` | + +Request `QueryGrantsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | Encoded as cosmos.AddressString. | +| `grantee` | `string` | Encoded as cosmos.AddressString. | +| `msg_type_url` | `string` | Optional, msg_type_url, when set, will query only grants matching given msg type. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines a pagination for the request. | + +Response `QueryGrantsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `grants` | [`Grant`](#cosmos-authz-v1beta1-grant)[] | authorizations is a list of grants granted for grantee by granter. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines a pagination for the response. | + +```bash +grpcurl -plaintext -d '{"granter":"<string>","grantee":"<string>","msg_type_url":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.authz.v1beta1.Query/Grants +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/next/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/next/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/next/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### Exec + +Exec attempts to execute the provided messages using authorizations granted to the grantee. Each message should have only one signer corresponding to the granter of the authorization. + +| | | +| --- | --- | +| Type URL | `/cosmos.authz.v1beta1.MsgExec` | +| Handler | `cosmos.authz.v1beta1.Msg/Exec` | +| Signer | `grantee` | +| Amino name | `cosmos-sdk/MsgExec` | + +| Field | Type | Description | +| --- | --- | --- | +| `grantee` | `string` | Encoded as cosmos.AddressString. | +| `msgs` | `Any`[] | Execute Msg. The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) triple and validate it. Accepts any message implementing cosmos.base.v1beta1.Msg. | + +In a transaction: + +```json +{ + "@type": "/cosmos.authz.v1beta1.MsgExec", + "grantee": "<string>", + "msgs": [ + { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + } + ] +} +``` + +Response `MsgExecResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `results` | `bytes`[] | | + +### Grant + +Grant grants the provided authorization to the grantee on the granter's account with the provided expiration time. If there is already a grant for the given (granter, grantee, Authorization) triple, then the grant will be overwritten. + +| | | +| --- | --- | +| Type URL | `/cosmos.authz.v1beta1.MsgGrant` | +| Handler | `cosmos.authz.v1beta1.Msg/Grant` | +| Signer | `granter` | +| Amino name | `cosmos-sdk/MsgGrant` | + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | Encoded as cosmos.AddressString. | +| `grantee` | `string` | Encoded as cosmos.AddressString. | +| `grant` | [`Grant`](#cosmos-authz-v1beta1-grant) | | + +In a transaction: + +```json +{ + "@type": "/cosmos.authz.v1beta1.MsgGrant", + "granter": "<string>", + "grantee": "<string>", + "grant": { + "authorization": { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + }, + "expiration": "<RFC 3339 timestamp>" + } +} +``` + +Response `MsgGrantResponse`: + +This message has no fields. + +### Revoke + +Revoke revokes any authorization corresponding to the provided method name on the granter's account that has been granted to the grantee. + +| | | +| --- | --- | +| Type URL | `/cosmos.authz.v1beta1.MsgRevoke` | +| Handler | `cosmos.authz.v1beta1.Msg/Revoke` | +| Signer | `granter` | +| Amino name | `cosmos-sdk/MsgRevoke` | + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | Encoded as cosmos.AddressString. | +| `grantee` | `string` | Encoded as cosmos.AddressString. | +| `msg_type_url` | `string` | | + +In a transaction: + +```json +{ + "@type": "/cosmos.authz.v1beta1.MsgRevoke", + "granter": "<string>", + "grantee": "<string>", + "msg_type_url": "<string>" +} +``` + +Response `MsgRevokeResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.authz.v1beta1.Grant + +Grant gives permissions to execute the provide method with expiration time. + +| Field | Type | Description | +| --- | --- | --- | +| `authorization` | `Any` | One of: `/cosmos.authz.v1beta1.GenericAuthorization`, `/cosmos.bank.v1beta1.SendAuthorization`, `/cosmos.staking.v1beta1.StakeAuthorization`. | +| `expiration` | `Timestamp` | time when the grant will expire and will be pruned. If null, then the grant doesn't have a time expiration (other conditions in `authorization` may apply to invalidate the grant) | + +### cosmos.authz.v1beta1.GrantAuthorization + +GrantAuthorization extends a grant with both the addresses of the grantee and granter. It is used in genesis.proto and query.proto + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | Encoded as cosmos.AddressString. | +| `grantee` | `string` | Encoded as cosmos.AddressString. | +| `authorization` | `Any` | One of: `/cosmos.authz.v1beta1.GenericAuthorization`, `/cosmos.bank.v1beta1.SendAuthorization`, `/cosmos.staking.v1beta1.StakeAuthorization`. | +| `expiration` | `Timestamp` | | + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + + diff --git a/sdk/next/api-reference/grpc/autocli.mdx b/sdk/next/api-reference/grpc/autocli.mdx new file mode 100644 index 00000000..b65bc77e --- /dev/null +++ b/sdk/next/api-reference/grpc/autocli.mdx @@ -0,0 +1,48 @@ +--- +title: "Autocli" +description: "gRPC queries and transaction messages defined by the autocli module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### AppOptions + +AppOptions returns the autocli options for all of the modules in an app. + +| | | +| --- | --- | +| gRPC | `cosmos.autocli.v1.Query/AppOptions` | + +Request `AppOptionsRequest`: + +This message has no fields. + +Response `AppOptionsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `module_options` | `map<string, ModuleOptions>` | module_options is a map of module name to autocli module options. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.autocli.v1.Query/AppOptions +``` + diff --git a/sdk/next/api-reference/grpc/bank.mdx b/sdk/next/api-reference/grpc/bank.mdx new file mode 100644 index 00000000..b67e41ef --- /dev/null +++ b/sdk/next/api-reference/grpc/bank.mdx @@ -0,0 +1,673 @@ +--- +title: "Bank" +description: "gRPC queries and transaction messages defined by the bank module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### AllBalances + +AllBalances queries the balance of all coins for a single account. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/AllBalances` | +| REST | `GET /cosmos/bank/v1beta1/balances/{address}` | + +Request `QueryAllBalancesRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | address is the address to query balances for. Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | +| `resolve_denom` | `bool` | resolve_denom is the flag to resolve the denom into a human-readable form from the metadata. | + +Response `QueryAllBalancesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `balances` | [`Coin`](#cosmos-base-v1beta1-coin)[] | balances is the balances of all the coins. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"address":"<string>","pagination":{"limit":"1"},"resolve_denom":false}' \ + localhost:9090 cosmos.bank.v1beta1.Query/AllBalances +``` + +### Balance + +Balance queries the balance of a single coin for a single account. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/Balance` | +| REST | `GET /cosmos/bank/v1beta1/balances/{address}/by_denom` | + +Request `QueryBalanceRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | address is the address to query balances for. Encoded as cosmos.AddressString. | +| `denom` | `string` | denom is the coin denom to query balances for. | + +Response `QueryBalanceResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `balance` | [`Coin`](#cosmos-base-v1beta1-coin) | balance is the balance of the coin. | + +```bash +grpcurl -plaintext -d '{"address":"<string>","denom":"<string>"}' \ + localhost:9090 cosmos.bank.v1beta1.Query/Balance +``` + +### DenomMetadata + +DenomMetadata queries the client metadata of a given coin denomination. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/DenomMetadata` | +| REST | `GET /cosmos/bank/v1beta1/denoms_metadata/{denom}` | + +Request `QueryDenomMetadataRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | denom is the coin denom to query the metadata for. | + +Response `QueryDenomMetadataResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `metadata` | [`Metadata`](#cosmos-bank-v1beta1-metadata) | metadata describes and provides all the client information for the requested token. | + +```bash +grpcurl -plaintext -d '{"denom":"<string>"}' \ + localhost:9090 cosmos.bank.v1beta1.Query/DenomMetadata +``` + +### DenomMetadataByQueryString + +DenomMetadataByQueryString queries the client metadata of a given coin denomination. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/DenomMetadataByQueryString` | +| REST | `GET /cosmos/bank/v1beta1/denoms_metadata_by_query_string` | + +Request `QueryDenomMetadataByQueryStringRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | denom is the coin denom to query the metadata for. | + +Response `QueryDenomMetadataByQueryStringResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `metadata` | [`Metadata`](#cosmos-bank-v1beta1-metadata) | metadata describes and provides all the client information for the requested token. | + +```bash +grpcurl -plaintext -d '{"denom":"<string>"}' \ + localhost:9090 cosmos.bank.v1beta1.Query/DenomMetadataByQueryString +``` + +### DenomOwners + +DenomOwners queries for all account addresses that own a particular token denomination. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/DenomOwners` | +| REST | `GET /cosmos/bank/v1beta1/denom_owners/{denom}` | + +Request `QueryDenomOwnersRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | denom defines the coin denomination to query all account holders for. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDenomOwnersResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `denom_owners` | [`DenomOwner`](#cosmos-bank-v1beta1-denomowner)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"denom":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.bank.v1beta1.Query/DenomOwners +``` + +### DenomOwnersByQuery + +DenomOwnersByQuery queries for all account addresses that own a particular token denomination. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/DenomOwnersByQuery` | +| REST | `GET /cosmos/bank/v1beta1/denom_owners_by_query` | + +Request `QueryDenomOwnersByQueryRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | denom defines the coin denomination to query all account holders for. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDenomOwnersByQueryResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `denom_owners` | [`DenomOwner`](#cosmos-bank-v1beta1-denomowner)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"denom":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.bank.v1beta1.Query/DenomOwnersByQuery +``` + +### DenomsMetadata + +DenomsMetadata queries the client metadata for all registered coin denominations. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/DenomsMetadata` | +| REST | `GET /cosmos/bank/v1beta1/denoms_metadata` | + +Request `QueryDenomsMetadataRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDenomsMetadataResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `metadatas` | [`Metadata`](#cosmos-bank-v1beta1-metadata)[] | metadata provides the client information for all the registered tokens. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.bank.v1beta1.Query/DenomsMetadata +``` + +### Params + +Params queries the parameters of x/bank module. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/Params` | +| REST | `GET /cosmos/bank/v1beta1/params` | + +Request `QueryParamsRequest`: + +This message has no fields. + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `params` | [`Params`](#cosmos-bank-v1beta1-params) | params provides the parameters of the bank module. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.bank.v1beta1.Query/Params +``` + +### SendEnabled + +SendEnabled queries for SendEnabled entries. + +This query only returns denominations that have specific SendEnabled settings. Any denomination that does not have a specific setting will use the default params.default_send_enabled, and will not be returned by this query. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/SendEnabled` | +| REST | `GET /cosmos/bank/v1beta1/send_enabled` | + +Request `QuerySendEnabledRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `denoms` | `string`[] | denoms is the specific denoms you want look up. Leave empty to get all entries. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. This field is only read if the denoms field is empty. | + +Response `QuerySendEnabledResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `send_enabled` | [`SendEnabled`](#cosmos-bank-v1beta1-sendenabled)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. This field is only populated if the denoms field in the request is empty. | + +```bash +grpcurl -plaintext -d '{"denoms":["<string>"],"pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.bank.v1beta1.Query/SendEnabled +``` + +### SpendableBalanceByDenom + +SpendableBalanceByDenom queries the spendable balance of a single denom for a single account. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/SpendableBalanceByDenom` | +| REST | `GET /cosmos/bank/v1beta1/spendable_balances/{address}/by_denom` | + +Request `QuerySpendableBalanceByDenomRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | address is the address to query balances for. Encoded as cosmos.AddressString. | +| `denom` | `string` | denom is the coin denom to query balances for. | + +Response `QuerySpendableBalanceByDenomResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `balance` | [`Coin`](#cosmos-base-v1beta1-coin) | balance is the balance of the coin. | + +```bash +grpcurl -plaintext -d '{"address":"<string>","denom":"<string>"}' \ + localhost:9090 cosmos.bank.v1beta1.Query/SpendableBalanceByDenom +``` + +### SpendableBalances + +SpendableBalances queries the spendable balance of all coins for a single account. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/SpendableBalances` | +| REST | `GET /cosmos/bank/v1beta1/spendable_balances/{address}` | + +Request `QuerySpendableBalancesRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | address is the address to query spendable balances for. Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QuerySpendableBalancesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `balances` | [`Coin`](#cosmos-base-v1beta1-coin)[] | balances is the spendable balances of all the coins. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"address":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.bank.v1beta1.Query/SpendableBalances +``` + +### SupplyOf + +SupplyOf queries the supply of a single coin. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/SupplyOf` | +| REST | `GET /cosmos/bank/v1beta1/supply/by_denom` | + +Request `QuerySupplyOfRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | denom is the coin denom to query balances for. | + +Response `QuerySupplyOfResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin) | amount is the supply of the coin. | + +```bash +grpcurl -plaintext -d '{"denom":"<string>"}' \ + localhost:9090 cosmos.bank.v1beta1.Query/SupplyOf +``` + +### TotalSupply + +TotalSupply queries the total supply of all coins. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.bank.v1beta1.Query/TotalSupply` | +| REST | `GET /cosmos/bank/v1beta1/supply` | + +Request `QueryTotalSupplyRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryTotalSupplyResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `supply` | [`Coin`](#cosmos-base-v1beta1-coin)[] | supply is the supply of the coins | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.bank.v1beta1.Query/TotalSupply +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/next/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/next/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/next/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### MultiSend + +MultiSend defines a method for sending coins from some accounts to other accounts. + +| | | +| --- | --- | +| Type URL | `/cosmos.bank.v1beta1.MsgMultiSend` | +| Handler | `cosmos.bank.v1beta1.Msg/MultiSend` | +| Signer | `inputs` | +| Amino name | `cosmos-sdk/MsgMultiSend` | + +| Field | Type | Description | +| --- | --- | --- | +| `inputs` | [`Input`](#cosmos-bank-v1beta1-input)[] | Inputs, despite being `repeated`, only allows one sender input. This is checked in MsgMultiSend's ValidateBasic. | +| `outputs` | [`Output`](#cosmos-bank-v1beta1-output)[] | | + +In a transaction: + +```json +{ + "@type": "/cosmos.bank.v1beta1.MsgMultiSend", + "inputs": [ + { + "address": "<string>", + "coins": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] + } + ], + "outputs": [ + { + "address": "<string>", + "coins": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] + } + ] +} +``` + +Response `MsgMultiSendResponse`: + +This message has no fields. + +### Send + +Send defines a method for sending coins from one account to another account. + +| | | +| --- | --- | +| Type URL | `/cosmos.bank.v1beta1.MsgSend` | +| Handler | `cosmos.bank.v1beta1.Msg/Send` | +| Signer | `from_address` | +| Amino name | `cosmos-sdk/MsgSend` | + +| Field | Type | Description | +| --- | --- | --- | +| `from_address` | `string` | Encoded as cosmos.AddressString. | +| `to_address` | `string` | Encoded as cosmos.AddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +In a transaction: + +```json +{ + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "<string>", + "to_address": "<string>", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] +} +``` + +Response `MsgSendResponse`: + +This message has no fields. + +### SetSendEnabled + +SetSendEnabled is a governance operation for setting the SendEnabled flag on any number of Denoms. Only the entries to add or update should be included. Entries that already exist in the store, but that aren't included in this message, will be left unchanged. + +| | | +| --- | --- | +| Type URL | `/cosmos.bank.v1beta1.MsgSetSendEnabled` | +| Handler | `cosmos.bank.v1beta1.Msg/SetSendEnabled` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/MsgSetSendEnabled` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module. Encoded as cosmos.AddressString. | +| `send_enabled` | [`SendEnabled`](#cosmos-bank-v1beta1-sendenabled)[] | send_enabled is the list of entries to add or update. | +| `use_default_for` | `string`[] | use_default_for is a list of denoms that should use the params.default_send_enabled value. Denoms listed here will have their SendEnabled entries deleted. If a denom is included that doesn't have a SendEnabled entry, it will be ignored. | + +In a transaction: + +```json +{ + "@type": "/cosmos.bank.v1beta1.MsgSetSendEnabled", + "authority": "<string>", + "send_enabled": [ + { + "denom": "<string>", + "enabled": false + } + ], + "use_default_for": [ + "<string>" + ] +} +``` + +Response `MsgSetSendEnabledResponse`: + +This message has no fields. + +### UpdateParams + +UpdateParams defines a governance operation for updating the x/bank module parameters. The authority is defined in the keeper. + +| | | +| --- | --- | +| Type URL | `/cosmos.bank.v1beta1.MsgUpdateParams` | +| Handler | `cosmos.bank.v1beta1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/x/bank/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `params` | [`Params`](#cosmos-bank-v1beta1-params) | params defines the x/bank parameters to update. NOTE: All parameters must be supplied. | + +In a transaction: + +```json +{ + "@type": "/cosmos.bank.v1beta1.MsgUpdateParams", + "authority": "<string>", + "params": { + "default_send_enabled": false + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.bank.v1beta1.DenomOwner + +DenomOwner defines structure representing an account that owns or holds a particular denominated token. It contains the account address and account balance of the denominated token. + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | address defines the address that owns a particular denomination. Encoded as cosmos.AddressString. | +| `balance` | [`Coin`](#cosmos-base-v1beta1-coin) | balance is the balance of the denominated coin for an account. | + +### cosmos.bank.v1beta1.DenomUnit + +DenomUnit represents a struct that describes a given denomination unit of the basic token. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | denom represents the string name of the given denom unit (e.g uatom). | +| `exponent` | `uint32` | exponent represents power of 10 exponent that one must raise the base_denom to in order to equal the given DenomUnit's denom 1 denom = 10^exponent base_denom (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with exponent = 6, thus: 1 atom = 10^6 uatom). | +| `aliases` | `string`[] | aliases is a list of string aliases for the given denom | + +### cosmos.bank.v1beta1.Input + +Input models transaction input. + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | Encoded as cosmos.AddressString. | +| `coins` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +### cosmos.bank.v1beta1.Metadata + +Metadata represents a struct that describes a basic token. + +| Field | Type | Description | +| --- | --- | --- | +| `description` | `string` | | +| `denom_units` | [`DenomUnit`](#cosmos-bank-v1beta1-denomunit)[] | denom_units represents the list of DenomUnit's for a given coin | +| `base` | `string` | base represents the base denom (should be the DenomUnit with exponent = 0). | +| `display` | `string` | display indicates the suggested denom that should be displayed in clients. | +| `name` | `string` | name defines the name of the token (eg: Cosmos Atom) | +| `symbol` | `string` | symbol is the token symbol usually shown on exchanges (eg: ATOM). This can be the same as the display. | +| `uri` | `string` | URI to a document (on or off-chain) that contains additional information. Optional. | +| `uri_hash` | `string` | URIHash is a sha256 hash of a document pointed by URI. It's used to verify that the document didn't change. Optional. | + +### cosmos.bank.v1beta1.Output + +Output models transaction outputs. + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | Encoded as cosmos.AddressString. | +| `coins` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +### cosmos.bank.v1beta1.Params + +Params defines the parameters for the bank module. + +| Field | Type | Description | +| --- | --- | --- | +| `send_enabled` | [`SendEnabled`](#cosmos-bank-v1beta1-sendenabled)[] | Deprecated: Use of SendEnabled in params is deprecated. For genesis, use the newly added send_enabled field in the genesis object. Storage, lookup, and manipulation of this information is now in the keeper. As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files. Deprecated. | +| `default_send_enabled` | `bool` | | + +### cosmos.bank.v1beta1.SendEnabled + +SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `enabled` | `bool` | | + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.base.v1beta1.Coin + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `amount` | `string` | Encoded as cosmos.Int. | + + diff --git a/sdk/next/api-reference/grpc/base.mdx b/sdk/next/api-reference/grpc/base.mdx new file mode 100644 index 00000000..cfa73c60 --- /dev/null +++ b/sdk/next/api-reference/grpc/base.mdx @@ -0,0 +1,771 @@ +--- +title: "Base" +description: "gRPC queries and transaction messages defined by the base module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +## cosmos.base.node.v1beta1.Service + +Service defines the gRPC querier service for node related queries. + +### Config + +Config queries for the operator configuration. + +| | | +| --- | --- | +| gRPC | `cosmos.base.node.v1beta1.Service/Config` | +| REST | `GET /cosmos/base/node/v1beta1/config` | + +Request `ConfigRequest`: + +This message has no fields. + +Response `ConfigResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `minimum_gas_price` | `string` | | +| `pruning_keep_recent` | `string` | | +| `pruning_interval` | `string` | | +| `halt_height` | `uint64` | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.node.v1beta1.Service/Config +``` + +### Status + +Status queries for the node status. + +| | | +| --- | --- | +| gRPC | `cosmos.base.node.v1beta1.Service/Status` | +| REST | `GET /cosmos/base/node/v1beta1/status` | + +Request `StatusRequest`: + +This message has no fields. + +Response `StatusResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `earliest_store_height` | `uint64` | | +| `height` | `uint64` | | +| `timestamp` | `Timestamp` | | +| `app_hash` | `bytes` | | +| `validator_hash` | `bytes` | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.node.v1beta1.Service/Status +``` + +## cosmos.base.reflection.v1beta1.ReflectionService + +ReflectionService defines a service for interface reflection. + +### ListAllInterfaces + +ListAllInterfaces lists all the interfaces registered in the interface registry. + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces` | +| REST | `GET /cosmos/base/reflection/v1beta1/interfaces` | + +Request `ListAllInterfacesRequest`: + +This message has no fields. + +Response `ListAllInterfacesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `interface_names` | `string`[] | interface_names is an array of all the registered interfaces. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces +``` + +### ListImplementations + +ListImplementations list all the concrete types that implement a given interface. + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations` | +| REST | `GET /cosmos/base/reflection/v1beta1/interfaces/{interfaceName}/implementations` | + +Request `ListImplementationsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `interface_name` | `string` | interface_name defines the interface to query the implementations for. | + +Response `ListImplementationsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `implementation_message_names` | `string`[] | | + +```bash +grpcurl -plaintext -d '{"interface_name":"<string>"}' \ + localhost:9090 cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations +``` + +## cosmos.base.reflection.v2alpha1.ReflectionService + +ReflectionService defines a service for application reflection. + +### GetAuthnDescriptor + +GetAuthnDescriptor returns information on how to authenticate transactions in the application NOTE: this RPC is still experimental and might be subject to breaking changes or removal in future releases of the cosmos-sdk. + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor` | +| REST | `GET /cosmos/base/reflection/v1beta1/app_descriptor/authn` | + +Request `GetAuthnDescriptorRequest`: + +This message has no fields. + +Response `GetAuthnDescriptorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `authn` | [`AuthnDescriptor`](#cosmos-base-reflection-v2alpha1-authndescriptor) | authn describes how to authenticate to the application when sending transactions | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor +``` + +### GetChainDescriptor + +GetChainDescriptor returns the description of the chain + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor` | +| REST | `GET /cosmos/base/reflection/v1beta1/app_descriptor/chain` | + +Request `GetChainDescriptorRequest`: + +This message has no fields. + +Response `GetChainDescriptorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `chain` | [`ChainDescriptor`](#cosmos-base-reflection-v2alpha1-chaindescriptor) | chain describes application chain information | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor +``` + +### GetCodecDescriptor + +GetCodecDescriptor returns the descriptor of the codec of the application + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor` | +| REST | `GET /cosmos/base/reflection/v1beta1/app_descriptor/codec` | + +Request `GetCodecDescriptorRequest`: + +This message has no fields. + +Response `GetCodecDescriptorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `codec` | [`CodecDescriptor`](#cosmos-base-reflection-v2alpha1-codecdescriptor) | codec describes the application codec such as registered interfaces and implementations | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor +``` + +### GetConfigurationDescriptor + +GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor` | +| REST | `GET /cosmos/base/reflection/v1beta1/app_descriptor/configuration` | + +Request `GetConfigurationDescriptorRequest`: + +This message has no fields. + +Response `GetConfigurationDescriptorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `config` | [`ConfigurationDescriptor`](#cosmos-base-reflection-v2alpha1-configurationdescriptor) | config describes the application's sdk.Config | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor +``` + +### GetQueryServicesDescriptor + +GetQueryServicesDescriptor returns the available gRPC queryable services of the application + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor` | +| REST | `GET /cosmos/base/reflection/v1beta1/app_descriptor/query_services` | + +Request `GetQueryServicesDescriptorRequest`: + +This message has no fields. + +Response `GetQueryServicesDescriptorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `queries` | [`QueryServicesDescriptor`](#cosmos-base-reflection-v2alpha1-queryservicesdescriptor) | queries provides information on the available queryable services | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor +``` + +### GetTxDescriptor + +GetTxDescriptor returns information on the used transaction object and available msgs that can be used + +| | | +| --- | --- | +| gRPC | `cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor` | +| REST | `GET /cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor` | + +Request `GetTxDescriptorRequest`: + +This message has no fields. + +Response `GetTxDescriptorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx` | [`TxDescriptor`](#cosmos-base-reflection-v2alpha1-txdescriptor) | tx provides information on msgs that can be forwarded to the application alongside the accepted transaction protobuf type | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor +``` + +## cosmos.base.tendermint.v1beta1.Service + +Service defines the gRPC querier service for tendermint queries. + +### ABCIQuery + +ABCIQuery defines a query handler that supports ABCI queries directly to the application, bypassing Tendermint completely. The ABCI query must contain a valid and supported path, including app, custom, p2p, and store. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/ABCIQuery` | +| REST | `GET /cosmos/base/tendermint/v1beta1/abci_query` | + +Request `ABCIQueryRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `data` | `bytes` | | +| `path` | `string` | | +| `height` | `int64` | | +| `prove` | `bool` | | + +Response `ABCIQueryResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `code` | `uint32` | | +| `log` | `string` | | +| `info` | `string` | | +| `index` | `int64` | | +| `key` | `bytes` | | +| `value` | `bytes` | | +| `proof_ops` | [`ProofOps`](#cosmos-base-tendermint-v1beta1-proofops) | | +| `height` | `int64` | | +| `codespace` | `string` | | + +```bash +grpcurl -plaintext -d '{"data":"","path":"<string>","height":"1","prove":false}' \ + localhost:9090 cosmos.base.tendermint.v1beta1.Service/ABCIQuery +``` + +### GetBlockByHeight + +GetBlockByHeight queries block for given height. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight` | +| REST | `GET /cosmos/base/tendermint/v1beta1/blocks/{height}` | + +Request `GetBlockByHeightRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | | + +Response `GetBlockByHeightResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `block_id` | `BlockID` | | +| `block` | `Block` | Deprecated: please use `sdk_block` instead | +| `sdk_block` | [`Block`](#cosmos-base-tendermint-v1beta1-block) | | + +```bash +grpcurl -plaintext -d '{"height":"1"}' \ + localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight +``` + +### GetBlockResults + +GetBlockResults queries block results for given height. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetBlockResults` | +| REST | `GET /cosmos/base/tendermint/v1beta1/block_results/{height}` | + +Request `GetBlockResultsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | | + +Response `GetBlockResultsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | height is the block height. | +| `txs_results` | `ExecTxResult`[] | txs_results contains the results of each transaction execution. | +| `finalize_block_events` | `Event`[] | finalize_block_events contains consensus-level events emitted during block finalization, including slashing, jailing, and validator set updates. | +| `validator_updates` | `ValidatorUpdate`[] | validator_updates contains the validator updates for this block. | +| `consensus_param_updates` | `ConsensusParams` | consensus_param_updates contains any consensus parameter updates for this block. | +| `app_hash` | `bytes` | app_hash is the app hash after processing this block. | + +```bash +grpcurl -plaintext -d '{"height":"1"}' \ + localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetBlockResults +``` + +### GetLatestBlock + +GetLatestBlock returns the latest block. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetLatestBlock` | +| REST | `GET /cosmos/base/tendermint/v1beta1/blocks/latest` | + +Request `GetLatestBlockRequest`: + +This message has no fields. + +Response `GetLatestBlockResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `block_id` | `BlockID` | | +| `block` | `Block` | Deprecated: please use `sdk_block` instead | +| `sdk_block` | [`Block`](#cosmos-base-tendermint-v1beta1-block) | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetLatestBlock +``` + +### GetLatestBlockResults + +GetLatestBlockResults returns the block results for the latest block. Block results contain finalize_block_events which include consensus-level events like slashing, jailing, and validator set updates. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetLatestBlockResults` | +| REST | `GET /cosmos/base/tendermint/v1beta1/block_results/latest` | + +Request `GetLatestBlockResultsRequest`: + +This message has no fields. + +Response `GetLatestBlockResultsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | height is the block height. | +| `txs_results` | `ExecTxResult`[] | txs_results contains the results of each transaction execution. | +| `finalize_block_events` | `Event`[] | finalize_block_events contains consensus-level events emitted during block finalization, including slashing, jailing, and validator set updates. | +| `validator_updates` | `ValidatorUpdate`[] | validator_updates contains the validator updates for this block. | +| `consensus_param_updates` | `ConsensusParams` | consensus_param_updates contains any consensus parameter updates for this block. | +| `app_hash` | `bytes` | app_hash is the app hash after processing this block. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetLatestBlockResults +``` + +### GetLatestValidatorSet + +GetLatestValidatorSet queries latest validator-set. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet` | +| REST | `GET /cosmos/base/tendermint/v1beta1/validatorsets/latest` | + +Request `GetLatestValidatorSetRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an pagination for the request. | + +Response `GetLatestValidatorSetResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `block_height` | `int64` | | +| `validators` | [`Validator`](#cosmos-base-tendermint-v1beta1-validator)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines an pagination for the response. | + +```bash +grpcurl -plaintext -d '{"pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet +``` + +### GetNodeInfo + +GetNodeInfo queries the current node info. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetNodeInfo` | +| REST | `GET /cosmos/base/tendermint/v1beta1/node_info` | + +Request `GetNodeInfoRequest`: + +This message has no fields. + +Response `GetNodeInfoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `default_node_info` | `DefaultNodeInfo` | | +| `application_version` | [`VersionInfo`](#cosmos-base-tendermint-v1beta1-versioninfo) | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetNodeInfo +``` + +### GetSyncing + +GetSyncing queries node syncing. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetSyncing` | +| REST | `GET /cosmos/base/tendermint/v1beta1/syncing` | + +Request `GetSyncingRequest`: + +This message has no fields. + +Response `GetSyncingResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `syncing` | `bool` | | +| `earliest_block_height` | `int64` | earliest_block_height is the earliest block height available on this node. | +| `latest_block_height` | `int64` | latest_block_height is the latest block height available on this node. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetSyncing +``` + +### GetValidatorSetByHeight + +GetValidatorSetByHeight queries validator-set at a given height. + +| | | +| --- | --- | +| gRPC | `cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight` | +| REST | `GET /cosmos/base/tendermint/v1beta1/validatorsets/{height}` | + +Request `GetValidatorSetByHeightRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an pagination for the request. | + +Response `GetValidatorSetByHeightResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `block_height` | `int64` | | +| `validators` | [`Validator`](#cosmos-base-tendermint-v1beta1-validator)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines an pagination for the response. | + +```bash +grpcurl -plaintext -d '{"height":"1","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight +``` + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.base.reflection.v2alpha1.AuthnDescriptor + +AuthnDescriptor provides information on how to sign transactions without relying on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures + +| Field | Type | Description | +| --- | --- | --- | +| `sign_modes` | [`SigningModeDescriptor`](#cosmos-base-reflection-v2alpha1-signingmodedescriptor)[] | sign_modes defines the supported signature algorithm | + +### cosmos.base.reflection.v2alpha1.ChainDescriptor + +ChainDescriptor describes chain information of the application + +| Field | Type | Description | +| --- | --- | --- | +| `id` | `string` | id is the chain id | + +### cosmos.base.reflection.v2alpha1.CodecDescriptor + +CodecDescriptor describes the registered interfaces and provides metadata information on the types + +| Field | Type | Description | +| --- | --- | --- | +| `interfaces` | [`InterfaceDescriptor`](#cosmos-base-reflection-v2alpha1-interfacedescriptor)[] | interfaces is a list of the registered interfaces descriptors | + +### cosmos.base.reflection.v2alpha1.ConfigurationDescriptor + +ConfigurationDescriptor contains metadata information on the sdk.Config + +| Field | Type | Description | +| --- | --- | --- | +| `bech32_account_address_prefix` | `string` | bech32_account_address_prefix is the account address prefix | + +### cosmos.base.reflection.v2alpha1.InterfaceAcceptingMessageDescriptor + +InterfaceAcceptingMessageDescriptor describes a protobuf message which contains an interface represented as a google.protobuf.Any + +| Field | Type | Description | +| --- | --- | --- | +| `fullname` | `string` | fullname is the protobuf fullname of the type containing the interface | +| `field_descriptor_names` | `string`[] | field_descriptor_names is a list of the protobuf name (not fullname) of the field which contains the interface as google.protobuf.Any (the interface is the same, but it can be in multiple fields of the same proto message) | + +### cosmos.base.reflection.v2alpha1.InterfaceDescriptor + +InterfaceDescriptor describes the implementation of an interface + +| Field | Type | Description | +| --- | --- | --- | +| `fullname` | `string` | fullname is the name of the interface | +| `interface_accepting_messages` | [`InterfaceAcceptingMessageDescriptor`](#cosmos-base-reflection-v2alpha1-interfaceacceptingmessagedescriptor)[] | interface_accepting_messages contains information regarding the proto messages which contain the interface as google.protobuf.Any field | +| `interface_implementers` | [`InterfaceImplementerDescriptor`](#cosmos-base-reflection-v2alpha1-interfaceimplementerdescriptor)[] | interface_implementers is a list of the descriptors of the interface implementers | + +### cosmos.base.reflection.v2alpha1.InterfaceImplementerDescriptor + +InterfaceImplementerDescriptor describes an interface implementer + +| Field | Type | Description | +| --- | --- | --- | +| `fullname` | `string` | fullname is the protobuf queryable name of the interface implementer | +| `type_url` | `string` | type_url defines the type URL used when marshalling the type as any this is required so we can provide type safe google.protobuf.Any marshalling and unmarshalling, making sure that we don't accept just 'any' type in our interface fields | + +### cosmos.base.reflection.v2alpha1.MsgDescriptor + +MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction + +| Field | Type | Description | +| --- | --- | --- | +| `msg_type_url` | `string` | msg_type_url contains the TypeURL of a sdk.Msg. | + +### cosmos.base.reflection.v2alpha1.QueryMethodDescriptor + +QueryMethodDescriptor describes a queryable method of a query service no other info is provided beside method name and tendermint queryable path because it would be redundant with the grpc reflection service + +| Field | Type | Description | +| --- | --- | --- | +| `name` | `string` | name is the protobuf name (not fullname) of the method | +| `full_query_path` | `string` | full_query_path is the path that can be used to query this method via tendermint abci.Query | + +### cosmos.base.reflection.v2alpha1.QueryServiceDescriptor + +QueryServiceDescriptor describes a cosmos-sdk queryable service + +| Field | Type | Description | +| --- | --- | --- | +| `fullname` | `string` | fullname is the protobuf fullname of the service descriptor | +| `is_module` | `bool` | is_module describes if this service is actually exposed by an application's module | +| `methods` | [`QueryMethodDescriptor`](#cosmos-base-reflection-v2alpha1-querymethoddescriptor)[] | methods provides a list of query service methods | + +### cosmos.base.reflection.v2alpha1.QueryServicesDescriptor + +QueryServicesDescriptor contains the list of cosmos-sdk queryable services + +| Field | Type | Description | +| --- | --- | --- | +| `query_services` | [`QueryServiceDescriptor`](#cosmos-base-reflection-v2alpha1-queryservicedescriptor)[] | query_services is a list of cosmos-sdk QueryServiceDescriptor | + +### cosmos.base.reflection.v2alpha1.SigningModeDescriptor + +SigningModeDescriptor provides information on a signing flow of the application NOTE(fdymylja): here we could go as far as providing an entire flow on how to sign a message given a SigningModeDescriptor, but it's better to think about this another time + +| Field | Type | Description | +| --- | --- | --- | +| `name` | `string` | name defines the unique name of the signing mode | +| `number` | `int32` | number is the unique int32 identifier for the sign_mode enum | +| `authn_info_provider_method_fullname` | `string` | authn_info_provider_method_fullname defines the fullname of the method to call to get the metadata required to authenticate using the provided sign_modes | + +### cosmos.base.reflection.v2alpha1.TxDescriptor + +TxDescriptor describes the accepted transaction type + +| Field | Type | Description | +| --- | --- | --- | +| `fullname` | `string` | fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type) it is not meant to support polymorphism of transaction types, it is supposed to be used by reflection clients to understand if they can handle a specific transaction type in an application. | +| `msgs` | [`MsgDescriptor`](#cosmos-base-reflection-v2alpha1-msgdescriptor)[] | msgs lists the accepted application messages (sdk.Msg) | + +### cosmos.base.tendermint.v1beta1.Block + +Block is tendermint type Block, with the Header proposer address field converted to bech32 string. + +| Field | Type | Description | +| --- | --- | --- | +| `header` | [`Header`](#cosmos-base-tendermint-v1beta1-header) | | +| `data` | `Data` | | +| `evidence` | `EvidenceList` | | +| `last_commit` | `Commit` | | + +### cosmos.base.tendermint.v1beta1.Header + +Header defines the structure of a Tendermint block header. + +| Field | Type | Description | +| --- | --- | --- | +| `version` | `Consensus` | basic block info | +| `chain_id` | `string` | | +| `height` | `int64` | | +| `time` | `Timestamp` | | +| `last_block_id` | `BlockID` | prev block info | +| `last_commit_hash` | `bytes` | hashes of block data | +| `data_hash` | `bytes` | | +| `validators_hash` | `bytes` | hashes from the app output from the prev block | +| `next_validators_hash` | `bytes` | | +| `consensus_hash` | `bytes` | | +| `app_hash` | `bytes` | | +| `last_results_hash` | `bytes` | | +| `evidence_hash` | `bytes` | consensus info | +| `proposer_address` | `string` | proposer_address is the original block proposer address, formatted as a Bech32 string. In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string for better UX. | + +### cosmos.base.tendermint.v1beta1.Module + +Module is the type for VersionInfo + +| Field | Type | Description | +| --- | --- | --- | +| `path` | `string` | module path | +| `version` | `string` | module version | +| `sum` | `string` | checksum | + +### cosmos.base.tendermint.v1beta1.ProofOp + +ProofOp defines an operation used for calculating Merkle root. The data could be arbitrary format, providing necessary data for example neighbouring node hash. + +Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. + +| Field | Type | Description | +| --- | --- | --- | +| `type` | `string` | | +| `key` | `bytes` | | +| `data` | `bytes` | | + +### cosmos.base.tendermint.v1beta1.ProofOps + +ProofOps is Merkle proof defined by the list of ProofOps. + +Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. + +| Field | Type | Description | +| --- | --- | --- | +| `ops` | [`ProofOp`](#cosmos-base-tendermint-v1beta1-proofop)[] | | + +### cosmos.base.tendermint.v1beta1.Validator + +Validator is the type for the validator-set. + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | Encoded as cosmos.AddressString. | +| `pub_key` | `Any` | | +| `voting_power` | `int64` | | +| `proposer_priority` | `int64` | | + +### cosmos.base.tendermint.v1beta1.VersionInfo + +VersionInfo is the type for the GetNodeInfoResponse message. + +| Field | Type | Description | +| --- | --- | --- | +| `name` | `string` | | +| `app_name` | `string` | | +| `version` | `string` | | +| `git_commit` | `string` | | +| `build_tags` | `string` | | +| `go_version` | `string` | | +| `build_deps` | [`Module`](#cosmos-base-tendermint-v1beta1-module)[] | | +| `cosmos_sdk_version` | `string` | | + + diff --git a/sdk/next/api-reference/grpc/consensus.mdx b/sdk/next/api-reference/grpc/consensus.mdx new file mode 100644 index 00000000..21c3094c --- /dev/null +++ b/sdk/next/api-reference/grpc/consensus.mdx @@ -0,0 +1,115 @@ +--- +title: "Consensus" +description: "gRPC queries and transaction messages defined by the consensus module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### Params + +Params queries the parameters of x/consensus module. + +| | | +| --- | --- | +| gRPC | `cosmos.consensus.v1.Query/Params` | +| REST | `GET /cosmos/consensus/v1/params` | + +Request `QueryParamsRequest`: + +This message has no fields. + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `params` | `ConsensusParams` | params are the tendermint consensus params stored in the consensus module. Please note that `params.version` is not populated in this response, it is tracked separately in the x/upgrade module. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.consensus.v1.Query/Params +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/next/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/next/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/next/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### UpdateParams + +UpdateParams defines a governance operation for updating the x/consensus module parameters. The authority is defined in the keeper. + +| | | +| --- | --- | +| Type URL | `/cosmos.consensus.v1.MsgUpdateParams` | +| Handler | `cosmos.consensus.v1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/x/consensus/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `block` | `BlockParams` | params defines the x/consensus parameters to update. VersionsParams is not included in this Msg because it is tracked separarately in x/upgrade. NOTE: All parameters must be supplied. | +| `evidence` | `EvidenceParams` | | +| `validator` | `ValidatorParams` | | +| `abci` | `ABCIParams` | | +| `auth` | `AuthorityParams` | | + +In a transaction: + +```json +{ + "@type": "/cosmos.consensus.v1.MsgUpdateParams", + "authority": "<string>", + "block": { + "max_bytes": "1", + "max_gas": "1" + }, + "evidence": { + "max_age_num_blocks": "1", + "max_age_duration": "0s", + "max_bytes": "1" + }, + "validator": { + "pub_key_types": [ + "<string>" + ] + }, + "abci": { + "vote_extensions_enable_height": "1" + }, + "auth": { + "authority": "<string>" + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + + diff --git a/sdk/next/api-reference/grpc/counter.mdx b/sdk/next/api-reference/grpc/counter.mdx new file mode 100644 index 00000000..c6a1c224 --- /dev/null +++ b/sdk/next/api-reference/grpc/counter.mdx @@ -0,0 +1,91 @@ +--- +title: "Counter" +description: "gRPC queries and transaction messages defined by the counter module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### GetCount + +GetCount queries the parameters of x/Counter module. + +| | | +| --- | --- | +| gRPC | `cosmos.counter.v1.Query/GetCount` | + +Request `QueryGetCountRequest`: + +This message has no fields. + +Response `QueryGetCountResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `total_count` | `int64` | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.counter.v1.Query/GetCount +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/next/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/next/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/next/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### IncreaseCount + +IncreaseCount increments the counter by the specified amount. + +| | | +| --- | --- | +| Type URL | `/cosmos.counter.v1.MsgIncreaseCounter` | +| Handler | `cosmos.counter.v1.Msg/IncreaseCount` | +| Signer | `signer` | +| Amino name | `cosmos-sdk/increase_counter` | + +| Field | Type | Description | +| --- | --- | --- | +| `signer` | `string` | signer is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `count` | `int64` | count is the number of times to increment the counter. | + +In a transaction: + +```json +{ + "@type": "/cosmos.counter.v1.MsgIncreaseCounter", + "signer": "<string>", + "count": "1" +} +``` + +Response `MsgIncreaseCountResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `new_count` | `int64` | new_count is the number of times the counter was incremented. | + + diff --git a/sdk/next/api-reference/grpc/distribution.mdx b/sdk/next/api-reference/grpc/distribution.mdx new file mode 100644 index 00000000..6efe275c --- /dev/null +++ b/sdk/next/api-reference/grpc/distribution.mdx @@ -0,0 +1,742 @@ +--- +title: "Distribution" +description: "gRPC queries and transaction messages defined by the distribution module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### CommunityPool + +CommunityPool queries the community pool coins. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/CommunityPool` | +| REST | `GET /cosmos/distribution/v1beta1/community_pool` | + +Request `QueryCommunityPoolRequest`: + +This message has no fields. + +Response `QueryCommunityPoolResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `pool` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | pool defines community pool's coins. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.distribution.v1beta1.Query/CommunityPool +``` + +### DelegationRewards + +DelegationRewards queries the total rewards accrued by a delegation. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/DelegationRewards` | +| REST | `GET /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards/{validatorAddress}` | + +Request `QueryDelegationRewardsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryDelegationRewardsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `rewards` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | rewards defines the rewards accrued by a delegation. | + +```bash +grpcurl -plaintext -d '{"delegator_address":"<string>","validator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/DelegationRewards +``` + +### DelegationTotalRewards + +DelegationTotalRewards queries the total rewards accrued by each validator. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/DelegationTotalRewards` | +| REST | `GET /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards` | + +Request `QueryDelegationTotalRewardsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address defines the delegator address to query for. Encoded as cosmos.AddressString. | + +Response `QueryDelegationTotalRewardsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `rewards` | [`DelegationDelegatorReward`](#cosmos-distribution-v1beta1-delegationdelegatorreward)[] | rewards defines all the rewards accrued by a delegator. | +| `total` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | total defines the sum of all the rewards. | +| `claimable` | [`Coin`](#cosmos-base-v1beta1-coin)[] | claimable defines the amount that can actually be withdrawn. Each delegation reward is truncated individually, mirroring what Msg/WithdrawDelegatorReward pays out, so claimable is at most total. | + +```bash +grpcurl -plaintext -d '{"delegator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/DelegationTotalRewards +``` + +### DelegatorStartingInfo + +DelegatorStartingInfo queries the starting info for a delegator. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/DelegatorStartingInfo` | +| REST | `GET /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/starting_info/{validatorAddress}` | + +Request `QueryDelegatorStartingInfoRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryDelegatorStartingInfoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `starting_info` | [`DelegatorStartingInfo`](#cosmos-distribution-v1beta1-delegatorstartinginfo) | starting_info defines the starting info of a delegator. | + +```bash +grpcurl -plaintext -d '{"delegator_address":"<string>","validator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/DelegatorStartingInfo +``` + +### DelegatorValidators + +DelegatorValidators queries the validators of a delegator. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/DelegatorValidators` | +| REST | `GET /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/validators` | + +Request `QueryDelegatorValidatorsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address defines the delegator address to query for. Encoded as cosmos.AddressString. | + +Response `QueryDelegatorValidatorsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `validators` | `string`[] | validators defines the validators a delegator is delegating for. | + +```bash +grpcurl -plaintext -d '{"delegator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/DelegatorValidators +``` + +### DelegatorWithdrawAddress + +DelegatorWithdrawAddress queries withdraw address of a delegator. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress` | +| REST | `GET /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/withdraw_address` | + +Request `QueryDelegatorWithdrawAddressRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address defines the delegator address to query for. Encoded as cosmos.AddressString. | + +Response `QueryDelegatorWithdrawAddressResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `withdraw_address` | `string` | withdraw_address defines the delegator address to query for. Encoded as cosmos.AddressString. | + +```bash +grpcurl -plaintext -d '{"delegator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress +``` + +### Params + +Params queries params of the distribution module. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/Params` | +| REST | `GET /cosmos/distribution/v1beta1/params` | + +Request `QueryParamsRequest`: + +This message has no fields. + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `params` | [`Params`](#cosmos-distribution-v1beta1-params) | params defines the parameters of the module. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.distribution.v1beta1.Query/Params +``` + +### ValidatorCommission + +ValidatorCommission queries accumulated commission for a validator. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/ValidatorCommission` | +| REST | `GET /cosmos/distribution/v1beta1/validators/{validatorAddress}/commission` | + +Request `QueryValidatorCommissionRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryValidatorCommissionResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `commission` | [`ValidatorAccumulatedCommission`](#cosmos-distribution-v1beta1-validatoraccumulatedcommission) | commission defines the commission the validator received. | + +```bash +grpcurl -plaintext -d '{"validator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/ValidatorCommission +``` + +### ValidatorCurrentRewards + +ValidatorCurrentRewards queries current rewards for a validator. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/ValidatorCurrentRewards` | +| REST | `GET /cosmos/distribution/v1beta1/validators/{validatorAddress}/current_rewards` | + +Request `QueryValidatorCurrentRewardsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryValidatorCurrentRewardsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `rewards` | [`ValidatorCurrentRewards`](#cosmos-distribution-v1beta1-validatorcurrentrewards) | rewards defines the current rewards of a validator. | + +```bash +grpcurl -plaintext -d '{"validator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/ValidatorCurrentRewards +``` + +### ValidatorDistributionInfo + +ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo` | +| REST | `GET /cosmos/distribution/v1beta1/validators/{validatorAddress}` | + +Request `QueryValidatorDistributionInfoRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryValidatorDistributionInfoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `operator_address` | `string` | operator_address defines the validator operator address. Encoded as cosmos.ValidatorAddressString. | +| `self_bond_rewards` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | self_bond_rewards defines the self delegations rewards. | +| `commission` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | commission defines the commission the validator received. | + +```bash +grpcurl -plaintext -d '{"validator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo +``` + +### ValidatorHistoricalRewards + +ValidatorHistoricalRewards queries historical rewards for a validator at a specific period. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/ValidatorHistoricalRewards` | +| REST | `GET /cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}` | + +Request `QueryValidatorHistoricalRewardsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | +| `period` | `uint64` | period defines the period to query historical rewards for. | + +Response `QueryValidatorHistoricalRewardsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `rewards` | [`ValidatorHistoricalRewards`](#cosmos-distribution-v1beta1-validatorhistoricalrewards) | rewards defines the historical rewards of a validator. | + +```bash +grpcurl -plaintext -d '{"validator_address":"<string>","period":"1"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/ValidatorHistoricalRewards +``` + +### ValidatorOutstandingRewards + +ValidatorOutstandingRewards queries rewards of a validator address. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards` | +| REST | `GET /cosmos/distribution/v1beta1/validators/{validatorAddress}/outstanding_rewards` | + +Request `QueryValidatorOutstandingRewardsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryValidatorOutstandingRewardsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `rewards` | [`ValidatorOutstandingRewards`](#cosmos-distribution-v1beta1-validatoroutstandingrewards) | | + +```bash +grpcurl -plaintext -d '{"validator_address":"<string>"}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards +``` + +### ValidatorSlashes + +ValidatorSlashes queries slash events of a validator. + +| | | +| --- | --- | +| gRPC | `cosmos.distribution.v1beta1.Query/ValidatorSlashes` | +| REST | `GET /cosmos/distribution/v1beta1/validators/{validatorAddress}/slashes` | + +Request `QueryValidatorSlashesRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | validator_address defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | +| `starting_height` | `uint64` | starting_height defines the optional starting height to query the slashes. | +| `ending_height` | `uint64` | starting_height defines the optional ending height to query the slashes. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryValidatorSlashesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `slashes` | [`ValidatorSlashEvent`](#cosmos-distribution-v1beta1-validatorslashevent)[] | slashes defines the slashes the validator received. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"validator_address":"<string>","starting_height":"1","ending_height":"1","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.distribution.v1beta1.Query/ValidatorSlashes +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/next/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/next/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/next/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### CommunityPoolSpend + +CommunityPoolSpend defines a governance operation for sending tokens from the community pool in the x/distribution module to another account, which could be the governance module itself. The authority is defined in the keeper. + +| | | +| --- | --- | +| Type URL | `/cosmos.distribution.v1beta1.MsgCommunityPoolSpend` | +| Handler | `cosmos.distribution.v1beta1.Msg/CommunityPoolSpend` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/distr/MsgCommunityPoolSpend` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `recipient` | `string` | | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +In a transaction: + +```json +{ + "@type": "/cosmos.distribution.v1beta1.MsgCommunityPoolSpend", + "authority": "<string>", + "recipient": "<string>", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] +} +``` + +Response `MsgCommunityPoolSpendResponse`: + +This message has no fields. + +### DepositValidatorRewardsPool + +DepositValidatorRewardsPool defines a method to provide additional rewards to delegators to a specific validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool` | +| Handler | `cosmos.distribution.v1beta1.Msg/DepositValidatorRewardsPool` | +| Signer | `depositor` | +| Amino name | `cosmos-sdk/distr/MsgDepositValRewards` | + +| Field | Type | Description | +| --- | --- | --- | +| `depositor` | `string` | Encoded as cosmos.AddressString. | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +In a transaction: + +```json +{ + "@type": "/cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool", + "depositor": "<string>", + "validator_address": "<string>", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] +} +``` + +Response `MsgDepositValidatorRewardsPoolResponse`: + +This message has no fields. + +### FundCommunityPool + +FundCommunityPool defines a method to allow an account to directly fund the community pool. + +| | | +| --- | --- | +| Type URL | `/cosmos.distribution.v1beta1.MsgFundCommunityPool` | +| Handler | `cosmos.distribution.v1beta1.Msg/FundCommunityPool` | +| Signer | `depositor` | +| Amino name | `cosmos-sdk/MsgFundCommunityPool` | + +| Field | Type | Description | +| --- | --- | --- | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | +| `depositor` | `string` | Encoded as cosmos.AddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.distribution.v1beta1.MsgFundCommunityPool", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ], + "depositor": "<string>" +} +``` + +Response `MsgFundCommunityPoolResponse`: + +This message has no fields. + +### SetWithdrawAddress + +SetWithdrawAddress defines a method to change the withdraw address for a delegator (or validator self-delegation). + +| | | +| --- | --- | +| Type URL | `/cosmos.distribution.v1beta1.MsgSetWithdrawAddress` | +| Handler | `cosmos.distribution.v1beta1.Msg/SetWithdrawAddress` | +| Signer | `delegator_address` | +| Amino name | `cosmos-sdk/MsgModifyWithdrawAddress` | + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | Encoded as cosmos.AddressString. | +| `withdraw_address` | `string` | Encoded as cosmos.AddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", + "delegator_address": "<string>", + "withdraw_address": "<string>" +} +``` + +Response `MsgSetWithdrawAddressResponse`: + +This message has no fields. + +### UpdateParams + +UpdateParams defines a governance operation for updating the x/distribution module parameters. The authority is defined in the keeper. + +| | | +| --- | --- | +| Type URL | `/cosmos.distribution.v1beta1.MsgUpdateParams` | +| Handler | `cosmos.distribution.v1beta1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/distribution/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `params` | [`Params`](#cosmos-distribution-v1beta1-params) | params defines the x/distribution parameters to update. NOTE: All parameters must be supplied. | + +In a transaction: + +```json +{ + "@type": "/cosmos.distribution.v1beta1.MsgUpdateParams", + "authority": "<string>", + "params": { + "community_tax": "<string>", + "withdraw_addr_enabled": false + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + +### WithdrawDelegatorReward + +WithdrawDelegatorReward defines a method to withdraw rewards of delegator from a single validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward` | +| Handler | `cosmos.distribution.v1beta1.Msg/WithdrawDelegatorReward` | +| Signer | `delegator_address` | +| Amino name | `cosmos-sdk/MsgWithdrawDelegationReward` | + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | Encoded as cosmos.AddressString. | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", + "delegator_address": "<string>", + "validator_address": "<string>" +} +``` + +Response `MsgWithdrawDelegatorRewardResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +### WithdrawValidatorCommission + +WithdrawValidatorCommission defines a method to withdraw the full commission to the validator address. + +| | | +| --- | --- | +| Type URL | `/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission` | +| Handler | `cosmos.distribution.v1beta1.Msg/WithdrawValidatorCommission` | +| Signer | `validator_address` | +| Amino name | `cosmos-sdk/MsgWithdrawValCommission` | + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", + "validator_address": "<string>" +} +``` + +Response `MsgWithdrawValidatorCommissionResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.base.v1beta1.Coin + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `amount` | `string` | Encoded as cosmos.Int. | + +### cosmos.base.v1beta1.DecCoin + +DecCoin defines a token with a denomination and a decimal amount. + +NOTE: The amount field is a Dec which implements the custom method signatures required by gogoproto. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `amount` | `string` | Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | + +### cosmos.distribution.v1beta1.DelegationDelegatorReward + +DelegationDelegatorReward represents the properties of a delegator's delegation reward. + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `reward` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | | + +### cosmos.distribution.v1beta1.DelegatorStartingInfo + +DelegatorStartingInfo represents the starting info for a delegator reward period. It tracks the previous validator period, the delegation's amount of staking token, and the creation height (to check later on if any slashes have occurred). NOTE: Even though validators are slashed to whole staking tokens, the delegators within the validator may be left with less than a full token, thus sdk.Dec is used. + +| Field | Type | Description | +| --- | --- | --- | +| `previous_period` | `uint64` | | +| `stake` | `string` | Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `height` | `uint64` | | + +### cosmos.distribution.v1beta1.Params + +Params defines the set of params for the distribution module. + +| Field | Type | Description | +| --- | --- | --- | +| `community_tax` | `string` | Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `base_proposer_reward` | `string` | Deprecated: The base_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism. Deprecated. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `bonus_proposer_reward` | `string` | Deprecated: The bonus_proposer_reward field is deprecated and is no longer used in the x/distribution module's reward mechanism. Deprecated. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `withdraw_addr_enabled` | `bool` | | + +### cosmos.distribution.v1beta1.ValidatorAccumulatedCommission + +ValidatorAccumulatedCommission represents accumulated commission for a validator kept as a running counter, can be withdrawn at any time. + +| Field | Type | Description | +| --- | --- | --- | +| `commission` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | | + +### cosmos.distribution.v1beta1.ValidatorCurrentRewards + +ValidatorCurrentRewards represents current rewards and current period for a validator kept as a running counter and incremented each block as long as the validator's tokens remain constant. + +| Field | Type | Description | +| --- | --- | --- | +| `rewards` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | | +| `period` | `uint64` | | + +### cosmos.distribution.v1beta1.ValidatorHistoricalRewards + +ValidatorHistoricalRewards represents historical rewards for a validator. Height is implicit within the store key. Cumulative reward ratio is the sum from the zeroeth period until this period of rewards / tokens, per the spec. The reference count indicates the number of objects which might need to reference this historical entry at any point. ReferenceCount = number of outstanding delegations which ended the associated period (and might need to read that record) + number of slashes which ended the associated period (and might need to read that record) + one per validator for the zeroeth period, set on initialization + +| Field | Type | Description | +| --- | --- | --- | +| `cumulative_reward_ratio` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | | +| `reference_count` | `uint32` | | + +### cosmos.distribution.v1beta1.ValidatorOutstandingRewards + +ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards for a validator inexpensive to track, allows simple sanity checks. + +| Field | Type | Description | +| --- | --- | --- | +| `rewards` | [`DecCoin`](#cosmos-base-v1beta1-deccoin)[] | | + +### cosmos.distribution.v1beta1.ValidatorSlashEvent + +ValidatorSlashEvent represents a validator slash event. Height is implicit within the store key. This is needed to calculate appropriate amount of staking tokens for delegations which are withdrawn after a slash has occurred. + +| Field | Type | Description | +| --- | --- | --- | +| `validator_period` | `uint64` | | +| `fraction` | `string` | Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | + + diff --git a/sdk/next/api-reference/grpc/epochs.mdx b/sdk/next/api-reference/grpc/epochs.mdx new file mode 100644 index 00000000..01736acf --- /dev/null +++ b/sdk/next/api-reference/grpc/epochs.mdx @@ -0,0 +1,94 @@ +--- +title: "Epochs" +description: "gRPC queries and transaction messages defined by the epochs module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### CurrentEpoch + +CurrentEpoch provide current epoch of specified identifier + +| | | +| --- | --- | +| gRPC | `cosmos.epochs.v1beta1.Query/CurrentEpoch` | +| REST | `GET /cosmos/epochs/v1beta1/current_epoch` | + +Request `QueryCurrentEpochRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `identifier` | `string` | | + +Response `QueryCurrentEpochResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `current_epoch` | `int64` | | + +```bash +grpcurl -plaintext -d '{"identifier":"<string>"}' \ + localhost:9090 cosmos.epochs.v1beta1.Query/CurrentEpoch +``` + +### EpochInfos + +EpochInfos provide running epochInfos + +| | | +| --- | --- | +| gRPC | `cosmos.epochs.v1beta1.Query/EpochInfos` | +| REST | `GET /cosmos/epochs/v1beta1/epochs` | + +Request `QueryEpochInfosRequest`: + +This message has no fields. + +Response `QueryEpochInfosResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `epochs` | [`EpochInfo`](#cosmos-epochs-v1beta1-epochinfo)[] | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.epochs.v1beta1.Query/EpochInfos +``` + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.epochs.v1beta1.EpochInfo + +EpochInfo is a struct that describes the data going into a timer defined by the x/epochs module. + +| Field | Type | Description | +| --- | --- | --- | +| `identifier` | `string` | identifier is a unique reference to this particular timer. | +| `start_time` | `Timestamp` | start_time is the time at which the timer first ever ticks. If start_time is in the future, the epoch will not begin until the start time. | +| `duration` | `Duration` | duration is the time in between epoch ticks. In order for intended behavior to be met, duration should be greater than the chains expected block time. Duration must be non-zero. | +| `current_epoch` | `int64` | current_epoch is the current epoch number, or in other words, how many times has the timer 'ticked'. The first tick (current_epoch=1) is defined as the first block whose blocktime is greater than the EpochInfo start_time. | +| `current_epoch_start_time` | `Timestamp` | current_epoch_start_time describes the start time of the current timer interval. The interval is (current_epoch_start_time, current_epoch_start_time + duration] When the timer ticks, this is set to current_epoch_start_time = last_epoch_start_time + duration only one timer tick for a given identifier can occur per block. NOTE! The current_epoch_start_time may diverge significantly from the wall-clock time the epoch began at. Wall-clock time of epoch start may be >> current_epoch_start_time. Suppose current_epoch_start_time = 10, duration = 5. Suppose the chain goes offline at t=14, and comes back online at t=30, and produces blocks at every successive time. (t=31, 32, etc.) * The t=30 block will start the epoch for (10, 15] * The t=31 block will start the epoch for (15, 20] * The t=32 block will start the epoch for (20, 25] * The t=33 block will start the epoch for (25, 30] * The t=34 block will start the epoch for (30, 35] * The **t=36** block will start the epoch for (35, 40] | +| `epoch_counting_started` | `bool` | epoch_counting_started is a boolean, that indicates whether this epoch timer has began yet. | +| `current_epoch_start_height` | `int64` | current_epoch_start_height is the block height at which the current epoch started. (The block height at which the timer last ticked) | + + diff --git a/sdk/next/api-reference/grpc/evidence.mdx b/sdk/next/api-reference/grpc/evidence.mdx new file mode 100644 index 00000000..22320b66 --- /dev/null +++ b/sdk/next/api-reference/grpc/evidence.mdx @@ -0,0 +1,155 @@ +--- +title: "Evidence" +description: "gRPC queries and transaction messages defined by the evidence module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### AllEvidence + +AllEvidence queries all evidence. + +| | | +| --- | --- | +| gRPC | `cosmos.evidence.v1beta1.Query/AllEvidence` | +| REST | `GET /cosmos/evidence/v1beta1/evidence` | + +Request `QueryAllEvidenceRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryAllEvidenceResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `evidence` | `Any`[] | evidence returns all evidences. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.evidence.v1beta1.Query/AllEvidence +``` + +### Evidence + +Evidence queries evidence based on evidence hash. + +| | | +| --- | --- | +| gRPC | `cosmos.evidence.v1beta1.Query/Evidence` | +| REST | `GET /cosmos/evidence/v1beta1/evidence/{hash}` | + +Request `QueryEvidenceRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `evidence_hash` | `bytes` | evidence_hash defines the hash of the requested evidence. Deprecated: Use hash, a HEX encoded string, instead. Deprecated. | +| `hash` | `string` | hash defines the evidence hash of the requested evidence. | + +Response `QueryEvidenceResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `evidence` | `Any` | evidence returns the requested evidence. | + +```bash +grpcurl -plaintext -d '{"hash":"<string>"}' \ + localhost:9090 cosmos.evidence.v1beta1.Query/Evidence +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/next/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/next/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/next/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### SubmitEvidence + +SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or counterfactual signing. + +| | | +| --- | --- | +| Type URL | `/cosmos.evidence.v1beta1.MsgSubmitEvidence` | +| Handler | `cosmos.evidence.v1beta1.Msg/SubmitEvidence` | +| Signer | `submitter` | +| Amino name | `cosmos-sdk/MsgSubmitEvidence` | + +| Field | Type | Description | +| --- | --- | --- | +| `submitter` | `string` | submitter is the signer account address of evidence. Encoded as cosmos.AddressString. | +| `evidence` | `Any` | evidence defines the evidence of misbehavior. Accepts any message implementing cosmos.evidence.v1beta1.Evidence. | + +In a transaction: + +```json +{ + "@type": "/cosmos.evidence.v1beta1.MsgSubmitEvidence", + "submitter": "<string>", + "evidence": { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + } +} +``` + +Response `MsgSubmitEvidenceResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `hash` | `bytes` | hash defines the hash of the evidence. | + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + + diff --git a/sdk/next/api-reference/grpc/feegrant.mdx b/sdk/next/api-reference/grpc/feegrant.mdx new file mode 100644 index 00000000..bca903e5 --- /dev/null +++ b/sdk/next/api-reference/grpc/feegrant.mdx @@ -0,0 +1,252 @@ +--- +title: "Feegrant" +description: "gRPC queries and transaction messages defined by the feegrant module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### Allowance + +Allowance returns granted allowance to the grantee by the granter. + +| | | +| --- | --- | +| gRPC | `cosmos.feegrant.v1beta1.Query/Allowance` | +| REST | `GET /cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}` | + +Request `QueryAllowanceRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | granter is the address of the user granting an allowance of their funds. Encoded as cosmos.AddressString. | +| `grantee` | `string` | grantee is the address of the user being granted an allowance of another user's funds. Encoded as cosmos.AddressString. | + +Response `QueryAllowanceResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `allowance` | [`Grant`](#cosmos-feegrant-v1beta1-grant) | allowance is an allowance granted for grantee by granter. | + +```bash +grpcurl -plaintext -d '{"granter":"<string>","grantee":"<string>"}' \ + localhost:9090 cosmos.feegrant.v1beta1.Query/Allowance +``` + +### Allowances + +Allowances returns all the grants for the given grantee address. + +| | | +| --- | --- | +| gRPC | `cosmos.feegrant.v1beta1.Query/Allowances` | +| REST | `GET /cosmos/feegrant/v1beta1/allowances/{grantee}` | + +Request `QueryAllowancesRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `grantee` | `string` | Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines a pagination for the request. | + +Response `QueryAllowancesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `allowances` | [`Grant`](#cosmos-feegrant-v1beta1-grant)[] | allowances are allowance's granted for grantee by granter. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines a pagination for the response. | + +```bash +grpcurl -plaintext -d '{"grantee":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.feegrant.v1beta1.Query/Allowances +``` + +### AllowancesByGranter + +AllowancesByGranter returns all the grants given by an address + +| | | +| --- | --- | +| gRPC | `cosmos.feegrant.v1beta1.Query/AllowancesByGranter` | +| REST | `GET /cosmos/feegrant/v1beta1/issued/{granter}` | + +Request `QueryAllowancesByGranterRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines a pagination for the request. | + +Response `QueryAllowancesByGranterResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `allowances` | [`Grant`](#cosmos-feegrant-v1beta1-grant)[] | allowances that have been issued by the granter. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines a pagination for the response. | + +```bash +grpcurl -plaintext -d '{"granter":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.feegrant.v1beta1.Query/AllowancesByGranter +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/next/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/next/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/next/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### GrantAllowance + +GrantAllowance grants fee allowance to the grantee on the granter's account with the provided expiration time. + +| | | +| --- | --- | +| Type URL | `/cosmos.feegrant.v1beta1.MsgGrantAllowance` | +| Handler | `cosmos.feegrant.v1beta1.Msg/GrantAllowance` | +| Signer | `granter` | +| Amino name | `cosmos-sdk/MsgGrantAllowance` | + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | granter is the address of the user granting an allowance of their funds. Encoded as cosmos.AddressString. | +| `grantee` | `string` | grantee is the address of the user being granted an allowance of another user's funds. Encoded as cosmos.AddressString. | +| `allowance` | `Any` | allowance can be any of basic, periodic, allowed fee allowance. One of: `/cosmos.feegrant.v1beta1.AllowedMsgAllowance`, `/cosmos.feegrant.v1beta1.BasicAllowance`, `/cosmos.feegrant.v1beta1.PeriodicAllowance`. | + +In a transaction: + +```json +{ + "@type": "/cosmos.feegrant.v1beta1.MsgGrantAllowance", + "granter": "<string>", + "grantee": "<string>", + "allowance": { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + } +} +``` + +Response `MsgGrantAllowanceResponse`: + +This message has no fields. + +### PruneAllowances + +PruneAllowances prunes expired fee allowances, currently up to 75 at a time. + +| | | +| --- | --- | +| Type URL | `/cosmos.feegrant.v1beta1.MsgPruneAllowances` | +| Handler | `cosmos.feegrant.v1beta1.Msg/PruneAllowances` | +| Signer | `pruner` | +| Amino name | none registered | + +| Field | Type | Description | +| --- | --- | --- | +| `pruner` | `string` | pruner is the address of the user pruning expired allowances. Encoded as cosmos.AddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.feegrant.v1beta1.MsgPruneAllowances", + "pruner": "<string>" +} +``` + +Response `MsgPruneAllowancesResponse`: + +This message has no fields. + +### RevokeAllowance + +RevokeAllowance revokes any fee allowance of granter's account that has been granted to the grantee. + +| | | +| --- | --- | +| Type URL | `/cosmos.feegrant.v1beta1.MsgRevokeAllowance` | +| Handler | `cosmos.feegrant.v1beta1.Msg/RevokeAllowance` | +| Signer | `granter` | +| Amino name | `cosmos-sdk/MsgRevokeAllowance` | + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | granter is the address of the user granting an allowance of their funds. Encoded as cosmos.AddressString. | +| `grantee` | `string` | grantee is the address of the user being granted an allowance of another user's funds. Encoded as cosmos.AddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", + "granter": "<string>", + "grantee": "<string>" +} +``` + +Response `MsgRevokeAllowanceResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.feegrant.v1beta1.Grant + +Grant is stored in the KVStore to record a grant with full context + +| Field | Type | Description | +| --- | --- | --- | +| `granter` | `string` | granter is the address of the user granting an allowance of their funds. Encoded as cosmos.AddressString. | +| `grantee` | `string` | grantee is the address of the user being granted an allowance of another user's funds. Encoded as cosmos.AddressString. | +| `allowance` | `Any` | allowance can be any of basic, periodic, allowed fee allowance. One of: `/cosmos.feegrant.v1beta1.AllowedMsgAllowance`, `/cosmos.feegrant.v1beta1.BasicAllowance`, `/cosmos.feegrant.v1beta1.PeriodicAllowance`. | + + diff --git a/sdk/next/api-reference/grpc/gov.mdx b/sdk/next/api-reference/grpc/gov.mdx new file mode 100644 index 00000000..33ebf99e --- /dev/null +++ b/sdk/next/api-reference/grpc/gov.mdx @@ -0,0 +1,1234 @@ +--- +title: "Gov" +description: "gRPC queries and transaction messages defined by the gov module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +## cosmos.gov.v1.Query + +Query defines the gRPC querier service for gov module + +### Constitution + +Constitution queries the chain's constitution. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Constitution` | +| REST | `GET /cosmos/gov/v1/constitution` | + +Request `QueryConstitutionRequest`: + +This message has no fields. + +Response `QueryConstitutionResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `constitution` | `string` | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.gov.v1.Query/Constitution +``` + +### Deposit (Query, v1) + +Deposit queries single deposit information based on proposalID, depositAddr. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Deposit` | +| REST | `GET /cosmos/gov/v1/proposals/{proposalId}/deposits/{depositor}` | + +Request `QueryDepositRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | + +Response `QueryDepositResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `deposit` | [`Deposit`](#cosmos-gov-v1-deposit) | deposit defines the requested deposit. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","depositor":"<string>"}' \ + localhost:9090 cosmos.gov.v1.Query/Deposit +``` + +### Deposits (v1) + +Deposits queries all deposits of a single proposal. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Deposits` | +| REST | `GET /cosmos/gov/v1/proposals/{proposalId}/deposits` | + +Request `QueryDepositsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDepositsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `deposits` | [`Deposit`](#cosmos-gov-v1-deposit)[] | deposits defines the requested deposits. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.gov.v1.Query/Deposits +``` + +### Params (v1) + +Params queries all parameters of the gov module. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Params` | +| REST | `GET /cosmos/gov/v1/params/{paramsType}` | + +Request `QueryParamsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `params_type` | `string` | params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit". | + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `voting_params` | [`VotingParams`](#cosmos-gov-v1-votingparams) | Deprecated: Prefer to use `params` instead. voting_params defines the parameters related to voting. Deprecated. | +| `deposit_params` | [`DepositParams`](#cosmos-gov-v1-depositparams) | Deprecated: Prefer to use `params` instead. deposit_params defines the parameters related to deposit. Deprecated. | +| `tally_params` | [`TallyParams`](#cosmos-gov-v1-tallyparams) | Deprecated: Prefer to use `params` instead. tally_params defines the parameters related to tally. Deprecated. | +| `params` | [`Params`](#cosmos-gov-v1-params) | params defines all the parameters of x/gov module. | + +```bash +grpcurl -plaintext -d '{"params_type":"voting"}' \ + localhost:9090 cosmos.gov.v1.Query/Params +``` + +### Proposal (v1) + +Proposal queries proposal details based on ProposalID. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Proposal` | +| REST | `GET /cosmos/gov/v1/proposals/{proposalId}` | + +Request `QueryProposalRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | + +Response `QueryProposalResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal` | [`Proposal`](#cosmos-gov-v1-proposal) | proposal is the requested governance proposal. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1"}' \ + localhost:9090 cosmos.gov.v1.Query/Proposal +``` + +### Proposals (v1) + +Proposals queries all proposals based on given status. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Proposals` | +| REST | `GET /cosmos/gov/v1/proposals` | + +Request `QueryProposalsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_status` | [`ProposalStatus`](#cosmos-gov-v1-proposalstatus) | proposal_status defines the status of the proposals. | +| `voter` | `string` | voter defines the voter address for the proposals. Encoded as cosmos.AddressString. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryProposalsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposals` | [`Proposal`](#cosmos-gov-v1-proposal)[] | proposals defines all the requested governance proposals. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"proposal_status":"PROPOSAL_STATUS_DEPOSIT_PERIOD","voter":"<string>","depositor":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.gov.v1.Query/Proposals +``` + +### TallyResult (v1) + +TallyResult queries the tally of a proposal vote. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/TallyResult` | +| REST | `GET /cosmos/gov/v1/proposals/{proposalId}/tally` | + +Request `QueryTallyResultRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | + +Response `QueryTallyResultResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `tally` | [`TallyResult`](#cosmos-gov-v1-tallyresult) | tally defines the requested tally. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1"}' \ + localhost:9090 cosmos.gov.v1.Query/TallyResult +``` + +### Vote (Query, v1) + +Vote queries voted information based on proposalID, voterAddr. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Vote` | +| REST | `GET /cosmos/gov/v1/proposals/{proposalId}/votes/{voter}` | + +Request `QueryVoteRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter defines the voter address for the proposals. Encoded as cosmos.AddressString. | + +Response `QueryVoteResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `vote` | [`Vote`](#cosmos-gov-v1-vote) | vote defines the queried vote. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","voter":"<string>"}' \ + localhost:9090 cosmos.gov.v1.Query/Vote +``` + +### Votes (v1) + +Votes queries votes of a given proposal. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1.Query/Votes` | +| REST | `GET /cosmos/gov/v1/proposals/{proposalId}/votes` | + +Request `QueryVotesRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryVotesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `votes` | [`Vote`](#cosmos-gov-v1-vote)[] | votes defines the queried votes. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.gov.v1.Query/Votes +``` + +## cosmos.gov.v1beta1.Query + +Query defines the gRPC querier service for gov module + +### Deposit (Query, v1beta1) + +Deposit queries single deposit information based on proposalID, depositor address. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/Deposit` | +| REST | `GET /cosmos/gov/v1beta1/proposals/{proposalId}/deposits/{depositor}` | + +Request `QueryDepositRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | + +Response `QueryDepositResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `deposit` | [`Deposit`](#cosmos-gov-v1beta1-deposit) | deposit defines the requested deposit. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","depositor":"<string>"}' \ + localhost:9090 cosmos.gov.v1beta1.Query/Deposit +``` + +### Deposits (v1beta1) + +Deposits queries all deposits of a single proposal. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/Deposits` | +| REST | `GET /cosmos/gov/v1beta1/proposals/{proposalId}/deposits` | + +Request `QueryDepositsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDepositsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `deposits` | [`Deposit`](#cosmos-gov-v1beta1-deposit)[] | deposits defines the requested deposits. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.gov.v1beta1.Query/Deposits +``` + +### Params (v1beta1) + +Params queries all parameters of the gov module. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/Params` | +| REST | `GET /cosmos/gov/v1beta1/params/{paramsType}` | + +Request `QueryParamsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `params_type` | `string` | params_type defines which parameters to query for, can be one of "voting", "tallying" or "deposit". | + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `voting_params` | [`VotingParams`](#cosmos-gov-v1beta1-votingparams) | voting_params defines the parameters related to voting. | +| `deposit_params` | [`DepositParams`](#cosmos-gov-v1beta1-depositparams) | deposit_params defines the parameters related to deposit. | +| `tally_params` | [`TallyParams`](#cosmos-gov-v1beta1-tallyparams) | tally_params defines the parameters related to tally. | + +```bash +grpcurl -plaintext -d '{"params_type":"voting"}' \ + localhost:9090 cosmos.gov.v1beta1.Query/Params +``` + +### Proposal (v1beta1) + +Proposal queries proposal details based on ProposalID. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/Proposal` | +| REST | `GET /cosmos/gov/v1beta1/proposals/{proposalId}` | + +Request `QueryProposalRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | + +Response `QueryProposalResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal` | [`Proposal`](#cosmos-gov-v1beta1-proposal) | | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1"}' \ + localhost:9090 cosmos.gov.v1beta1.Query/Proposal +``` + +### Proposals (v1beta1) + +Proposals queries all proposals based on given status. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/Proposals` | +| REST | `GET /cosmos/gov/v1beta1/proposals` | + +Request `QueryProposalsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_status` | [`ProposalStatus`](#cosmos-gov-v1beta1-proposalstatus) | proposal_status defines the status of the proposals. | +| `voter` | `string` | voter defines the voter address for the proposals. Encoded as cosmos.AddressString. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryProposalsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposals` | [`Proposal`](#cosmos-gov-v1beta1-proposal)[] | proposals defines all the requested governance proposals. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"proposal_status":"PROPOSAL_STATUS_DEPOSIT_PERIOD","voter":"<string>","depositor":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.gov.v1beta1.Query/Proposals +``` + +### TallyResult (v1beta1) + +TallyResult queries the tally of a proposal vote. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/TallyResult` | +| REST | `GET /cosmos/gov/v1beta1/proposals/{proposalId}/tally` | + +Request `QueryTallyResultRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | + +Response `QueryTallyResultResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `tally` | [`TallyResult`](#cosmos-gov-v1beta1-tallyresult) | tally defines the requested tally. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1"}' \ + localhost:9090 cosmos.gov.v1beta1.Query/TallyResult +``` + +### Vote (Query, v1beta1) + +Vote queries voted information based on proposalID, voterAddr. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/Vote` | +| REST | `GET /cosmos/gov/v1beta1/proposals/{proposalId}/votes/{voter}` | + +Request `QueryVoteRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter defines the voter address for the proposals. Encoded as cosmos.AddressString. | + +Response `QueryVoteResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `vote` | [`Vote`](#cosmos-gov-v1beta1-vote) | vote defines the queried vote. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","voter":"<string>"}' \ + localhost:9090 cosmos.gov.v1beta1.Query/Vote +``` + +### Votes (v1beta1) + +Votes queries votes of a given proposal. + +| | | +| --- | --- | +| gRPC | `cosmos.gov.v1beta1.Query/Votes` | +| REST | `GET /cosmos/gov/v1beta1/proposals/{proposalId}/votes` | + +Request `QueryVotesRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryVotesResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `votes` | [`Vote`](#cosmos-gov-v1beta1-vote)[] | votes defines the queried votes. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"proposal_id":"1","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.gov.v1beta1.Query/Votes +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/next/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/next/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/next/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### CancelProposal + +CancelProposal defines a method to cancel governance proposal + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1.MsgCancelProposal` | +| Handler | `cosmos.gov.v1.Msg/CancelProposal` | +| Signer | `proposer` | +| Amino name | none registered | + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `proposer` | `string` | proposer is the account address of the proposer. Encoded as cosmos.AddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1.MsgCancelProposal", + "proposal_id": "1", + "proposer": "<string>" +} +``` + +Response `MsgCancelProposalResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `canceled_time` | `Timestamp` | canceled_time is the time when proposal is canceled. | +| `canceled_height` | `uint64` | canceled_height defines the block height at which the proposal is canceled. | + +### Deposit (Msg, v1) + +Deposit defines a method to add deposit on a specific proposal. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1.MsgDeposit` | +| Handler | `cosmos.gov.v1.Msg/Deposit` | +| Signer | `depositor` | +| Amino name | `cosmos-sdk/v1/MsgDeposit` | + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | amount to be deposited by depositor. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1.MsgDeposit", + "proposal_id": "1", + "depositor": "<string>", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] +} +``` + +Response `MsgDepositResponse`: + +This message has no fields. + +### ExecLegacyContent + +ExecLegacyContent defines a Msg to be in included in a MsgSubmitProposal to execute a legacy content-based proposal. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1.MsgExecLegacyContent` | +| Handler | `cosmos.gov.v1.Msg/ExecLegacyContent` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/v1/MsgExecLegacyContent` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `content` | `Any` | content is the proposal's content. One of: `/cosmos.distribution.v1beta1.CommunityPoolSpendProposal`, `/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit`, `/cosmos.gov.v1beta1.TextProposal`, `/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal`, `/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal`. | +| `authority` | `string` | authority must be the gov module address. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1.MsgExecLegacyContent", + "content": { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + }, + "authority": "<string>" +} +``` + +Response `MsgExecLegacyContentResponse`: + +This message has no fields. + +### SubmitProposal (v1) + +SubmitProposal defines a method to create new proposal given the messages. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1.MsgSubmitProposal` | +| Handler | `cosmos.gov.v1.Msg/SubmitProposal` | +| Signer | `proposer` | +| Amino name | `cosmos-sdk/v1/MsgSubmitProposal` | + +| Field | Type | Description | +| --- | --- | --- | +| `messages` | `Any`[] | messages are the arbitrary messages to be executed if proposal passes. | +| `initial_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | initial_deposit is the deposit value that must be paid at proposal submission. | +| `proposer` | `string` | proposer is the account address of the proposer. Encoded as cosmos.AddressString. | +| `metadata` | `string` | metadata is any arbitrary metadata attached to the proposal. | +| `title` | `string` | title is the title of the proposal. | +| `summary` | `string` | summary is the summary of the proposal | +| `expedited` | `bool` | expedited defines if the proposal is expedited or not | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1.MsgSubmitProposal", + "messages": [ + { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + } + ], + "initial_deposit": [ + { + "denom": "<string>", + "amount": "<string>" + } + ], + "proposer": "<string>", + "metadata": "<string>", + "title": "<string>", + "summary": "<string>", + "expedited": false +} +``` + +Response `MsgSubmitProposalResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | + +### UpdateParams + +UpdateParams defines a governance operation for updating the x/gov module parameters. The authority is defined in the keeper. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1.MsgUpdateParams` | +| Handler | `cosmos.gov.v1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/x/gov/v1/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `params` | [`Params`](#cosmos-gov-v1-params) | params defines the x/gov parameters to update. NOTE: All parameters must be supplied. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1.MsgUpdateParams", + "authority": "<string>", + "params": { + "min_deposit": [ + { + "denom": "<string>", + "amount": "<string>" + } + ], + "max_deposit_period": "0s", + "voting_period": "0s", + "quorum": "<string>", + "threshold": "<string>", + "veto_threshold": "<string>", + "min_initial_deposit_ratio": "<string>", + "proposal_cancel_ratio": "<string>", + "proposal_cancel_dest": "<string>", + "expedited_voting_period": "0s", + "expedited_threshold": "<string>", + "expedited_min_deposit": [ + { + "denom": "<string>", + "amount": "<string>" + } + ], + "burn_vote_quorum": false, + "burn_proposal_deposit_prevote": false, + "burn_vote_veto": false, + "min_deposit_ratio": "<string>" + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + +### Vote (Msg, v1) + +Vote defines a method to add a vote on a specific proposal. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1.MsgVote` | +| Handler | `cosmos.gov.v1.Msg/Vote` | +| Signer | `voter` | +| Amino name | `cosmos-sdk/v1/MsgVote` | + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter is the voter address for the proposal. Encoded as cosmos.AddressString. | +| `option` | [`VoteOption`](#cosmos-gov-v1-voteoption) | option defines the vote option. | +| `metadata` | `string` | metadata is any arbitrary metadata attached to the Vote. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1.MsgVote", + "proposal_id": "1", + "voter": "<string>", + "option": "VOTE_OPTION_YES", + "metadata": "<string>" +} +``` + +Response `MsgVoteResponse`: + +This message has no fields. + +### VoteWeighted (v1) + +VoteWeighted defines a method to add a weighted vote on a specific proposal. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1.MsgVoteWeighted` | +| Handler | `cosmos.gov.v1.Msg/VoteWeighted` | +| Signer | `voter` | +| Amino name | `cosmos-sdk/v1/MsgVoteWeighted` | + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter is the voter address for the proposal. Encoded as cosmos.AddressString. | +| `options` | [`WeightedVoteOption`](#cosmos-gov-v1-weightedvoteoption)[] | options defines the weighted vote options. | +| `metadata` | `string` | metadata is any arbitrary metadata attached to the VoteWeighted. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1.MsgVoteWeighted", + "proposal_id": "1", + "voter": "<string>", + "options": [ + { + "option": "VOTE_OPTION_YES", + "weight": "<string>" + } + ], + "metadata": "<string>" +} +``` + +Response `MsgVoteWeightedResponse`: + +This message has no fields. + +### Deposit (Msg, v1beta1) + +Deposit defines a method to add deposit on a specific proposal. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1beta1.MsgDeposit` | +| Handler | `cosmos.gov.v1beta1.Msg/Deposit` | +| Signer | `depositor` | +| Amino name | `cosmos-sdk/MsgDeposit` | + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | amount to be deposited by depositor. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1beta1.MsgDeposit", + "proposal_id": "1", + "depositor": "<string>", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] +} +``` + +Response `MsgDepositResponse`: + +This message has no fields. + +### SubmitProposal (v1beta1) + +SubmitProposal defines a method to create new proposal given a content. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1beta1.MsgSubmitProposal` | +| Handler | `cosmos.gov.v1beta1.Msg/SubmitProposal` | +| Signer | `proposer` | +| Amino name | `cosmos-sdk/MsgSubmitProposal` | + +| Field | Type | Description | +| --- | --- | --- | +| `content` | `Any` | content is the proposal's content. One of: `/cosmos.distribution.v1beta1.CommunityPoolSpendProposal`, `/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit`, `/cosmos.gov.v1beta1.TextProposal`, `/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal`, `/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal`. | +| `initial_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | initial_deposit is the deposit value that must be paid at proposal submission. | +| `proposer` | `string` | proposer is the account address of the proposer. Encoded as cosmos.AddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1beta1.MsgSubmitProposal", + "content": { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + }, + "initial_deposit": [ + { + "denom": "<string>", + "amount": "<string>" + } + ], + "proposer": "<string>" +} +``` + +Response `MsgSubmitProposalResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | + +### Vote (Msg, v1beta1) + +Vote defines a method to add a vote on a specific proposal. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1beta1.MsgVote` | +| Handler | `cosmos.gov.v1beta1.Msg/Vote` | +| Signer | `voter` | +| Amino name | `cosmos-sdk/MsgVote` | + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter is the voter address for the proposal. Encoded as cosmos.AddressString. | +| `option` | [`VoteOption`](#cosmos-gov-v1beta1-voteoption) | option defines the vote option. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1beta1.MsgVote", + "proposal_id": "1", + "voter": "<string>", + "option": "VOTE_OPTION_YES" +} +``` + +Response `MsgVoteResponse`: + +This message has no fields. + +### VoteWeighted (v1beta1) + +VoteWeighted defines a method to add a weighted vote on a specific proposal. + +| | | +| --- | --- | +| Type URL | `/cosmos.gov.v1beta1.MsgVoteWeighted` | +| Handler | `cosmos.gov.v1beta1.Msg/VoteWeighted` | +| Signer | `voter` | +| Amino name | `cosmos-sdk/MsgVoteWeighted` | + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter is the voter address for the proposal. Encoded as cosmos.AddressString. | +| `options` | [`WeightedVoteOption`](#cosmos-gov-v1beta1-weightedvoteoption)[] | options defines the weighted vote options. | + +In a transaction: + +```json +{ + "@type": "/cosmos.gov.v1beta1.MsgVoteWeighted", + "proposal_id": "1", + "voter": "<string>", + "options": [ + { + "option": "VOTE_OPTION_YES", + "weight": "<string>" + } + ] +} +``` + +Response `MsgVoteWeightedResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.base.v1beta1.Coin + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `amount` | `string` | Encoded as cosmos.Int. | + +### cosmos.gov.v1.Deposit + +Deposit defines an amount deposited by an account address to an active proposal. + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | amount to be deposited by depositor. | + +### cosmos.gov.v1.DepositParams + +DepositParams defines the params for deposits on governance proposals. + +| Field | Type | Description | +| --- | --- | --- | +| `min_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | Minimum deposit for a proposal to enter voting period. | +| `max_deposit_period` | `Duration` | Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. | + +### cosmos.gov.v1.Params + +Params defines the parameters for the x/gov module. + +| Field | Type | Description | +| --- | --- | --- | +| `min_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | Minimum deposit for a proposal to enter voting period. | +| `max_deposit_period` | `Duration` | Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. | +| `voting_period` | `Duration` | Duration of the voting period. | +| `quorum` | `string` | Minimum percentage of total stake needed to vote for a result to be considered valid. Encoded as cosmos.Dec, a decimal string. | +| `threshold` | `string` | Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. Encoded as cosmos.Dec, a decimal string. | +| `veto_threshold` | `string` | Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. Encoded as cosmos.Dec, a decimal string. | +| `min_initial_deposit_ratio` | `string` | The ratio representing the proportion of the deposit value that must be paid at proposal submission. Encoded as cosmos.Dec, a decimal string. | +| `proposal_cancel_ratio` | `string` | The cancel ratio which will not be returned back to the depositors when a proposal is cancelled. Encoded as cosmos.Dec, a decimal string. | +| `proposal_cancel_dest` | `string` | The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. Encoded as cosmos.AddressString. | +| `expedited_voting_period` | `Duration` | Duration of the voting period of an expedited proposal. | +| `expedited_threshold` | `string` | Minimum proportion of Yes votes for proposal to pass. Default value: 0.67. Encoded as cosmos.Dec, a decimal string. | +| `expedited_min_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | Minimum expedited deposit for a proposal to enter voting period. | +| `burn_vote_quorum` | `bool` | burn deposits if a proposal does not meet quorum | +| `burn_proposal_deposit_prevote` | `bool` | burn deposits if the proposal does not enter voting period | +| `burn_vote_veto` | `bool` | burn deposits if quorum with vote type no_veto is met | +| `min_deposit_ratio` | `string` | The ratio representing the proportion of the deposit value minimum that must be met when making a deposit. Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be required. Encoded as cosmos.Dec, a decimal string. | + +### cosmos.gov.v1.Proposal + +Proposal defines the core field members of a governance proposal. + +| Field | Type | Description | +| --- | --- | --- | +| `id` | `uint64` | id defines the unique id of the proposal. | +| `messages` | `Any`[] | messages are the arbitrary messages to be executed if the proposal passes. | +| `status` | [`ProposalStatus`](#cosmos-gov-v1-proposalstatus) | status defines the proposal status. | +| `final_tally_result` | [`TallyResult`](#cosmos-gov-v1-tallyresult) | final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. | +| `submit_time` | `Timestamp` | submit_time is the time of proposal submission. | +| `deposit_end_time` | `Timestamp` | deposit_end_time is the end time for deposition. | +| `total_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | total_deposit is the total deposit on the proposal. | +| `voting_start_time` | `Timestamp` | voting_start_time is the starting time to vote on a proposal. | +| `voting_end_time` | `Timestamp` | voting_end_time is the end time of voting on a proposal. | +| `metadata` | `string` | metadata is any arbitrary metadata attached to the proposal. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#proposal-3 | +| `title` | `string` | title is the title of the proposal | +| `summary` | `string` | summary is a short summary of the proposal | +| `proposer` | `string` | proposer is the address of the proposal submitter Encoded as cosmos.AddressString. | +| `expedited` | `bool` | expedited defines if the proposal is expedited | +| `failed_reason` | `string` | failed_reason defines the reason why the proposal failed | + +### cosmos.gov.v1.ProposalStatus + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `PROPOSAL_STATUS_UNSPECIFIED` | Zero value. Handlers reject it. | +| `PROPOSAL_STATUS_DEPOSIT_PERIOD` | | +| `PROPOSAL_STATUS_VOTING_PERIOD` | | +| `PROPOSAL_STATUS_PASSED` | | +| `PROPOSAL_STATUS_REJECTED` | | +| `PROPOSAL_STATUS_FAILED` | | + +### cosmos.gov.v1.TallyParams + +TallyParams defines the params for tallying votes on governance proposals. + +| Field | Type | Description | +| --- | --- | --- | +| `quorum` | `string` | Minimum percentage of total stake needed to vote for a result to be considered valid. Encoded as cosmos.Dec, a decimal string. | +| `threshold` | `string` | Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. Encoded as cosmos.Dec, a decimal string. | +| `veto_threshold` | `string` | Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. Encoded as cosmos.Dec, a decimal string. | + +### cosmos.gov.v1.TallyResult + +TallyResult defines a standard tally for a governance proposal. + +| Field | Type | Description | +| --- | --- | --- | +| `yes_count` | `string` | yes_count is the number of yes votes on a proposal. Encoded as cosmos.Int. | +| `abstain_count` | `string` | abstain_count is the number of abstain votes on a proposal. Encoded as cosmos.Int. | +| `no_count` | `string` | no_count is the number of no votes on a proposal. Encoded as cosmos.Int. | +| `no_with_veto_count` | `string` | no_with_veto_count is the number of no with veto votes on a proposal. Encoded as cosmos.Int. | + +### cosmos.gov.v1.Vote + +Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter is the voter address of the proposal. Encoded as cosmos.AddressString. | +| `options` | [`WeightedVoteOption`](#cosmos-gov-v1-weightedvoteoption)[] | options is the weighted vote options. | +| `metadata` | `string` | metadata is any arbitrary metadata attached to the vote. the recommended format of the metadata is to be found here: https://docs.cosmos.network/v0.47/modules/gov#vote-5 | + +### cosmos.gov.v1.VoteOption + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `VOTE_OPTION_UNSPECIFIED` | Zero value. Handlers reject it. | +| `VOTE_OPTION_YES` | | +| `VOTE_OPTION_ABSTAIN` | | +| `VOTE_OPTION_NO` | | +| `VOTE_OPTION_NO_WITH_VETO` | | + +### cosmos.gov.v1.VotingParams + +VotingParams defines the params for voting on governance proposals. + +| Field | Type | Description | +| --- | --- | --- | +| `voting_period` | `Duration` | Duration of the voting period. | + +### cosmos.gov.v1.WeightedVoteOption + +WeightedVoteOption defines a unit of vote for vote split. + +| Field | Type | Description | +| --- | --- | --- | +| `option` | [`VoteOption`](#cosmos-gov-v1-voteoption) | option defines the valid vote options, it must not contain duplicate vote options. | +| `weight` | `string` | weight is the vote weight associated with the vote option. Encoded as cosmos.Dec, a decimal string. | + +### cosmos.gov.v1beta1.Deposit + +Deposit defines an amount deposited by an account address to an active proposal. + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `depositor` | `string` | depositor defines the deposit addresses from the proposals. Encoded as cosmos.AddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | amount to be deposited by depositor. | + +### cosmos.gov.v1beta1.DepositParams + +DepositParams defines the params for deposits on governance proposals. + +| Field | Type | Description | +| --- | --- | --- | +| `min_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | Minimum deposit for a proposal to enter voting period. | +| `max_deposit_period` | `Duration` | Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months. | + +### cosmos.gov.v1beta1.Proposal + +Proposal defines the core field members of a governance proposal. + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `content` | `Any` | content is the proposal's content. One of: `/cosmos.distribution.v1beta1.CommunityPoolSpendProposal`, `/cosmos.distribution.v1beta1.CommunityPoolSpendProposalWithDeposit`, `/cosmos.gov.v1beta1.TextProposal`, `/cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal`, `/cosmos.upgrade.v1beta1.SoftwareUpgradeProposal`. | +| `status` | [`ProposalStatus`](#cosmos-gov-v1beta1-proposalstatus) | status defines the proposal status. | +| `final_tally_result` | [`TallyResult`](#cosmos-gov-v1beta1-tallyresult) | final_tally_result is the final tally result of the proposal. When querying a proposal via gRPC, this field is not populated until the proposal's voting period has ended. | +| `submit_time` | `Timestamp` | submit_time is the time of proposal submission. | +| `deposit_end_time` | `Timestamp` | deposit_end_time is the end time for deposition. | +| `total_deposit` | [`Coin`](#cosmos-base-v1beta1-coin)[] | total_deposit is the total deposit on the proposal. | +| `voting_start_time` | `Timestamp` | voting_start_time is the starting time to vote on a proposal. | +| `voting_end_time` | `Timestamp` | voting_end_time is the end time of voting on a proposal. | + +### cosmos.gov.v1beta1.ProposalStatus + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `PROPOSAL_STATUS_UNSPECIFIED` | Zero value. Handlers reject it. | +| `PROPOSAL_STATUS_DEPOSIT_PERIOD` | | +| `PROPOSAL_STATUS_VOTING_PERIOD` | | +| `PROPOSAL_STATUS_PASSED` | | +| `PROPOSAL_STATUS_REJECTED` | | +| `PROPOSAL_STATUS_FAILED` | | + +### cosmos.gov.v1beta1.TallyParams + +TallyParams defines the params for tallying votes on governance proposals. + +| Field | Type | Description | +| --- | --- | --- | +| `quorum` | `bytes` | Minimum percentage of total stake needed to vote for a result to be considered valid. Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | +| `threshold` | `bytes` | Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | +| `veto_threshold` | `bytes` | Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3. Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | + +### cosmos.gov.v1beta1.TallyResult + +TallyResult defines a standard tally for a governance proposal. + +| Field | Type | Description | +| --- | --- | --- | +| `yes` | `string` | yes is the number of yes votes on a proposal. Encoded as cosmos.Int. | +| `abstain` | `string` | abstain is the number of abstain votes on a proposal. Encoded as cosmos.Int. | +| `no` | `string` | no is the number of no votes on a proposal. Encoded as cosmos.Int. | +| `no_with_veto` | `string` | no_with_veto is the number of no with veto votes on a proposal. Encoded as cosmos.Int. | + +### cosmos.gov.v1beta1.Vote + +Vote defines a vote on a governance proposal. A Vote consists of a proposal ID, the voter, and the vote option. + +| Field | Type | Description | +| --- | --- | --- | +| `proposal_id` | `uint64` | proposal_id defines the unique id of the proposal. | +| `voter` | `string` | voter is the voter address of the proposal. Encoded as cosmos.AddressString. | +| `option` | [`VoteOption`](#cosmos-gov-v1beta1-voteoption) | Deprecated: Prefer to use `options` instead. This field is set in queries if and only if `len(options) == 1` and that option has weight 1. In all other cases, this field will default to VOTE_OPTION_UNSPECIFIED. Deprecated. | +| `options` | [`WeightedVoteOption`](#cosmos-gov-v1beta1-weightedvoteoption)[] | options is the weighted vote options. | + +### cosmos.gov.v1beta1.VoteOption + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `VOTE_OPTION_UNSPECIFIED` | Zero value. Handlers reject it. | +| `VOTE_OPTION_YES` | | +| `VOTE_OPTION_ABSTAIN` | | +| `VOTE_OPTION_NO` | | +| `VOTE_OPTION_NO_WITH_VETO` | | + +### cosmos.gov.v1beta1.VotingParams + +VotingParams defines the params for voting on governance proposals. + +| Field | Type | Description | +| --- | --- | --- | +| `voting_period` | `Duration` | Duration of the voting period. | + +### cosmos.gov.v1beta1.WeightedVoteOption + +WeightedVoteOption defines a unit of vote for vote split. + +| Field | Type | Description | +| --- | --- | --- | +| `option` | [`VoteOption`](#cosmos-gov-v1beta1-voteoption) | option defines the valid vote options, it must not contain duplicate vote options. | +| `weight` | `string` | weight is the vote weight associated with the vote option. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | + + diff --git a/sdk/next/api-reference/grpc/index.mdx b/sdk/next/api-reference/grpc/index.mdx new file mode 100644 index 00000000..7b558ba8 --- /dev/null +++ b/sdk/next/api-reference/grpc/index.mdx @@ -0,0 +1,106 @@ +--- +title: "gRPC Services" +description: "How Cosmos SDK gRPC services are named, and how to list and call them against a running node." +--- + +Each module defines its API in protobuf. A `service` block groups related methods, and each `rpc` inside it declares one method with exactly one request message and one response message. + +```proto +package cosmos.bank.v1beta1; + +service Query { + rpc AllBalances(QueryAllBalancesRequest) returns (QueryAllBalancesResponse) { + option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}"; + } +} +``` + +Three parts combine into the name a node answers to: + +```text +cosmos.bank.v1beta1 . Query / AllBalances + package service method +``` + +The `google.api.http` option on the method is what produces the REST route on port 1317. Methods without that option are reachable over gRPC only. + +Modules define `Query` services and `Msg` services: + +- `Query` services are registered into the gRPC query router and served on port 9090. +- `Msg` services are registered into the message service router, which is consulted only while a transaction is being delivered. + +## Scalar encodings + +Some fields use SDK encoding conventions layered on protobuf `string` or `bytes` types. + +| Annotation | Meaning | +| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| `cosmos.Int` | Arbitrary-precision integer encoded as a base-10 string. `"8821829649"` means 8,821,829,649. | +| `cosmos.Dec` | Fixed-point decimal. Its encoding depends on the codec. | +| `cosmos.AddressString` | Bech32 account address, such as `cosmos1...` on the Cosmos Hub. | +| `cosmos.ValidatorAddressString` | Bech32 validator operator address, such as `cosmosvaloper1...`. | +| `cosmos.ConsensusAddressString` | Bech32 consensus address, such as `cosmosvalcons1...`. It is derived from the consensus key and differs from the operator address. | + +Account, operator, and consensus addresses belong to separate address spaces. Using the wrong type fails with `hrp does not match bech32 prefix`. Prefixes are chain-specific; query `cosmos.auth.v1beta1.Query/Bech32Prefix` to find them. + +### `cosmos.Dec` encodings + +The value 0.05 appears differently depending on where it is read or written: + +| Where | Form | Example | +| -------------------------------------------------------------- | --------------------------------------------------------- | ----------------------------------------------------- | +| Write through the CLI or `POST /cosmos/tx/v1beta1/encode` | Decimal string | `"0.05"` | +| Write with `grpcurl`, generated clients, or `Service/TxEncode` | Integer scaled by 10^18 | `"50000000000000000"` | +| Read through gRPC | Scaled integer, or its base64 encoding for `bytes` fields | `"50000000000000000"` or `"MTAwMDAwMDAwMDAwMDAwMDAw"` | +| Read through REST | Decimal string | `"0.050000000000000000"` | + +Field tables identify each field’s read encoding. When writing, transaction JSON uses decimal strings and protobuf JSON uses scaled integers. + +The wrong encoding may produce a valid but incorrect value. For example, `"50000000000000000"` in transaction JSON means fifty quadrillion, while the same value returned by `staking` as a scaled integer means 5%. + +## Other encodings + +JSON encodes `bytes` fields as base64. Hex input may decode successfully as base64 and produce the wrong value. + +A response’s `pagination.next_key` is already base64. Pass it back unchanged over gRPC. In a REST query string, percent-encode it so `+` is not interpreted as a space. + +An `Any` field contains an `@type` discriminator and the concrete message’s fields. For example, `cosmos.auth.v1beta1.Query/Account` may return a `BaseAccount`, `ModuleAccount`, or vesting account. + +Protobuf JSON usually omits fields with default values. A successful query with no matches may therefore return `{}` instead of an empty list. + +## List available services + +These pages cover the standard modules for one SDK version. Each chain registers its own services. When enabled, gRPC reflection gives the authoritative list: + +```bash +# List every service +grpcurl -plaintext localhost:9090 list + +# Describe one method +grpcurl -plaintext localhost:9090 describe \ + cosmos.bank.v1beta1.Query.AllBalances +``` + +If reflection is disabled, provide local proto files with `-import-path` and `-proto`. + +## Call a method + +Pass the request as JSON with `-d`. Fields accept either protobuf names such as `resolve_denom` or JSON names such as `resolveDenom`. + +```bash +grpcurl -plaintext \ + -d '{"address": "cosmos1..."}' \ + localhost:9090 cosmos.bank.v1beta1.Query/AllBalances +``` + +## Pagination + +List queries accept and return a `pagination` field. Use either an offset or a key: + +```bash +grpcurl -plaintext \ + -d '{"address": "cosmos1...", "pagination": {"limit": 10, "count_total": true}}' \ + localhost:9090 cosmos.bank.v1beta1.Query/AllBalances +``` + +Pass the returned `pagination.next_key` as `pagination.key` to request the next page. Key-based pagination is more efficient for large result sets. \ No newline at end of file diff --git a/sdk/next/api-reference/grpc/mint.mdx b/sdk/next/api-reference/grpc/mint.mdx new file mode 100644 index 00000000..b7d4434a --- /dev/null +++ b/sdk/next/api-reference/grpc/mint.mdx @@ -0,0 +1,164 @@ +--- +title: "Mint" +description: "gRPC queries and transaction messages defined by the mint module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### AnnualProvisions + +AnnualProvisions current minting annual provisions value. + +| | | +| --- | --- | +| gRPC | `cosmos.mint.v1beta1.Query/AnnualProvisions` | +| REST | `GET /cosmos/mint/v1beta1/annual_provisions` | + +Request `QueryAnnualProvisionsRequest`: + +This message has no fields. + +Response `QueryAnnualProvisionsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `annual_provisions` | `bytes` | annual_provisions is the current minting annual provisions value. Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.mint.v1beta1.Query/AnnualProvisions +``` + +### Inflation + +Inflation returns the current minting inflation value. + +| | | +| --- | --- | +| gRPC | `cosmos.mint.v1beta1.Query/Inflation` | +| REST | `GET /cosmos/mint/v1beta1/inflation` | + +Request `QueryInflationRequest`: + +This message has no fields. + +Response `QueryInflationResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `inflation` | `bytes` | inflation is the current minting inflation value. Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.mint.v1beta1.Query/Inflation +``` + +### Params + +Params returns the total set of minting parameters. + +| | | +| --- | --- | +| gRPC | `cosmos.mint.v1beta1.Query/Params` | +| REST | `GET /cosmos/mint/v1beta1/params` | + +Request `QueryParamsRequest`: + +This message has no fields. + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `params` | [`Params`](#cosmos-mint-v1beta1-params) | params defines the parameters of the module. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.mint.v1beta1.Query/Params +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/next/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/next/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/next/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### UpdateParams + +UpdateParams defines a governance operation for updating the x/mint module parameters. The authority is defaults to the x/gov module account. + +| | | +| --- | --- | +| Type URL | `/cosmos.mint.v1beta1.MsgUpdateParams` | +| Handler | `cosmos.mint.v1beta1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/x/mint/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `params` | [`Params`](#cosmos-mint-v1beta1-params) | params defines the x/mint parameters to update. NOTE: All parameters must be supplied. | + +In a transaction: + +```json +{ + "@type": "/cosmos.mint.v1beta1.MsgUpdateParams", + "authority": "<string>", + "params": { + "mint_denom": "<string>", + "inflation_rate_change": "<string>", + "inflation_max": "<string>", + "inflation_min": "<string>", + "goal_bonded": "<string>", + "blocks_per_year": "1", + "max_supply": "<string>" + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.mint.v1beta1.Params + +Params defines the parameters for the x/mint module. + +| Field | Type | Description | +| --- | --- | --- | +| `mint_denom` | `string` | type of coin to mint | +| `inflation_rate_change` | `string` | maximum annual change in inflation rate Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `inflation_max` | `string` | maximum inflation rate Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `inflation_min` | `string` | minimum inflation rate Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `goal_bonded` | `string` | goal of percent bonded atoms Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `blocks_per_year` | `uint64` | expected blocks per year | +| `max_supply` | `string` | maximum supply for the token. A value of "0" indicates an unlimited (infinite) maximum supply. Encoded as cosmos.Int. | + + diff --git a/sdk/next/api-reference/grpc/reflection.mdx b/sdk/next/api-reference/grpc/reflection.mdx new file mode 100644 index 00000000..540ed5c9 --- /dev/null +++ b/sdk/next/api-reference/grpc/reflection.mdx @@ -0,0 +1,48 @@ +--- +title: "Reflection" +description: "gRPC queries and transaction messages defined by the reflection module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### FileDescriptors + +FileDescriptors queries all the file descriptors in the app in order to enable easier generation of dynamic clients. + +| | | +| --- | --- | +| gRPC | `cosmos.reflection.v1.ReflectionService/FileDescriptors` | + +Request `FileDescriptorsRequest`: + +This message has no fields. + +Response `FileDescriptorsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `files` | `FileDescriptorProto`[] | files is the file descriptors. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.reflection.v1.ReflectionService/FileDescriptors +``` + diff --git a/sdk/next/api-reference/grpc/slashing.mdx b/sdk/next/api-reference/grpc/slashing.mdx new file mode 100644 index 00000000..43fac87d --- /dev/null +++ b/sdk/next/api-reference/grpc/slashing.mdx @@ -0,0 +1,233 @@ +--- +title: "Slashing" +description: "gRPC queries and transaction messages defined by the slashing module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### Params + +Params queries the parameters of slashing module + +| | | +| --- | --- | +| gRPC | `cosmos.slashing.v1beta1.Query/Params` | +| REST | `GET /cosmos/slashing/v1beta1/params` | + +Request `QueryParamsRequest`: + +This message has no fields. + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `params` | [`Params`](#cosmos-slashing-v1beta1-params) | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.slashing.v1beta1.Query/Params +``` + +### SigningInfo + +SigningInfo queries the signing info of given cons address + +| | | +| --- | --- | +| gRPC | `cosmos.slashing.v1beta1.Query/SigningInfo` | +| REST | `GET /cosmos/slashing/v1beta1/signing_infos/{consAddress}` | + +Request `QuerySigningInfoRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `cons_address` | `string` | cons_address is the address to query signing info of Encoded as cosmos.ConsensusAddressString. | + +Response `QuerySigningInfoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `val_signing_info` | [`ValidatorSigningInfo`](#cosmos-slashing-v1beta1-validatorsigninginfo) | val_signing_info is the signing info of requested val cons address | + +```bash +grpcurl -plaintext -d '{"cons_address":"<string>"}' \ + localhost:9090 cosmos.slashing.v1beta1.Query/SigningInfo +``` + +### SigningInfos + +SigningInfos queries signing info of all validators + +| | | +| --- | --- | +| gRPC | `cosmos.slashing.v1beta1.Query/SigningInfos` | +| REST | `GET /cosmos/slashing/v1beta1/signing_infos` | + +Request `QuerySigningInfosRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | | + +Response `QuerySigningInfosResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `info` | [`ValidatorSigningInfo`](#cosmos-slashing-v1beta1-validatorsigninginfo)[] | info is the signing info of all validators | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | | + +```bash +grpcurl -plaintext -d '{"pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.slashing.v1beta1.Query/SigningInfos +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/next/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/next/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/next/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### Unjail + +Unjail defines a method for unjailing a jailed validator, thus returning them into the bonded validator set, so they can begin receiving provisions and rewards again. + +| | | +| --- | --- | +| Type URL | `/cosmos.slashing.v1beta1.MsgUnjail` | +| Handler | `cosmos.slashing.v1beta1.Msg/Unjail` | +| Signer | `validator_addr` | +| Amino name | `cosmos-sdk/MsgUnjail` | + +| Field | Type | Description | +| --- | --- | --- | +| `validator_addr` | `string` | Encoded as cosmos.ValidatorAddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.slashing.v1beta1.MsgUnjail", + "validator_addr": "<string>" +} +``` + +Response `MsgUnjailResponse`: + +This message has no fields. + +### UpdateParams + +UpdateParams defines a governance operation for updating the x/slashing module parameters. The authority defaults to the x/gov module account. + +| | | +| --- | --- | +| Type URL | `/cosmos.slashing.v1beta1.MsgUpdateParams` | +| Handler | `cosmos.slashing.v1beta1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/x/slashing/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `params` | [`Params`](#cosmos-slashing-v1beta1-params) | params defines the x/slashing parameters to update. NOTE: All parameters must be supplied. | + +In a transaction: + +```json +{ + "@type": "/cosmos.slashing.v1beta1.MsgUpdateParams", + "authority": "<string>", + "params": { + "signed_blocks_window": "1", + "min_signed_per_window": "0.05", + "downtime_jail_duration": "0s", + "slash_fraction_double_sign": "0.05", + "slash_fraction_downtime": "0.05" + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.slashing.v1beta1.Params + +Params represents the parameters used for by the slashing module. + +| Field | Type | Description | +| --- | --- | --- | +| `signed_blocks_window` | `int64` | | +| `min_signed_per_window` | `bytes` | Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | +| `downtime_jail_duration` | `Duration` | | +| `slash_fraction_double_sign` | `bytes` | Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | +| `slash_fraction_downtime` | `bytes` | Encoded as cosmos.Dec, read back as base64 of an integer string scaled by 10^18 over gRPC. | + +### cosmos.slashing.v1beta1.ValidatorSigningInfo + +ValidatorSigningInfo defines a validator's signing info for monitoring their liveness activity. + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | Encoded as cosmos.ConsensusAddressString. | +| `start_height` | `int64` | Height at which validator was first a candidate OR was un-jailed | +| `index_offset` | `int64` | Index which is incremented every time a validator is bonded in a block and _may_ have signed a pre-commit or not. This in conjunction with the signed_blocks_window param determines the index in the missed block bitmap. | +| `jailed_until` | `Timestamp` | Timestamp until which the validator is jailed due to liveness downtime. | +| `tombstoned` | `bool` | Whether or not a validator has been tombstoned (killed out of validator set). It is set once the validator commits an equivocation or for any other configured misbehavior. | +| `missed_blocks_counter` | `int64` | A counter of missed (unsigned) blocks. It is used to avoid unnecessary reads in the missed block bitmap. | + + diff --git a/sdk/next/api-reference/grpc/staking.mdx b/sdk/next/api-reference/grpc/staking.mdx new file mode 100644 index 00000000..93c012fe --- /dev/null +++ b/sdk/next/api-reference/grpc/staking.mdx @@ -0,0 +1,966 @@ +--- +title: "Staking" +description: "gRPC queries and transaction messages defined by the staking module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### Delegation + +Delegation queries delegate info for given validator delegator pair. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/Delegation` | +| REST | `GET /cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr}` | + +Request `QueryDelegationRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_addr` | `string` | delegator_addr defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `validator_addr` | `string` | validator_addr defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryDelegationResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegation_response` | [`DelegationResponse`](#cosmos-staking-v1beta1-delegationresponse) | delegation_responses defines the delegation info of a delegation. | + +```bash +grpcurl -plaintext -d '{"delegator_addr":"<string>","validator_addr":"<string>"}' \ + localhost:9090 cosmos.staking.v1beta1.Query/Delegation +``` + +### DelegatorDelegations + +DelegatorDelegations queries all delegations of a given delegator address. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/DelegatorDelegations` | +| REST | `GET /cosmos/staking/v1beta1/delegations/{delegatorAddr}` | + +Request `QueryDelegatorDelegationsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_addr` | `string` | delegator_addr defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDelegatorDelegationsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegation_responses` | [`DelegationResponse`](#cosmos-staking-v1beta1-delegationresponse)[] | delegation_responses defines all the delegations' info of a delegator. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"delegator_addr":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.staking.v1beta1.Query/DelegatorDelegations +``` + +### DelegatorUnbondingDelegations + +DelegatorUnbondingDelegations queries all unbonding delegations of a given delegator address. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations` | +| REST | `GET /cosmos/staking/v1beta1/delegators/{delegatorAddr}/unbonding_delegations` | + +Request `QueryDelegatorUnbondingDelegationsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_addr` | `string` | delegator_addr defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDelegatorUnbondingDelegationsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `unbonding_responses` | [`UnbondingDelegation`](#cosmos-staking-v1beta1-unbondingdelegation)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"delegator_addr":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations +``` + +### DelegatorValidator + +DelegatorValidator queries validator info for given delegator validator pair. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/DelegatorValidator` | +| REST | `GET /cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators/{validatorAddr}` | + +Request `QueryDelegatorValidatorRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_addr` | `string` | delegator_addr defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `validator_addr` | `string` | validator_addr defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryDelegatorValidatorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator` | [`Validator`](#cosmos-staking-v1beta1-validator) | validator defines the validator info. | + +```bash +grpcurl -plaintext -d '{"delegator_addr":"<string>","validator_addr":"<string>"}' \ + localhost:9090 cosmos.staking.v1beta1.Query/DelegatorValidator +``` + +### DelegatorValidators + +DelegatorValidators queries all validators info for given delegator address. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/DelegatorValidators` | +| REST | `GET /cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators` | + +Request `QueryDelegatorValidatorsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_addr` | `string` | delegator_addr defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryDelegatorValidatorsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `validators` | [`Validator`](#cosmos-staking-v1beta1-validator)[] | validators defines the validators' info of a delegator. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"delegator_addr":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.staking.v1beta1.Query/DelegatorValidators +``` + +### HistoricalInfo + +HistoricalInfo queries the historical info for given height. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/HistoricalInfo` | +| REST | `GET /cosmos/staking/v1beta1/historical_info/{height}` | + +Request `QueryHistoricalInfoRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | height defines at which height to query the historical info. | + +Response `QueryHistoricalInfoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `hist` | [`HistoricalInfo`](#cosmos-staking-v1beta1-historicalinfo) | hist defines the historical info at the given height. | + +```bash +grpcurl -plaintext -d '{"height":"1"}' \ + localhost:9090 cosmos.staking.v1beta1.Query/HistoricalInfo +``` + +### Params + +Parameters queries the staking parameters. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/Params` | +| REST | `GET /cosmos/staking/v1beta1/params` | + +Request `QueryParamsRequest`: + +This message has no fields. + +Response `QueryParamsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `params` | [`Params`](#cosmos-staking-v1beta1-params) | params holds all the parameters of this module. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.staking.v1beta1.Query/Params +``` + +### Pool + +Pool queries the pool info. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/Pool` | +| REST | `GET /cosmos/staking/v1beta1/pool` | + +Request `QueryPoolRequest`: + +This message has no fields. + +Response `QueryPoolResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `pool` | [`Pool`](#cosmos-staking-v1beta1-pool) | pool defines the pool info. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.staking.v1beta1.Query/Pool +``` + +### Redelegations + +Redelegations queries redelegations of given address. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/Redelegations` | +| REST | `GET /cosmos/staking/v1beta1/delegators/{delegatorAddr}/redelegations` | + +Request `QueryRedelegationsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_addr` | `string` | delegator_addr defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `src_validator_addr` | `string` | src_validator_addr defines the validator address to redelegate from. Encoded as cosmos.ValidatorAddressString. | +| `dst_validator_addr` | `string` | dst_validator_addr defines the validator address to redelegate to. Encoded as cosmos.ValidatorAddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryRedelegationsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `redelegation_responses` | [`RedelegationResponse`](#cosmos-staking-v1beta1-redelegationresponse)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"delegator_addr":"<string>","src_validator_addr":"<string>","dst_validator_addr":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.staking.v1beta1.Query/Redelegations +``` + +### UnbondingDelegation + +UnbondingDelegation queries unbonding info for given validator delegator pair. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/UnbondingDelegation` | +| REST | `GET /cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr}/unbonding_delegation` | + +Request `QueryUnbondingDelegationRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_addr` | `string` | delegator_addr defines the delegator address to query for. Encoded as cosmos.AddressString. | +| `validator_addr` | `string` | validator_addr defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryUnbondingDelegationResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `unbond` | [`UnbondingDelegation`](#cosmos-staking-v1beta1-unbondingdelegation) | unbond defines the unbonding information of a delegation. | + +```bash +grpcurl -plaintext -d '{"delegator_addr":"<string>","validator_addr":"<string>"}' \ + localhost:9090 cosmos.staking.v1beta1.Query/UnbondingDelegation +``` + +### Validator + +Validator queries validator info for given validator address. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/Validator` | +| REST | `GET /cosmos/staking/v1beta1/validators/{validatorAddr}` | + +Request `QueryValidatorRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_addr` | `string` | validator_addr defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | + +Response `QueryValidatorResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator` | [`Validator`](#cosmos-staking-v1beta1-validator) | validator defines the validator info. | + +```bash +grpcurl -plaintext -d '{"validator_addr":"<string>"}' \ + localhost:9090 cosmos.staking.v1beta1.Query/Validator +``` + +### ValidatorDelegations + +ValidatorDelegations queries delegate info for given validator. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/ValidatorDelegations` | +| REST | `GET /cosmos/staking/v1beta1/validators/{validatorAddr}/delegations` | + +Request `QueryValidatorDelegationsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_addr` | `string` | validator_addr defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryValidatorDelegationsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `delegation_responses` | [`DelegationResponse`](#cosmos-staking-v1beta1-delegationresponse)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"validator_addr":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.staking.v1beta1.Query/ValidatorDelegations +``` + +### Validators + +Validators queries all validators that match the given status. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/Validators` | +| REST | `GET /cosmos/staking/v1beta1/validators` | + +Request `QueryValidatorsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `status` | `string` | status enables to query for validators matching a given status. One of the [`BondStatus`](#cosmos-staking-v1beta1-bondstatus) values. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryValidatorsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `validators` | [`Validator`](#cosmos-staking-v1beta1-validator)[] | validators contains all the queried validators. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"status":"BOND_STATUS_UNBONDED","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.staking.v1beta1.Query/Validators +``` + +### ValidatorUnbondingDelegations + +ValidatorUnbondingDelegations queries unbonding delegations of a validator. + +When called from another module, this query might consume a high amount of gas if the pagination field is incorrectly set. + +| | | +| --- | --- | +| gRPC | `cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations` | +| REST | `GET /cosmos/staking/v1beta1/validators/{validatorAddr}/unbonding_delegations` | + +Request `QueryValidatorUnbondingDelegationsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `validator_addr` | `string` | validator_addr defines the validator address to query for. Encoded as cosmos.ValidatorAddressString. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines an optional pagination for the request. | + +Response `QueryValidatorUnbondingDelegationsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `unbonding_responses` | [`UnbondingDelegation`](#cosmos-staking-v1beta1-unbondingdelegation)[] | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines the pagination in the response. | + +```bash +grpcurl -plaintext -d '{"validator_addr":"<string>","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/next/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/next/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/next/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### BeginRedelegate + +BeginRedelegate defines a method for performing a redelegation of coins from a delegator and source validator to a destination validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgBeginRedelegate` | +| Handler | `cosmos.staking.v1beta1.Msg/BeginRedelegate` | +| Signer | `delegator_address` | +| Amino name | `cosmos-sdk/MsgBeginRedelegate` | + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | Encoded as cosmos.AddressString. | +| `validator_src_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `validator_dst_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin) | | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgBeginRedelegate", + "delegator_address": "<string>", + "validator_src_address": "<string>", + "validator_dst_address": "<string>", + "amount": { + "denom": "<string>", + "amount": "<string>" + } +} +``` + +Response `MsgBeginRedelegateResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `completion_time` | `Timestamp` | | + +### CancelUnbondingDelegation + +CancelUnbondingDelegation defines a method for performing canceling the unbonding delegation and delegate back to previous validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation` | +| Handler | `cosmos.staking.v1beta1.Msg/CancelUnbondingDelegation` | +| Signer | `delegator_address` | +| Amino name | `cosmos-sdk/MsgCancelUnbondingDelegation` | + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | Encoded as cosmos.AddressString. | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin) | amount is always less than or equal to unbonding delegation entry balance | +| `creation_height` | `int64` | creation_height is the height which the unbonding took place. | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", + "delegator_address": "<string>", + "validator_address": "<string>", + "amount": { + "denom": "<string>", + "amount": "<string>" + }, + "creation_height": "1" +} +``` + +Response `MsgCancelUnbondingDelegationResponse`: + +This message has no fields. + +### CreateValidator + +CreateValidator defines a method for creating a new validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgCreateValidator` | +| Handler | `cosmos.staking.v1beta1.Msg/CreateValidator` | +| Signer | `validator_address` | +| Amino name | `cosmos-sdk/MsgCreateValidator` | + +| Field | Type | Description | +| --- | --- | --- | +| `description` | [`Description`](#cosmos-staking-v1beta1-description) | | +| `commission` | [`CommissionRates`](#cosmos-staking-v1beta1-commissionrates) | | +| `min_self_delegation` | `string` | Encoded as cosmos.Int. | +| `delegator_address` | `string` | Deprecated: Use of Delegator Address in MsgCreateValidator is deprecated. The validator address bytes and delegator address bytes refer to the same account while creating validator (defer only in bech32 notation). Deprecated. Encoded as cosmos.AddressString. | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `pubkey` | `Any` | Accepts any message implementing cosmos.crypto.PubKey. | +| `value` | [`Coin`](#cosmos-base-v1beta1-coin) | | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgCreateValidator", + "description": { + "moniker": "<string>", + "identity": "<string>", + "website": "<string>", + "security_contact": "<string>", + "details": "<string>" + }, + "commission": { + "rate": "<string>", + "max_rate": "<string>", + "max_change_rate": "<string>" + }, + "min_self_delegation": "<string>", + "validator_address": "<string>", + "pubkey": { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + }, + "value": { + "denom": "<string>", + "amount": "<string>" + } +} +``` + +Response `MsgCreateValidatorResponse`: + +This message has no fields. + +### Delegate + +Delegate defines a method for performing a delegation of coins from a delegator to a validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgDelegate` | +| Handler | `cosmos.staking.v1beta1.Msg/Delegate` | +| Signer | `delegator_address` | +| Amino name | `cosmos-sdk/MsgDelegate` | + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | Encoded as cosmos.AddressString. | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin) | | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgDelegate", + "delegator_address": "<string>", + "validator_address": "<string>", + "amount": { + "denom": "<string>", + "amount": "<string>" + } +} +``` + +Response `MsgDelegateResponse`: + +This message has no fields. + +### EditValidator + +EditValidator defines a method for editing an existing validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgEditValidator` | +| Handler | `cosmos.staking.v1beta1.Msg/EditValidator` | +| Signer | `validator_address` | +| Amino name | `cosmos-sdk/MsgEditValidator` | + +| Field | Type | Description | +| --- | --- | --- | +| `description` | [`Description`](#cosmos-staking-v1beta1-description) | | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `commission_rate` | `string` | We pass a reference to the new commission rate and min self delegation as it's not mandatory to update. If not updated, the deserialized rate will be zero with no way to distinguish if an update was intended. REF: #2373 Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `min_self_delegation` | `string` | Encoded as cosmos.Int. | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgEditValidator", + "description": { + "moniker": "<string>", + "identity": "<string>", + "website": "<string>", + "security_contact": "<string>", + "details": "<string>" + }, + "validator_address": "<string>", + "commission_rate": "<string>", + "min_self_delegation": "<string>" +} +``` + +Response `MsgEditValidatorResponse`: + +This message has no fields. + +### RotateConsPubKey + +RotateConsPubKey defines an operation for rotating the consensus keys of a validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgRotateConsPubKey` | +| Handler | `cosmos.staking.v1beta1.Msg/RotateConsPubKey` | +| Signer | `validator_address` | +| Amino name | `cosmos-sdk/MsgRotateConsPubKey` | + +| Field | Type | Description | +| --- | --- | --- | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `new_pubkey` | `Any` | Accepts any message implementing cosmos.crypto.PubKey. | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgRotateConsPubKey", + "validator_address": "<string>", + "new_pubkey": { + "@type": "/cosmos.example.v1.MsgExample", + "...": "the fields of that message, inline" + } +} +``` + +Response `MsgRotateConsPubKeyResponse`: + +This message has no fields. + +### Undelegate + +Undelegate defines a method for performing an undelegation from a delegate and a validator. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgUndelegate` | +| Handler | `cosmos.staking.v1beta1.Msg/Undelegate` | +| Signer | `delegator_address` | +| Amino name | `cosmos-sdk/MsgUndelegate` | + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | Encoded as cosmos.AddressString. | +| `validator_address` | `string` | Encoded as cosmos.ValidatorAddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin) | | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgUndelegate", + "delegator_address": "<string>", + "validator_address": "<string>", + "amount": { + "denom": "<string>", + "amount": "<string>" + } +} +``` + +Response `MsgUndelegateResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `completion_time` | `Timestamp` | | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin) | amount returns the amount of undelegated coins | + +### UpdateParams + +UpdateParams defines an operation for updating the x/staking module parameters. + +| | | +| --- | --- | +| Type URL | `/cosmos.staking.v1beta1.MsgUpdateParams` | +| Handler | `cosmos.staking.v1beta1.Msg/UpdateParams` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/x/staking/MsgUpdateParams` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `params` | [`Params`](#cosmos-staking-v1beta1-params) | params defines the x/staking parameters to update. NOTE: All parameters must be supplied. | + +In a transaction: + +```json +{ + "@type": "/cosmos.staking.v1beta1.MsgUpdateParams", + "authority": "<string>", + "params": { + "unbonding_time": "0s", + "max_validators": 0, + "max_entries": 0, + "historical_entries": 0, + "bond_denom": "<string>", + "min_commission_rate": "<string>", + "key_rotation_fee": { + "denom": "<string>", + "amount": "<string>" + } + } +} +``` + +Response `MsgUpdateParamsResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.base.v1beta1.Coin + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `amount` | `string` | Encoded as cosmos.Int. | + +### cosmos.staking.v1beta1.BondStatus + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `BOND_STATUS_UNSPECIFIED` | Zero value. Handlers reject it. | +| `BOND_STATUS_UNBONDED` | | +| `BOND_STATUS_UNBONDING` | | +| `BOND_STATUS_BONDED` | | + +### cosmos.staking.v1beta1.Commission + +Commission defines commission parameters for a given validator. + +| Field | Type | Description | +| --- | --- | --- | +| `commission_rates` | [`CommissionRates`](#cosmos-staking-v1beta1-commissionrates) | commission_rates defines the initial commission rates to be used for creating a validator. | +| `update_time` | `Timestamp` | update_time is the last time the commission rate was changed. | + +### cosmos.staking.v1beta1.CommissionRates + +CommissionRates defines the initial commission rates to be used for creating a validator. + +| Field | Type | Description | +| --- | --- | --- | +| `rate` | `string` | rate is the commission rate charged to delegators, as a fraction. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `max_rate` | `string` | max_rate defines the maximum commission rate which validator can ever charge, as a fraction. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `max_change_rate` | `string` | max_change_rate defines the maximum daily increase of the validator commission, as a fraction. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | + +### cosmos.staking.v1beta1.Delegation + +Delegation represents the bond with tokens held by an account. It is owned by one delegator, and is associated with the voting power of one validator. + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address is the encoded address of the delegator. Encoded as cosmos.AddressString. | +| `validator_address` | `string` | validator_address is the encoded address of the validator. Encoded as cosmos.ValidatorAddressString. | +| `shares` | `string` | shares define the delegation shares received. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | + +### cosmos.staking.v1beta1.DelegationResponse + +DelegationResponse is equivalent to Delegation except that it contains a balance in addition to shares which is more suitable for client responses. + +| Field | Type | Description | +| --- | --- | --- | +| `delegation` | [`Delegation`](#cosmos-staking-v1beta1-delegation) | | +| `balance` | [`Coin`](#cosmos-base-v1beta1-coin) | | + +### cosmos.staking.v1beta1.Description + +Description defines a validator description. + +| Field | Type | Description | +| --- | --- | --- | +| `moniker` | `string` | moniker defines a human-readable name for the validator. | +| `identity` | `string` | identity defines an optional identity signature (ex. UPort or Keybase). | +| `website` | `string` | website defines an optional website link. | +| `security_contact` | `string` | security_contact defines an optional email for security contact. | +| `details` | `string` | details define other optional details. | + +### cosmos.staking.v1beta1.HistoricalInfo + +HistoricalInfo contains header and validator information for a given block. It is stored as part of staking module's state, which persists the `n` most recent HistoricalInfo (`n` is set by the staking module's `historical_entries` parameter). + +| Field | Type | Description | +| --- | --- | --- | +| `header` | `Header` | | +| `valset` | [`Validator`](#cosmos-staking-v1beta1-validator)[] | | + +### cosmos.staking.v1beta1.Params + +Params defines the parameters for the x/staking module. + +| Field | Type | Description | +| --- | --- | --- | +| `unbonding_time` | `Duration` | unbonding_time is the time duration of unbonding. | +| `max_validators` | `uint32` | max_validators is the maximum number of validators. | +| `max_entries` | `uint32` | max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). | +| `historical_entries` | `uint32` | historical_entries is the number of historical entries to persist. | +| `bond_denom` | `string` | bond_denom defines the bondable coin denomination. | +| `min_commission_rate` | `string` | min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `key_rotation_fee` | [`Coin`](#cosmos-base-v1beta1-coin) | key_rotation_fee is the fee charged when rotating a validator's consensus key. | + +### cosmos.staking.v1beta1.Pool + +Pool is used for tracking bonded and not-bonded token supply of the bond denomination. + +| Field | Type | Description | +| --- | --- | --- | +| `not_bonded_tokens` | `string` | Encoded as cosmos.Int. | +| `bonded_tokens` | `string` | Encoded as cosmos.Int. | + +### cosmos.staking.v1beta1.Redelegation + +Redelegation contains the list of a particular delegator's redelegating bonds from a particular source validator to a particular destination validator. + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address is the bech32-encoded address of the delegator. Encoded as cosmos.AddressString. | +| `validator_src_address` | `string` | validator_src_address is the validator redelegation source operator address. Encoded as cosmos.ValidatorAddressString. | +| `validator_dst_address` | `string` | validator_dst_address is the validator redelegation destination operator address. Encoded as cosmos.ValidatorAddressString. | +| `entries` | [`RedelegationEntry`](#cosmos-staking-v1beta1-redelegationentry)[] | entries are the redelegation entries. | + +### cosmos.staking.v1beta1.RedelegationEntry + +RedelegationEntry defines a redelegation object with relevant metadata. + +| Field | Type | Description | +| --- | --- | --- | +| `creation_height` | `int64` | creation_height defines the height which the redelegation took place. | +| `completion_time` | `Timestamp` | completion_time defines the unix time for redelegation completion. | +| `initial_balance` | `string` | initial_balance defines the initial balance when redelegation started. Encoded as cosmos.Int. | +| `shares_dst` | `string` | shares_dst is the amount of destination-validator shares created by redelegation. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `unbonding_id` | `uint64` | Incrementing id that uniquely identifies this entry | +| `unbonding_on_hold_ref_count` | `int64` | Strictly positive if this entry's unbonding has been stopped by external modules | + +### cosmos.staking.v1beta1.RedelegationEntryResponse + +RedelegationEntryResponse is equivalent to a RedelegationEntry except that it contains a balance in addition to shares which is more suitable for client responses. + +| Field | Type | Description | +| --- | --- | --- | +| `redelegation_entry` | [`RedelegationEntry`](#cosmos-staking-v1beta1-redelegationentry) | | +| `balance` | `string` | Encoded as cosmos.Int. | + +### cosmos.staking.v1beta1.RedelegationResponse + +RedelegationResponse is equivalent to a Redelegation except that its entries contain a balance in addition to shares which is more suitable for client responses. + +| Field | Type | Description | +| --- | --- | --- | +| `redelegation` | [`Redelegation`](#cosmos-staking-v1beta1-redelegation) | | +| `entries` | [`RedelegationEntryResponse`](#cosmos-staking-v1beta1-redelegationentryresponse)[] | | + +### cosmos.staking.v1beta1.UnbondingDelegation + +UnbondingDelegation stores all of a single delegator's unbonding bonds for a single validator in an time-ordered list. + +| Field | Type | Description | +| --- | --- | --- | +| `delegator_address` | `string` | delegator_address is the encoded address of the delegator. Encoded as cosmos.AddressString. | +| `validator_address` | `string` | validator_address is the encoded address of the validator. Encoded as cosmos.ValidatorAddressString. | +| `entries` | [`UnbondingDelegationEntry`](#cosmos-staking-v1beta1-unbondingdelegationentry)[] | entries are the unbonding delegation entries. | + +### cosmos.staking.v1beta1.UnbondingDelegationEntry + +UnbondingDelegationEntry defines an unbonding object with relevant metadata. + +| Field | Type | Description | +| --- | --- | --- | +| `creation_height` | `int64` | creation_height is the height which the unbonding took place. | +| `completion_time` | `Timestamp` | completion_time is the unix time for unbonding completion. | +| `initial_balance` | `string` | initial_balance defines the tokens initially scheduled to receive at completion. Encoded as cosmos.Int. | +| `balance` | `string` | balance defines the tokens to receive at completion. Encoded as cosmos.Int. | +| `unbonding_id` | `uint64` | Incrementing id that uniquely identifies this entry | +| `unbonding_on_hold_ref_count` | `int64` | Strictly positive if this entry's unbonding has been stopped by external modules | + +### cosmos.staking.v1beta1.Validator + +Validator defines a validator, together with the total amount of the Validator's bond shares and their exchange rate to coins. Slashing results in a decrease in the exchange rate, allowing correct calculation of future undelegations without iterating over delegators. When coins are delegated to this validator, the validator is credited with a delegation whose number of bond shares is based on the amount of coins delegated divided by the current exchange rate. Voting power can be calculated as total bonded shares multiplied by exchange rate. + +| Field | Type | Description | +| --- | --- | --- | +| `operator_address` | `string` | operator_address defines the address of the validator's operator; bech encoded in JSON. Encoded as cosmos.AddressString. | +| `consensus_pubkey` | `Any` | consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. Accepts any message implementing cosmos.crypto.PubKey. | +| `jailed` | `bool` | jailed defined whether the validator has been jailed from bonded status or not. | +| `status` | [`BondStatus`](#cosmos-staking-v1beta1-bondstatus) | status is the validator status (bonded/unbonding/unbonded). | +| `tokens` | `string` | tokens define the delegated tokens (incl. self-delegation). Encoded as cosmos.Int. | +| `delegator_shares` | `string` | delegator_shares defines total shares issued to a validator's delegators. Encoded as cosmos.Dec, read back as an integer string scaled by 10^18 over gRPC. | +| `description` | [`Description`](#cosmos-staking-v1beta1-description) | description defines the description terms for the validator. | +| `unbonding_height` | `int64` | unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. | +| `unbonding_time` | `Timestamp` | unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. | +| `commission` | [`Commission`](#cosmos-staking-v1beta1-commission) | commission defines the commission parameters. | +| `min_self_delegation` | `string` | min_self_delegation is the validator's self declared minimum self delegation. Encoded as cosmos.Int. | +| `unbonding_on_hold_ref_count` | `int64` | strictly positive if this validator's unbonding has been stopped by external modules | +| `unbonding_ids` | `uint64`[] | list of unbonding ids, each uniquely identifying an unbonding of this validator | + + diff --git a/sdk/next/api-reference/grpc/store.mdx b/sdk/next/api-reference/grpc/store.mdx new file mode 100644 index 00000000..897710fd --- /dev/null +++ b/sdk/next/api-reference/grpc/store.mdx @@ -0,0 +1,91 @@ +--- +title: "Store" +description: "gRPC queries and transaction messages defined by the store module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### ListenCommit + +ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit + +| | | +| --- | --- | +| gRPC | `cosmos.store.streaming.abci.ABCIListenerService/ListenCommit` | + +Request `ListenCommitRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `block_height` | `int64` | explicitly pass in block height as ResponseCommit does not contain this info | +| `res` | `ResponseCommit` | | +| `change_set` | [`StoreKVPair`](#cosmos-store-v1beta1-storekvpair)[] | | + +Response `ListenCommitResponse`: + +This message has no fields. + +```bash +grpcurl -plaintext -d '{"block_height":"1","res":{"retain_height":"1"},"change_set":[{"store_key":"<string>","delete":false,"key":"","value":""}]}' \ + localhost:9090 cosmos.store.streaming.abci.ABCIListenerService/ListenCommit +``` + +### ListenFinalizeBlock + +ListenFinalizeBlock is the corresponding endpoint for ABCIListener.ListenEndBlock + +| | | +| --- | --- | +| gRPC | `cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock` | + +Request `ListenFinalizeBlockRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `req` | `RequestFinalizeBlock` | | +| `res` | `ResponseFinalizeBlock` | | + +Response `ListenFinalizeBlockResponse`: + +This message has no fields. + +```bash +grpcurl -plaintext -d '{"req":{"txs":[""],"decided_last_commit":{"round":0,"votes":[{"validator":{"address":"","power":"1"},"block_id_flag":"BLOCK_ID_FLAG_UNKNOWN"}]},"misbehavior":[{"type":"UNKNOWN","validator":{"address":"","power":"1"},"height":"1","time":"<RFC 3339 timestamp>","total_voting_power":"1"}],"hash":"","height":"1","time":"<RFC 3339 timestamp>","next_validators_hash":"","proposer_address":""},"res":{"events":[{"type":"NEW","attributes":[{"key":"<string>","value":"<string>","index":false}]}],"tx_results":[{"code":0,"data":"","log":"<string>","info":"<string>","gas_wanted":"1","gas_used":"1","events":[{"type":"NEW","attributes":[{"key":"<string>","value":"<string>","index":false}]}],"codespace":"<string>"}],"validator_updates":[{"pub_key":{"ed25519":""},"power":"1"}],"consensus_param_updates":{"block":{"max_bytes":"1","max_gas":"1"},"evidence":{"max_age_num_blocks":"1","max_age_duration":"0s","max_bytes":"1"},"validator":{"pub_key_types":["<string>"]},"version":{"app":"1"},"abci":{"vote_extensions_enable_height":"1"},"authority":{"authority":"<string>"}},"app_hash":""}}' \ + localhost:9090 cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock +``` + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.store.v1beta1.StoreKVPair + +StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and Deletes + +| Field | Type | Description | +| --- | --- | --- | +| `store_key` | `string` | | +| `delete` | `bool` | | +| `key` | `bytes` | | +| `value` | `bytes` | | + + diff --git a/sdk/next/api-reference/grpc/tx.mdx b/sdk/next/api-reference/grpc/tx.mdx new file mode 100644 index 00000000..032847fa --- /dev/null +++ b/sdk/next/api-reference/grpc/tx.mdx @@ -0,0 +1,517 @@ +--- +title: "Tx" +description: "gRPC queries and transaction messages defined by the tx module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### BroadcastTx + +BroadcastTx broadcast transaction. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/BroadcastTx` | +| REST | `POST /cosmos/tx/v1beta1/txs` | + +Request `BroadcastTxRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx_bytes` | `bytes` | tx_bytes is the raw transaction. | +| `mode` | [`BroadcastMode`](#cosmos-tx-v1beta1-broadcastmode) | | + +Response `BroadcastTxResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx_response` | [`TxResponse`](#cosmos-base-abci-v1beta1-txresponse) | tx_response is the queried TxResponses. | + +```bash +grpcurl -plaintext -d '{"tx_bytes":"","mode":"BROADCAST_MODE_SYNC"}' \ + localhost:9090 cosmos.tx.v1beta1.Service/BroadcastTx +``` + +### GetBlockWithTxs + +GetBlockWithTxs fetches a block with decoded txs. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/GetBlockWithTxs` | +| REST | `GET /cosmos/tx/v1beta1/txs/block/{height}` | + +Request `GetBlockWithTxsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | height is the height of the block to query. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines a pagination for the request. | + +Response `GetBlockWithTxsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `txs` | [`Tx`](#cosmos-tx-v1beta1-tx)[] | txs are the transactions in the block. | +| `block_id` | `BlockID` | | +| `block` | `Block` | | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines a pagination for the response. | + +```bash +grpcurl -plaintext -d '{"height":"1","pagination":{"limit":"1"}}' \ + localhost:9090 cosmos.tx.v1beta1.Service/GetBlockWithTxs +``` + +### GetTx + +GetTx fetches a tx by hash. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/GetTx` | +| REST | `GET /cosmos/tx/v1beta1/txs/{hash}` | + +Request `GetTxRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `hash` | `string` | hash is the tx hash to query, encoded as a hex string. | + +Response `GetTxResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx` | [`Tx`](#cosmos-tx-v1beta1-tx) | tx is the queried transaction. | +| `tx_response` | [`TxResponse`](#cosmos-base-abci-v1beta1-txresponse) | tx_response is the queried TxResponses. | + +```bash +grpcurl -plaintext -d '{"hash":"<string>"}' \ + localhost:9090 cosmos.tx.v1beta1.Service/GetTx +``` + +### GetTxsEvent + +GetTxsEvent fetches txs by event. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/GetTxsEvent` | +| REST | `GET /cosmos/tx/v1beta1/txs` | + +Request `GetTxsEventRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `events` | `string`[] | events is the list of transaction event type. Deprecated post v0.47.x: use query instead, which should contain a valid events query. Deprecated. | +| `pagination` | [`PageRequest`](#cosmos-base-query-v1beta1-pagerequest) | pagination defines a pagination for the request. Deprecated post v0.46.x: use page and limit instead. Deprecated. | +| `order_by` | [`OrderBy`](#cosmos-tx-v1beta1-orderby) | | +| `page` | `uint64` | page is the page number to query, starts at 1. If not provided, will default to first page. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `query` | `string` | query defines the transaction event query that is proxied to Tendermint's TxSearch RPC method. The query must be valid. | + +Response `GetTxsEventResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `txs` | [`Tx`](#cosmos-tx-v1beta1-tx)[] | txs is the list of queried transactions. | +| `tx_responses` | [`TxResponse`](#cosmos-base-abci-v1beta1-txresponse)[] | tx_responses is the list of queried TxResponses. | +| `pagination` | [`PageResponse`](#cosmos-base-query-v1beta1-pageresponse) | pagination defines a pagination for the response. Deprecated post v0.46.x: use total instead. Deprecated. | +| `total` | `uint64` | total is total number of results available | + +```bash +grpcurl -plaintext -d '{"order_by":"ORDER_BY_ASC","page":"1","limit":"1","query":"<string>"}' \ + localhost:9090 cosmos.tx.v1beta1.Service/GetTxsEvent +``` + +### Simulate + +Simulate simulates executing a transaction for estimating gas usage. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/Simulate` | +| REST | `POST /cosmos/tx/v1beta1/simulate` | + +Request `SimulateRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx` | [`Tx`](#cosmos-tx-v1beta1-tx) | tx is the transaction to simulate. Deprecated. Send raw tx bytes instead. Deprecated. | +| `tx_bytes` | `bytes` | tx_bytes is the raw transaction. | + +Response `SimulateResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `gas_info` | [`GasInfo`](#cosmos-base-abci-v1beta1-gasinfo) | gas_info is the information about gas used in the simulation. | +| `result` | [`Result`](#cosmos-base-abci-v1beta1-result) | result is the result of the simulation. | + +```bash +grpcurl -plaintext -d '{"tx_bytes":""}' \ + localhost:9090 cosmos.tx.v1beta1.Service/Simulate +``` + +### TxDecode + +TxDecode decodes the transaction. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/TxDecode` | +| REST | `POST /cosmos/tx/v1beta1/decode` | + +Request `TxDecodeRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx_bytes` | `bytes` | tx_bytes is the raw transaction. | + +Response `TxDecodeResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx` | [`Tx`](#cosmos-tx-v1beta1-tx) | tx is the decoded transaction. | + +```bash +grpcurl -plaintext -d '{"tx_bytes":""}' \ + localhost:9090 cosmos.tx.v1beta1.Service/TxDecode +``` + +### TxDecodeAmino + +TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/TxDecodeAmino` | +| REST | `POST /cosmos/tx/v1beta1/decode/amino` | + +Request `TxDecodeAminoRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `amino_binary` | `bytes` | | + +Response `TxDecodeAminoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `amino_json` | `string` | | + +```bash +grpcurl -plaintext -d '{"amino_binary":""}' \ + localhost:9090 cosmos.tx.v1beta1.Service/TxDecodeAmino +``` + +### TxEncode + +TxEncode encodes the transaction. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/TxEncode` | +| REST | `POST /cosmos/tx/v1beta1/encode` | + +Request `TxEncodeRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx` | [`Tx`](#cosmos-tx-v1beta1-tx) | tx is the transaction to encode. | + +Response `TxEncodeResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `tx_bytes` | `bytes` | tx_bytes is the encoded transaction bytes. | + +```bash +grpcurl -plaintext -d '{"tx":{"body":{"messages":[{"@type":"/cosmos.example.v1.MsgExample","...":"the fields of that message, inline"}],"memo":"<string>","timeout_height":"1","unordered":false,"timeout_timestamp":"<RFC 3339 timestamp>","extension_options":[{"@type":"/cosmos.example.v1.MsgExample","...":"the fields of that message, inline"}],"non_critical_extension_options":[{"@type":"/cosmos.example.v1.MsgExample","...":"the fields of that message, inline"}]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.example.v1.MsgExample","...":"the fields of that message, inline"},"mode_info":{"single":{}},"sequence":"1"}],"fee":{"amount":[{"denom":"<string>","amount":"<string>"}],"gas_limit":"1","payer":"<string>","granter":"<string>"}},"signatures":[""]}}' \ + localhost:9090 cosmos.tx.v1beta1.Service/TxEncode +``` + +### TxEncodeAmino + +TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. + +| | | +| --- | --- | +| gRPC | `cosmos.tx.v1beta1.Service/TxEncodeAmino` | +| REST | `POST /cosmos/tx/v1beta1/encode/amino` | + +Request `TxEncodeAminoRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `amino_json` | `string` | | + +Response `TxEncodeAminoResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `amino_binary` | `bytes` | | + +```bash +grpcurl -plaintext -d '{"amino_json":"<string>"}' \ + localhost:9090 cosmos.tx.v1beta1.Service/TxEncodeAmino +``` + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.abci.v1beta1.ABCIMessageLog + +ABCIMessageLog defines a structure containing an indexed tx ABCI message log. + +| Field | Type | Description | +| --- | --- | --- | +| `msg_index` | `uint32` | | +| `log` | `string` | | +| `events` | [`StringEvent`](#cosmos-base-abci-v1beta1-stringevent)[] | Events contains a slice of Event objects that were emitted during some execution. | + +### cosmos.base.abci.v1beta1.Attribute + +Attribute defines an attribute wrapper where the key and value are strings instead of raw bytes. + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `string` | | +| `value` | `string` | | + +### cosmos.base.abci.v1beta1.GasInfo + +GasInfo defines tx execution gas context. + +| Field | Type | Description | +| --- | --- | --- | +| `gas_wanted` | `uint64` | GasWanted is the maximum units of work we allow this tx to perform. | +| `gas_used` | `uint64` | GasUsed is the amount of gas actually consumed. | + +### cosmos.base.abci.v1beta1.Result + +Result is the union of ResponseFormat and ResponseCheckTx. + +| Field | Type | Description | +| --- | --- | --- | +| `data` | `bytes` | Data is any data returned from message or handler execution. It MUST be length prefixed in order to separate data from multiple message executions. Deprecated. This field is still populated, but prefer msg_response instead because it also contains the Msg response typeURL. Deprecated. | +| `log` | `string` | Log contains the log information from message or handler execution. | +| `events` | `Event`[] | Events contains a slice of Event objects that were emitted during message or handler execution. | +| `msg_responses` | `Any`[] | msg_responses contains the Msg handler responses type packed in Anys. | + +### cosmos.base.abci.v1beta1.StringEvent + +StringEvent defines en Event object wrapper where all the attributes contain key/value pairs that are strings instead of raw bytes. + +| Field | Type | Description | +| --- | --- | --- | +| `type` | `string` | | +| `attributes` | [`Attribute`](#cosmos-base-abci-v1beta1-attribute)[] | | + +### cosmos.base.abci.v1beta1.TxResponse + +TxResponse defines a structure containing relevant tx data and metadata. The tags are stringified and the log is JSON decoded. + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | The block height | +| `txhash` | `string` | The transaction hash. | +| `codespace` | `string` | Namespace for the Code | +| `code` | `uint32` | Response code. | +| `data` | `string` | Result bytes, if any. | +| `raw_log` | `string` | The output of the application's logger (raw string). May be non-deterministic. | +| `logs` | [`ABCIMessageLog`](#cosmos-base-abci-v1beta1-abcimessagelog)[] | The output of the application's logger (typed). May be non-deterministic. | +| `info` | `string` | Additional information. May be non-deterministic. | +| `gas_wanted` | `int64` | Amount of gas requested for transaction. | +| `gas_used` | `int64` | Amount of gas consumed by transaction. | +| `tx` | `Any` | The request transaction bytes. | +| `timestamp` | `string` | Time of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time. | +| `events` | `Event`[] | Events defines all the events emitted by processing a transaction. Note, these events include those emitted by processing all the messages and those emitted from the ante. Whereas Logs contains the events, with additional metadata, emitted only by processing the messages. | + +### cosmos.base.query.v1beta1.PageRequest + +PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: + +`message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `key` | `bytes` | key is a value returned in PageResponse.next_key to begin querying the next page most efficiently. Only one of offset or key should be set. | +| `offset` | `uint64` | offset is a numeric offset that can be used when key is unavailable. It is less efficient than using key. Only one of offset or key should be set. | +| `limit` | `uint64` | limit is the total number of results to be returned in the result page. If left empty it will default to a value to be set by each app. | +| `count_total` | `bool` | count_total is set to true to indicate that the result set should include a count of the total number of items available for pagination in UIs. count_total is only respected when offset is used. It is ignored when key is set. | +| `reverse` | `bool` | reverse is set to true if results are to be returned in the descending order. | + +### cosmos.base.query.v1beta1.PageResponse + +PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. + +`message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }` + +| Field | Type | Description | +| --- | --- | --- | +| `next_key` | `bytes` | next_key is the key to be passed to PageRequest.key to query the next page most efficiently. It will be empty if there are no more results. | +| `total` | `uint64` | total is total number of results available if PageRequest.count_total was set, its value is undefined otherwise | + +### cosmos.base.v1beta1.Coin + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `amount` | `string` | Encoded as cosmos.Int. | + +### cosmos.crypto.multisig.v1beta1.CompactBitArray + +CompactBitArray is an implementation of a space efficient bit array. This is used to ensure that the encoded data takes up a minimal amount of space after proto encoding. This is not thread safe, and is not intended for concurrent usage. + +| Field | Type | Description | +| --- | --- | --- | +| `extra_bits_stored` | `uint32` | | +| `elems` | `bytes` | | + +### cosmos.tx.signing.v1beta1.SignMode + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `SIGN_MODE_UNSPECIFIED` | Zero value. Handlers reject it. | +| `SIGN_MODE_DIRECT` | | +| `SIGN_MODE_DIRECT_AUX` | | +| `SIGN_MODE_LEGACY_AMINO_JSON` | | +| `SIGN_MODE_EIP_191` | | + +### cosmos.tx.v1beta1.AuthInfo + +AuthInfo describes the fee and signer modes that are used to sign a transaction. + +| Field | Type | Description | +| --- | --- | --- | +| `signer_infos` | [`SignerInfo`](#cosmos-tx-v1beta1-signerinfo)[] | signer_infos defines the signing modes for the required signers. The number and order of elements must match the required signers from TxBody's messages. The first element is the primary signer and the one which pays the fee. | +| `fee` | [`Fee`](#cosmos-tx-v1beta1-fee) | Fee is the fee and gas limit for the transaction. The first signer is the primary signer and the one which pays the fee. The fee can be calculated based on the cost of evaluating the body and doing signature verification of the signers. This can be estimated via simulation. | +| `tip` | [`Tip`](#cosmos-tx-v1beta1-tip) | Tip is the optional tip used for transactions fees paid in another denom. This field is ignored if the chain didn't enable tips, i.e. didn't add the `TipDecorator` in its posthandler. Deprecated. | + +### cosmos.tx.v1beta1.BroadcastMode + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `BROADCAST_MODE_UNSPECIFIED` | Zero value. Handlers reject it. | +| `BROADCAST_MODE_BLOCK` | Deprecated. | +| `BROADCAST_MODE_SYNC` | | +| `BROADCAST_MODE_ASYNC` | | + +### cosmos.tx.v1beta1.Fee + +Fee includes the amount of coins paid in fees and the maximum gas to be used by the transaction. The ratio yields an effective "gasprice", which must be above some minimum to be accepted into the mempool. + +| Field | Type | Description | +| --- | --- | --- | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | amount is the amount of coins to be paid as a fee | +| `gas_limit` | `uint64` | gas_limit is the maximum gas that can be used in transaction processing before an out of gas error occurs | +| `payer` | `string` | if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. the payer must be a tx signer (and thus have signed this field in AuthInfo). setting this field does *not* change the ordering of required signers for the transaction. Encoded as cosmos.AddressString. | +| `granter` | `string` | if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does not support fee grants, this will fail Encoded as cosmos.AddressString. | + +### cosmos.tx.v1beta1.ModeInfo + +ModeInfo describes the signing mode of a single or nested multisig signer. + +| Field | Type | Description | +| --- | --- | --- | +| `single` | [`Single`](#cosmos-tx-v1beta1-modeinfo-single) | single represents a single signer | +| `multi` | [`Multi`](#cosmos-tx-v1beta1-modeinfo-multi) | multi represents a nested multisig signer | + +### cosmos.tx.v1beta1.ModeInfo.Multi + +Multi is the mode info for a multisig public key + +| Field | Type | Description | +| --- | --- | --- | +| `bitarray` | [`CompactBitArray`](#cosmos-crypto-multisig-v1beta1-compactbitarray) | bitarray specifies which keys within the multisig are signing | +| `mode_infos` | [`ModeInfo`](#cosmos-tx-v1beta1-modeinfo)[] | mode_infos is the corresponding modes of the signers of the multisig which could include nested multisig public keys | + +### cosmos.tx.v1beta1.ModeInfo.Single + +Single is the mode info for a single signer. It is structured as a message to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the future + +| Field | Type | Description | +| --- | --- | --- | +| `mode` | [`SignMode`](#cosmos-tx-signing-v1beta1-signmode) | mode is the signing mode of the single signer | + +### cosmos.tx.v1beta1.OrderBy + +Written as a quoted string in JSON. + +| Value | | +| --- | --- | +| `ORDER_BY_UNSPECIFIED` | Zero value. Handlers reject it. | +| `ORDER_BY_ASC` | | +| `ORDER_BY_DESC` | | + +### cosmos.tx.v1beta1.SignerInfo + +SignerInfo describes the public key and signing mode of a single top-level signer. + +| Field | Type | Description | +| --- | --- | --- | +| `public_key` | `Any` | public_key is the public key of the signer. It is optional for accounts that already exist in state. If unset, the verifier can use the required \ signer address for this position and lookup the public key. | +| `mode_info` | [`ModeInfo`](#cosmos-tx-v1beta1-modeinfo) | mode_info describes the signing mode of the signer and is a nested structure to support nested multisig pubkey's | +| `sequence` | `uint64` | sequence is the sequence of the account, which describes the number of committed transactions signed by a given address. It is used to prevent replay attacks. | + +### cosmos.tx.v1beta1.Tip + +Tip is the tip used for meta-transactions. + +| Field | Type | Description | +| --- | --- | --- | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | amount is the amount of the tip | +| `tipper` | `string` | tipper is the address of the account paying for the tip Encoded as cosmos.AddressString. | + +### cosmos.tx.v1beta1.Tx + +Tx is the standard type used for broadcasting transactions. + +| Field | Type | Description | +| --- | --- | --- | +| `body` | [`TxBody`](#cosmos-tx-v1beta1-txbody) | body is the processable content of the transaction | +| `auth_info` | [`AuthInfo`](#cosmos-tx-v1beta1-authinfo) | auth_info is the authorization related content of the transaction, specifically signers, signer modes and fee | +| `signatures` | `bytes`[] | signatures is a list of signatures that matches the length and order of AuthInfo's signer_infos to allow connecting signature meta information like public key and signing mode by position. | + +### cosmos.tx.v1beta1.TxBody + +TxBody is the body of a transaction that all signers sign over. + +| Field | Type | Description | +| --- | --- | --- | +| `messages` | `Any`[] | messages is a list of messages to be executed. The required signers of those messages define the number and order of elements in AuthInfo's signer_infos and Tx's signatures. Each required signer address is added to the list only the first time it occurs. By convention, the first required signer (usually from the first message) is referred to as the primary signer and pays the fee for the whole transaction. | +| `memo` | `string` | memo is any arbitrary note/comment to be added to the transaction. WARNING: in clients, any publicly exposed text should not be called memo, but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). | +| `timeout_height` | `uint64` | timeout_height is the block height after which this transaction will not be processed by the chain. | +| `unordered` | `bool` | unordered, when set to true, indicates that the transaction signer(s) intend for the transaction to be evaluated and executed in an un-ordered fashion. Specifically, the account's nonce will NOT be checked or incremented, which allows for fire-and-forget as well as concurrent transaction execution. Note, when set to true, the existing 'timeout_timestamp' value must be set and will be used to correspond to a timestamp in which the transaction is deemed valid. When true, the sequence value MUST be 0, and any transaction with unordered=true and a non-zero sequence value will be rejected. External services that make assumptions about sequence values may need to be updated because of this. | +| `timeout_timestamp` | `Timestamp` | timeout_timestamp is the block time after which this transaction will not be processed by the chain. Note, if unordered=true this value MUST be set and will act as a short-lived TTL in which the transaction is deemed valid and kept in memory to prevent duplicates. | +| `extension_options` | `Any`[] | extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, the transaction will be rejected | +| `non_critical_extension_options` | `Any`[] | extension_options are arbitrary options that can be added by chains when the default options are not sufficient. If any of these are present and can't be handled, they will be ignored | + + diff --git a/sdk/next/api-reference/grpc/upgrade.mdx b/sdk/next/api-reference/grpc/upgrade.mdx new file mode 100644 index 00000000..046774e7 --- /dev/null +++ b/sdk/next/api-reference/grpc/upgrade.mdx @@ -0,0 +1,254 @@ +--- +title: "Upgrade" +description: "gRPC queries and transaction messages defined by the upgrade module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Queries + +A node exposes only the services its application registers: + +- gRPC on port 9090 +- REST on port 1317, if the method has an HTTP binding + +Run `grpcurl -plaintext localhost:9090 list` to see what a node serves. + +Queries are read-only and never pass through consensus. See [Queries](/sdk/next/learn/concepts/transactions#queries). + +Replace `<string>` placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some `string` fields accept enum constants listed under Types. Field tables give the encoding each value takes. + +Examples assume a local node. For TLS endpoints, use port 443 and omit `-plaintext`. See [gRPC services](/sdk/next/api-reference/grpc/index) for reflection, address formats, and decimal encoding. + +### AppliedPlan + +AppliedPlan queries a previously applied upgrade plan by its name. + +| | | +| --- | --- | +| gRPC | `cosmos.upgrade.v1beta1.Query/AppliedPlan` | +| REST | `GET /cosmos/upgrade/v1beta1/applied_plan/{name}` | + +Request `QueryAppliedPlanRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `name` | `string` | name is the name of the applied plan to query for. | + +Response `QueryAppliedPlanResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `height` | `int64` | height is the block height at which the plan was applied. | + +```bash +grpcurl -plaintext -d '{"name":"<string>"}' \ + localhost:9090 cosmos.upgrade.v1beta1.Query/AppliedPlan +``` + +### Authority + +Returns the account with authority to conduct upgrades + +| | | +| --- | --- | +| gRPC | `cosmos.upgrade.v1beta1.Query/Authority` | +| REST | `GET /cosmos/upgrade/v1beta1/authority` | + +Request `QueryAuthorityRequest`: + +This message has no fields. + +Response `QueryAuthorityResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `address` | `string` | | + +```bash +grpcurl -plaintext localhost:9090 cosmos.upgrade.v1beta1.Query/Authority +``` + +### CurrentPlan + +CurrentPlan queries the current upgrade plan. + +| | | +| --- | --- | +| gRPC | `cosmos.upgrade.v1beta1.Query/CurrentPlan` | +| REST | `GET /cosmos/upgrade/v1beta1/current_plan` | + +Request `QueryCurrentPlanRequest`: + +This message has no fields. + +Response `QueryCurrentPlanResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `plan` | [`Plan`](#cosmos-upgrade-v1beta1-plan) | plan is the current upgrade plan. | + +```bash +grpcurl -plaintext localhost:9090 cosmos.upgrade.v1beta1.Query/CurrentPlan +``` + +### ModuleVersions + +ModuleVersions queries the list of module versions from state. + +| | | +| --- | --- | +| gRPC | `cosmos.upgrade.v1beta1.Query/ModuleVersions` | +| REST | `GET /cosmos/upgrade/v1beta1/module_versions` | + +Request `QueryModuleVersionsRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `module_name` | `string` | module_name is a field to query a specific module consensus version from state. Leaving this empty will fetch the full list of module versions from state | + +Response `QueryModuleVersionsResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `module_versions` | [`ModuleVersion`](#cosmos-upgrade-v1beta1-moduleversion)[] | module_versions is a list of module names with their consensus versions. | + +```bash +grpcurl -plaintext -d '{"module_name":"<string>"}' \ + localhost:9090 cosmos.upgrade.v1beta1.Query/ModuleVersions +``` + +### UpgradedConsensusState + +<Warning>This method is deprecated.</Warning> + +UpgradedConsensusState queries the consensus state that will serve as a trusted kernel for the next version of this chain. It will only be stored at the last height of this chain. UpgradedConsensusState RPC not supported with legacy querier This rpc is deprecated now that IBC has its own replacement (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) + +| | | +| --- | --- | +| gRPC | `cosmos.upgrade.v1beta1.Query/UpgradedConsensusState` | +| REST | `GET /cosmos/upgrade/v1beta1/upgraded_consensus_state/{lastHeight}` | + +Request `QueryUpgradedConsensusStateRequest`: + +| Field | Type | Description | +| --- | --- | --- | +| `last_height` | `int64` | last height of the current chain must be sent in request as this is the height under which next consensus state is stored | + +Response `QueryUpgradedConsensusStateResponse`: + +| Field | Type | Description | +| --- | --- | --- | +| `upgraded_consensus_state` | `bytes` | | + +```bash +grpcurl -plaintext -d '{"last_height":"1"}' \ + localhost:9090 cosmos.upgrade.v1beta1.Query/UpgradedConsensusState +``` + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/next/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/next/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/next/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### CancelUpgrade + +CancelUpgrade is a governance operation for cancelling a previously approved software upgrade. + +| | | +| --- | --- | +| Type URL | `/cosmos.upgrade.v1beta1.MsgCancelUpgrade` | +| Handler | `cosmos.upgrade.v1beta1.Msg/CancelUpgrade` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/MsgCancelUpgrade` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | + +In a transaction: + +```json +{ + "@type": "/cosmos.upgrade.v1beta1.MsgCancelUpgrade", + "authority": "<string>" +} +``` + +Response `MsgCancelUpgradeResponse`: + +This message has no fields. + +### SoftwareUpgrade + +SoftwareUpgrade is a governance operation for initiating a software upgrade. + +| | | +| --- | --- | +| Type URL | `/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade` | +| Handler | `cosmos.upgrade.v1beta1.Msg/SoftwareUpgrade` | +| Signer | `authority` | +| Amino name | `cosmos-sdk/MsgSoftwareUpgrade` | + +<Note>The signer is the governance module account, which no user holds a key for. This message executes only through a passed governance proposal, not as a transaction you submit directly.</Note> + +| Field | Type | Description | +| --- | --- | --- | +| `authority` | `string` | authority is the address that controls the module (defaults to x/gov unless overwritten). Encoded as cosmos.AddressString. | +| `plan` | [`Plan`](#cosmos-upgrade-v1beta1-plan) | plan is the upgrade plan. | + +In a transaction: + +```json +{ + "@type": "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", + "authority": "<string>", + "plan": { + "name": "<string>", + "height": "1", + "info": "<string>" + } +} +``` + +Response `MsgSoftwareUpgradeResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.upgrade.v1beta1.ModuleVersion + +ModuleVersion specifies a module and its consensus version. + +| Field | Type | Description | +| --- | --- | --- | +| `name` | `string` | name of the app module | +| `version` | `uint64` | consensus version of the app module | + +### cosmos.upgrade.v1beta1.Plan + +Plan specifies information about a planned upgrade and when it should occur. + +| Field | Type | Description | +| --- | --- | --- | +| `name` | `string` | Sets the name for the upgrade. This name will be used by the upgraded version of the software to apply any special "on-upgrade" commands during the first BeginBlock method after the upgrade is applied. It is also used to detect whether a software version can handle a given upgrade. If no upgrade handler with this name has been set in the software, it will be assumed that the software is out-of-date when the upgrade Time or Height is reached and the software will exit. | +| `time` | `Timestamp` | Deprecated: Time based upgrades have been deprecated. Time based upgrade logic has been removed from the SDK. If this field is not empty, an error will be thrown. Deprecated. | +| `height` | `int64` | The height at which the upgrade must be performed. | +| `info` | `string` | Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to | +| `upgraded_client_state` | `Any` | Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been moved to the IBC module in the sub module 02-client. If this field is not empty, an error will be thrown. Deprecated. | + + diff --git a/sdk/next/api-reference/grpc/vesting.mdx b/sdk/next/api-reference/grpc/vesting.mdx new file mode 100644 index 00000000..6dc76228 --- /dev/null +++ b/sdk/next/api-reference/grpc/vesting.mdx @@ -0,0 +1,168 @@ +--- +title: "Vesting" +description: "gRPC queries and transaction messages defined by the vesting module in Cosmos SDK v0.55 (unreleased)." +--- + +{/* Generated by scripts/api-reference/sync-sdk-api-reference.js. Do not edit by hand. */} + +<Info> + Generated from [`cosmos/cosmos-sdk@c1126e4e5460`](https://github.com/cosmos/cosmos-sdk/tree/c1126e4e5460571378bf9bd9c49cce476b0791e2/proto) on ref `main`. +</Info> + +## Transaction messages + +These messages are included in signed transactions, not called as endpoints. See [Transactions](/sdk/next/learn/concepts/transactions#transactions) for the execution model, and [Sending transactions](/sdk/next/api-reference/transactions) for the envelope they go into. + +Examples use CLI transaction JSON. Decimal fields use values such as `"0.05"`, even when their proto type is `bytes`. The gRPC `TxEncode` method instead requires the scaled value `"50000000000000000"`. See [scalar encodings](/sdk/next/api-reference/grpc/index#scalar-encodings). + +- Handler: Generated client method +- Signer: Account that must sign +- Amino name: Legacy identifier used by hardware wallets and other Amino signers + +### CreatePeriodicVestingAccount + +CreatePeriodicVestingAccount defines a method that enables creating a periodic vesting account. + +| | | +| --- | --- | +| Type URL | `/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount` | +| Handler | `cosmos.vesting.v1beta1.Msg/CreatePeriodicVestingAccount` | +| Signer | `from_address` | +| Amino name | `cosmos-sdk/MsgCreatePeriodVestAccount` | + +| Field | Type | Description | +| --- | --- | --- | +| `from_address` | `string` | | +| `to_address` | `string` | | +| `start_time` | `int64` | start of vesting as unix time (in seconds). | +| `vesting_periods` | [`Period`](#cosmos-vesting-v1beta1-period)[] | | + +In a transaction: + +```json +{ + "@type": "/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", + "from_address": "<string>", + "to_address": "<string>", + "start_time": "1", + "vesting_periods": [ + { + "length": "1", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] + } + ] +} +``` + +Response `MsgCreatePeriodicVestingAccountResponse`: + +This message has no fields. + +### CreatePermanentLockedAccount + +CreatePermanentLockedAccount defines a method that enables creating a permanent locked account. + +| | | +| --- | --- | +| Type URL | `/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount` | +| Handler | `cosmos.vesting.v1beta1.Msg/CreatePermanentLockedAccount` | +| Signer | `from_address` | +| Amino name | `cosmos-sdk/MsgCreatePermLockedAccount` | + +| Field | Type | Description | +| --- | --- | --- | +| `from_address` | `string` | | +| `to_address` | `string` | | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + +In a transaction: + +```json +{ + "@type": "/cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", + "from_address": "<string>", + "to_address": "<string>", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ] +} +``` + +Response `MsgCreatePermanentLockedAccountResponse`: + +This message has no fields. + +### CreateVestingAccount + +CreateVestingAccount defines a method that enables creating a vesting account. + +| | | +| --- | --- | +| Type URL | `/cosmos.vesting.v1beta1.MsgCreateVestingAccount` | +| Handler | `cosmos.vesting.v1beta1.Msg/CreateVestingAccount` | +| Signer | `from_address` | +| Amino name | `cosmos-sdk/MsgCreateVestingAccount` | + +| Field | Type | Description | +| --- | --- | --- | +| `from_address` | `string` | Encoded as cosmos.AddressString. | +| `to_address` | `string` | Encoded as cosmos.AddressString. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | +| `end_time` | `int64` | end of vesting as unix time (in seconds). | +| `delayed` | `bool` | | + +In a transaction: + +```json +{ + "@type": "/cosmos.vesting.v1beta1.MsgCreateVestingAccount", + "from_address": "<string>", + "to_address": "<string>", + "amount": [ + { + "denom": "<string>", + "amount": "<string>" + } + ], + "end_time": "1", + "delayed": false +} +``` + +Response `MsgCreateVestingAccountResponse`: + +This message has no fields. + +## Types + +Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a `[]` suffix marks a repeated field. + +### cosmos.base.v1beta1.Coin + +Coin defines a token with a denomination and an amount. + +NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. + +| Field | Type | Description | +| --- | --- | --- | +| `denom` | `string` | | +| `amount` | `string` | Encoded as cosmos.Int. | + +### cosmos.vesting.v1beta1.Period + +Period defines a length of time and amount of coins that will vest. + +| Field | Type | Description | +| --- | --- | --- | +| `length` | `int64` | Period duration in seconds. | +| `amount` | [`Coin`](#cosmos-base-v1beta1-coin)[] | | + + diff --git a/sdk/next/api-reference/index.mdx b/sdk/next/api-reference/index.mdx new file mode 100644 index 00000000..f63a697e --- /dev/null +++ b/sdk/next/api-reference/index.mdx @@ -0,0 +1,101 @@ +--- +title: "API Reference" +description: "The interfaces a Cosmos SDK node exposes, and how to reach them." +--- + +Cosmos SDK modules define their queries and transaction messages in protobuf. A node exposes them through gRPC and REST, while the CLI provides commands for using them. CometBFT exposes a separate API for consensus and node data. + +This section documents these interfaces. For how applications register them, see [CLI, gRPC, and REST API](/sdk/next/learn/concepts/cli-grpc-rest). + +## Interfaces + +| Interface | Default address | Default | Purpose | +| ------------ | ----------------- | -------- | -------------------------------------------------------------------------------------- | +| [gRPC](/sdk/next/api-reference/grpc/index) | `localhost:9090` | Enabled | Query application state and access supporting services | +| [REST](/sdk/next/api-reference/rest/bank/allbalances) | `localhost:1317` | Disabled | Call gRPC methods through HTTP and JSON | +| [CometBFT RPC](/cometbft/latest/api-reference/rpc/index) | `127.0.0.1:26657` | Enabled | Query blocks, validators, and the mempool; broadcast transactions; subscribe to events | +| [CLI](/sdk/next/learn/concepts/cli-grpc-rest#cli) | n/a | n/a | Query state and build, sign, and broadcast transactions | + +## How they relate + +Modules usually define two protobuf services: + +* A `Query` service for reading application state +* A `Msg` service describing the state changes transactions can request + +### Queries + +Query methods are callable through gRPC on port 9090. Methods with a `google.api.http` binding are also available through REST on port 1317. + +For example, these calls reach the same query handler: + +```text +cosmos.bank.v1beta1.Query/AllBalances +GET /cosmos/bank/v1beta1/balances/{address} +``` + +Without an HTTP binding, a method is available only through gRPC. + +### Transaction messages + +`Msg` methods are not callable endpoints. They define messages that are encoded into transactions, signed, and broadcast through a transaction service: + +```text +cosmos.tx.v1beta1.Service/BroadcastTx gRPC +POST /cosmos/tx/v1beta1/txs REST +broadcast_tx_sync CometBFT RPC +``` + +### CLI + +The CLI is a client. Query commands call the application’s query services. Transaction commands construct and sign module messages, then broadcast the resulting transaction. See [Using the CLI](/sdk/next/node/interact-node#using-the-cli) for worked examples, and [CLI](/sdk/next/learn/concepts/cli-grpc-rest#cli) for how it fits with the other interfaces. + +Most commands are not written by hand: [`autocli`](/sdk/next/guides/tooling/autocli) generates one per gRPC service method, which is why a command and a `grpcurl` call usually take the same arguments. + +Examples in this reference use `simd`, but each chain normally provides its own application-specific binary. + +### CometBFT RPC + +CometBFT RPC is separate from the application APIs. It belongs to the consensus engine beneath the Cosmos SDK and exposes blocks, validators, consensus data, the mempool, transaction broadcasting, and event subscriptions. + +See the [CometBFT RPC reference](/cometbft/latest/api-reference/rpc/index). + +## What this section covers + +| Page | Contents | +| -------------------------------------------------------------- | ---------------------------------------------------------------------- | +| [gRPC services](/sdk/next/api-reference/grpc/index) | Service names, field encodings, reflection, and pagination | +| REST | Generated OpenAPI documentation with a playground for each route | +| [Sending transactions](/sdk/next/api-reference/transactions) | How to build, sign, and broadcast transactions | + +Each module page includes both kinds of declaration. For example, the `bank` page documents `Query/AllBalances` and `MsgSend`. + +To list the gRPC services registered by a running node: + +```bash +grpcurl -plaintext localhost:9090 list +``` + +## Enable the interfaces + +gRPC is enabled by default. Enable REST in `app.toml`: + +```toml +[api] +enable = true +address = "tcp://localhost:1317" + +# Serve the generated OpenAPI document at /swagger. +swagger = true + +[grpc] +enable = true +address = "localhost:9090" +``` + +Configure CometBFT RPC in `config.toml`: + +```toml +[rpc] +laddr = "tcp://127.0.0.1:26657" +``` diff --git a/sdk/next/api-reference/inventory.json b/sdk/next/api-reference/inventory.json new file mode 100644 index 00000000..c4945e6f --- /dev/null +++ b/sdk/next/api-reference/inventory.json @@ -0,0 +1,176 @@ +{ + "queries": [ + "cosmos.auth.v1beta1.Query/Account", + "cosmos.auth.v1beta1.Query/AccountAddressByID", + "cosmos.auth.v1beta1.Query/AccountInfo", + "cosmos.auth.v1beta1.Query/Accounts", + "cosmos.auth.v1beta1.Query/AddressBytesToString", + "cosmos.auth.v1beta1.Query/AddressStringToBytes", + "cosmos.auth.v1beta1.Query/Bech32Prefix", + "cosmos.auth.v1beta1.Query/ModuleAccountByName", + "cosmos.auth.v1beta1.Query/ModuleAccounts", + "cosmos.auth.v1beta1.Query/Params", + "cosmos.authz.v1beta1.Query/GranteeGrants", + "cosmos.authz.v1beta1.Query/GranterGrants", + "cosmos.authz.v1beta1.Query/Grants", + "cosmos.autocli.v1.Query/AppOptions", + "cosmos.bank.v1beta1.Query/AllBalances", + "cosmos.bank.v1beta1.Query/Balance", + "cosmos.bank.v1beta1.Query/DenomMetadata", + "cosmos.bank.v1beta1.Query/DenomMetadataByQueryString", + "cosmos.bank.v1beta1.Query/DenomOwners", + "cosmos.bank.v1beta1.Query/DenomOwnersByQuery", + "cosmos.bank.v1beta1.Query/DenomsMetadata", + "cosmos.bank.v1beta1.Query/Params", + "cosmos.bank.v1beta1.Query/SendEnabled", + "cosmos.bank.v1beta1.Query/SpendableBalanceByDenom", + "cosmos.bank.v1beta1.Query/SpendableBalances", + "cosmos.bank.v1beta1.Query/SupplyOf", + "cosmos.bank.v1beta1.Query/TotalSupply", + "cosmos.base.node.v1beta1.Service/Config", + "cosmos.base.node.v1beta1.Service/Status", + "cosmos.base.reflection.v1beta1.ReflectionService/ListAllInterfaces", + "cosmos.base.reflection.v1beta1.ReflectionService/ListImplementations", + "cosmos.base.reflection.v2alpha1.ReflectionService/GetAuthnDescriptor", + "cosmos.base.reflection.v2alpha1.ReflectionService/GetChainDescriptor", + "cosmos.base.reflection.v2alpha1.ReflectionService/GetCodecDescriptor", + "cosmos.base.reflection.v2alpha1.ReflectionService/GetConfigurationDescriptor", + "cosmos.base.reflection.v2alpha1.ReflectionService/GetQueryServicesDescriptor", + "cosmos.base.reflection.v2alpha1.ReflectionService/GetTxDescriptor", + "cosmos.base.tendermint.v1beta1.Service/ABCIQuery", + "cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight", + "cosmos.base.tendermint.v1beta1.Service/GetBlockResults", + "cosmos.base.tendermint.v1beta1.Service/GetLatestBlock", + "cosmos.base.tendermint.v1beta1.Service/GetLatestBlockResults", + "cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet", + "cosmos.base.tendermint.v1beta1.Service/GetNodeInfo", + "cosmos.base.tendermint.v1beta1.Service/GetSyncing", + "cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight", + "cosmos.consensus.v1.Query/Params", + "cosmos.counter.v1.Query/GetCount", + "cosmos.distribution.v1beta1.Query/CommunityPool", + "cosmos.distribution.v1beta1.Query/DelegationRewards", + "cosmos.distribution.v1beta1.Query/DelegationTotalRewards", + "cosmos.distribution.v1beta1.Query/DelegatorStartingInfo", + "cosmos.distribution.v1beta1.Query/DelegatorValidators", + "cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress", + "cosmos.distribution.v1beta1.Query/Params", + "cosmos.distribution.v1beta1.Query/ValidatorCommission", + "cosmos.distribution.v1beta1.Query/ValidatorCurrentRewards", + "cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo", + "cosmos.distribution.v1beta1.Query/ValidatorHistoricalRewards", + "cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards", + "cosmos.distribution.v1beta1.Query/ValidatorSlashes", + "cosmos.epochs.v1beta1.Query/CurrentEpoch", + "cosmos.epochs.v1beta1.Query/EpochInfos", + "cosmos.evidence.v1beta1.Query/AllEvidence", + "cosmos.evidence.v1beta1.Query/Evidence", + "cosmos.feegrant.v1beta1.Query/Allowance", + "cosmos.feegrant.v1beta1.Query/Allowances", + "cosmos.feegrant.v1beta1.Query/AllowancesByGranter", + "cosmos.gov.v1.Query/Constitution", + "cosmos.gov.v1.Query/Deposit", + "cosmos.gov.v1.Query/Deposits", + "cosmos.gov.v1.Query/Params", + "cosmos.gov.v1.Query/Proposal", + "cosmos.gov.v1.Query/Proposals", + "cosmos.gov.v1.Query/TallyResult", + "cosmos.gov.v1.Query/Vote", + "cosmos.gov.v1.Query/Votes", + "cosmos.gov.v1beta1.Query/Deposit", + "cosmos.gov.v1beta1.Query/Deposits", + "cosmos.gov.v1beta1.Query/Params", + "cosmos.gov.v1beta1.Query/Proposal", + "cosmos.gov.v1beta1.Query/Proposals", + "cosmos.gov.v1beta1.Query/TallyResult", + "cosmos.gov.v1beta1.Query/Vote", + "cosmos.gov.v1beta1.Query/Votes", + "cosmos.mint.v1beta1.Query/AnnualProvisions", + "cosmos.mint.v1beta1.Query/Inflation", + "cosmos.mint.v1beta1.Query/Params", + "cosmos.reflection.v1.ReflectionService/FileDescriptors", + "cosmos.slashing.v1beta1.Query/Params", + "cosmos.slashing.v1beta1.Query/SigningInfo", + "cosmos.slashing.v1beta1.Query/SigningInfos", + "cosmos.staking.v1beta1.Query/Delegation", + "cosmos.staking.v1beta1.Query/DelegatorDelegations", + "cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations", + "cosmos.staking.v1beta1.Query/DelegatorValidator", + "cosmos.staking.v1beta1.Query/DelegatorValidators", + "cosmos.staking.v1beta1.Query/HistoricalInfo", + "cosmos.staking.v1beta1.Query/Params", + "cosmos.staking.v1beta1.Query/Pool", + "cosmos.staking.v1beta1.Query/Redelegations", + "cosmos.staking.v1beta1.Query/UnbondingDelegation", + "cosmos.staking.v1beta1.Query/Validator", + "cosmos.staking.v1beta1.Query/ValidatorDelegations", + "cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations", + "cosmos.staking.v1beta1.Query/Validators", + "cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", + "cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", + "cosmos.tx.v1beta1.Service/BroadcastTx", + "cosmos.tx.v1beta1.Service/GetBlockWithTxs", + "cosmos.tx.v1beta1.Service/GetTx", + "cosmos.tx.v1beta1.Service/GetTxsEvent", + "cosmos.tx.v1beta1.Service/Simulate", + "cosmos.tx.v1beta1.Service/TxDecode", + "cosmos.tx.v1beta1.Service/TxDecodeAmino", + "cosmos.tx.v1beta1.Service/TxEncode", + "cosmos.tx.v1beta1.Service/TxEncodeAmino", + "cosmos.upgrade.v1beta1.Query/AppliedPlan", + "cosmos.upgrade.v1beta1.Query/Authority", + "cosmos.upgrade.v1beta1.Query/CurrentPlan", + "cosmos.upgrade.v1beta1.Query/ModuleVersions", + "cosmos.upgrade.v1beta1.Query/UpgradedConsensusState" + ], + "messages": [ + "cosmos.auth.v1beta1.MsgUpdateParams", + "cosmos.authz.v1beta1.MsgExec", + "cosmos.authz.v1beta1.MsgGrant", + "cosmos.authz.v1beta1.MsgRevoke", + "cosmos.bank.v1beta1.MsgMultiSend", + "cosmos.bank.v1beta1.MsgSend", + "cosmos.bank.v1beta1.MsgSetSendEnabled", + "cosmos.bank.v1beta1.MsgUpdateParams", + "cosmos.consensus.v1.MsgUpdateParams", + "cosmos.counter.v1.MsgIncreaseCounter", + "cosmos.distribution.v1beta1.MsgCommunityPoolSpend", + "cosmos.distribution.v1beta1.MsgDepositValidatorRewardsPool", + "cosmos.distribution.v1beta1.MsgFundCommunityPool", + "cosmos.distribution.v1beta1.MsgSetWithdrawAddress", + "cosmos.distribution.v1beta1.MsgUpdateParams", + "cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", + "cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", + "cosmos.evidence.v1beta1.MsgSubmitEvidence", + "cosmos.feegrant.v1beta1.MsgGrantAllowance", + "cosmos.feegrant.v1beta1.MsgPruneAllowances", + "cosmos.feegrant.v1beta1.MsgRevokeAllowance", + "cosmos.gov.v1.MsgCancelProposal", + "cosmos.gov.v1.MsgDeposit", + "cosmos.gov.v1.MsgExecLegacyContent", + "cosmos.gov.v1.MsgSubmitProposal", + "cosmos.gov.v1.MsgUpdateParams", + "cosmos.gov.v1.MsgVote", + "cosmos.gov.v1.MsgVoteWeighted", + "cosmos.gov.v1beta1.MsgDeposit", + "cosmos.gov.v1beta1.MsgSubmitProposal", + "cosmos.gov.v1beta1.MsgVote", + "cosmos.gov.v1beta1.MsgVoteWeighted", + "cosmos.mint.v1beta1.MsgUpdateParams", + "cosmos.slashing.v1beta1.MsgUnjail", + "cosmos.slashing.v1beta1.MsgUpdateParams", + "cosmos.staking.v1beta1.MsgBeginRedelegate", + "cosmos.staking.v1beta1.MsgCancelUnbondingDelegation", + "cosmos.staking.v1beta1.MsgCreateValidator", + "cosmos.staking.v1beta1.MsgDelegate", + "cosmos.staking.v1beta1.MsgEditValidator", + "cosmos.staking.v1beta1.MsgRotateConsPubKey", + "cosmos.staking.v1beta1.MsgUndelegate", + "cosmos.staking.v1beta1.MsgUpdateParams", + "cosmos.upgrade.v1beta1.MsgCancelUpgrade", + "cosmos.upgrade.v1beta1.MsgSoftwareUpgrade", + "cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount", + "cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccount", + "cosmos.vesting.v1beta1.MsgCreateVestingAccount" + ] +} diff --git a/sdk/next/api-reference/rest/openapi.yaml b/sdk/next/api-reference/rest/openapi.yaml new file mode 100644 index 00000000..9add8b5f --- /dev/null +++ b/sdk/next/api-reference/rest/openapi.yaml @@ -0,0 +1,47299 @@ +openapi: 3.0.0 +info: + title: Cosmos SDK REST API + description: >- + HTTP bindings for the gRPC query services of the standard Cosmos SDK modules, documenting Cosmos + SDK v0.55 (unreleased). + + + Generated from cosmos/cosmos-sdk at commit c1126e4e5460571378bf9bd9c49cce476b0791e2 on ref + `main`. + + + A chain exposes only the modules its application registers, so it may serve a subset of these + routes alongside routes of its own. + version: v0.55 (unreleased) +paths: + /cosmos/auth/v1beta1/account_info/{address}: + get: + summary: AccountInfo + operationId: auth_v1beta1_AccountInfo + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + info: + description: info is the account info which is represented by BaseAccount. + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along with + a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + account_number: + type: string + format: uint64 + sequence: + type: string + format: uint64 + nullable: true + description: QueryAccountInfoResponse is the Query/AccountInfo response type. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address + description: address is the account address string. + in: path + required: true + schema: + type: string + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/AccountInfo` + ([reference](/sdk/next/api-reference/grpc/auth#accountinfo)) + + + AccountInfo queries account info which is common to all account types. + x-grpc-method: cosmos.auth.v1beta1.Query/AccountInfo + /cosmos/auth/v1beta1/accounts: + get: + summary: Accounts + description: >- + gRPC: `cosmos.auth.v1beta1.Query/Accounts` + ([reference](/sdk/next/api-reference/grpc/auth#accounts)) + + + Accounts returns all the existing accounts. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: auth_v1beta1_Accounts + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + accounts: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: accounts are the existing accounts + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryAccountsResponse is the response type for the Query/Accounts RPC method. + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - auth + x-grpc-method: cosmos.auth.v1beta1.Query/Accounts + /cosmos/auth/v1beta1/accounts/{address}: + get: + summary: Account + operationId: auth_v1beta1_Account + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + account: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + description: QueryAccountResponse is the response type for the Query/Account RPC method. + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: address + description: address defines the address to query for. + in: path + required: true + schema: + type: string + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/Account` + ([reference](/sdk/next/api-reference/grpc/auth#account)) + + + Account returns account details based on address. + x-grpc-method: cosmos.auth.v1beta1.Query/Account + /cosmos/auth/v1beta1/address_by_id/{accountId}: + get: + summary: AccountAddressByID + operationId: auth_v1beta1_AccountAddressByID + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + account_address: + type: string + title: >- + QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc + method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: accountId + description: account_id is the account number of the address to be queried. + in: path + required: true + schema: + type: string + format: uint64 + - name: id + description: |- + Deprecated, use account_id instead + + id is the account number of the address to be queried. This field + should have been an uint64 (like all account numbers), and will be + updated to uint64 in a future version of the auth query. + in: query + required: false + schema: + type: string + format: int64 + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/AccountAddressByID` + ([reference](/sdk/next/api-reference/grpc/auth#accountaddressbyid)) + + + AccountAddressByID returns account address based on account number. + x-grpc-method: cosmos.auth.v1beta1.Query/AccountAddressByID + /cosmos/auth/v1beta1/bech32: + get: + summary: Bech32Prefix + operationId: auth_v1beta1_Bech32Prefix + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + bech32_prefix: + type: string + description: Bech32PrefixResponse is the response type for Bech32Prefix rpc method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/Bech32Prefix` + ([reference](/sdk/next/api-reference/grpc/auth#bech32prefix)) + + + Bech32Prefix queries bech32Prefix + x-grpc-method: cosmos.auth.v1beta1.Query/Bech32Prefix + /cosmos/auth/v1beta1/bech32/{addressBytes}: + get: + summary: AddressBytesToString + operationId: auth_v1beta1_AddressBytesToString + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + address_string: + type: string + description: AddressBytesToStringResponse is the response type for AddressString rpc method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: addressBytes + in: path + required: true + schema: + type: string + format: byte + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/AddressBytesToString` + ([reference](/sdk/next/api-reference/grpc/auth#addressbytestostring)) + + + AddressBytesToString converts Account Address bytes to string + x-grpc-method: cosmos.auth.v1beta1.Query/AddressBytesToString + /cosmos/auth/v1beta1/module_accounts: + get: + summary: ModuleAccounts + operationId: auth_v1beta1_ModuleAccounts + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + accounts: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + description: >- + QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC + method. + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/ModuleAccounts` + ([reference](/sdk/next/api-reference/grpc/auth#moduleaccounts)) + + + ModuleAccounts returns all the existing module accounts. + x-grpc-method: cosmos.auth.v1beta1.Query/ModuleAccounts + /cosmos/auth/v1beta1/module_accounts/{name}: + get: + summary: ModuleAccountByName + operationId: auth_v1beta1_ModuleAccountByName + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + account: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + description: >- + QueryModuleAccountByNameResponse is the response type for the + Query/ModuleAccountByName RPC method. + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: name + in: path + required: true + schema: + type: string + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/ModuleAccountByName` + ([reference](/sdk/next/api-reference/grpc/auth#moduleaccountbyname)) + + + ModuleAccountByName returns the module account info by module name + x-grpc-method: cosmos.auth.v1beta1.Query/ModuleAccountByName + /cosmos/auth/v1beta1/params: + get: + summary: Params + operationId: auth_v1beta1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_memo_characters: + type: string + format: uint64 + tx_sig_limit: + type: string + format: uint64 + tx_size_cost_per_byte: + type: string + format: uint64 + sig_verify_cost_ed25519: + type: string + format: uint64 + sig_verify_cost_secp256k1: + type: string + format: uint64 + sig_verify_cost_mldsa65: + type: string + format: uint64 + nullable: true + additionalProperties: false + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - auth + description: >- + gRPC: `cosmos.auth.v1beta1.Query/Params` + ([reference](/sdk/next/api-reference/grpc/auth#params)) + + + Params queries all parameters. + x-grpc-method: cosmos.auth.v1beta1.Query/Params + /cosmos/authz/v1beta1/grants: + get: + summary: Grants + operationId: authz_v1beta1_Grants + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + grants: + type: array + items: + type: object + properties: + authorization: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + expiration: + type: string + format: date-time + title: >- + time when the grant will expire and will be pruned. If null, then the + grant + + doesn't have a time expiration (other conditions in `authorization` + + may apply to invalidate the grant) + nullable: true + description: |- + Grant gives permissions to execute + the provide method with expiration time. + description: authorizations is a list of grants granted for grantee by granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryGrantsResponse is the response type for the Query/Authorizations RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: granter + in: query + required: false + schema: + type: string + - name: grantee + in: query + required: false + schema: + type: string + - name: msgTypeUrl + description: Optional, msg_type_url, when set, will query only grants matching given msg type. + in: query + required: false + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - authz + description: >- + gRPC: `cosmos.authz.v1beta1.Query/Grants` + ([reference](/sdk/next/api-reference/grpc/authz#grants)) + + + Returns list of `Authorization`, granted to the grantee by the granter. + x-grpc-method: cosmos.authz.v1beta1.Query/Grants + /cosmos/authz/v1beta1/grants/grantee/{grantee}: + get: + summary: GranteeGrants + operationId: authz_v1beta1_GranteeGrants + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + authorization: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + expiration: + type: string + format: date-time + nullable: true + title: >- + GrantAuthorization extends a grant with both the addresses of the grantee + and granter. + + It is used in genesis.proto and query.proto + description: grants is a list of grants granted to the grantee. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: >- + QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: grantee + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - authz + description: >- + gRPC: `cosmos.authz.v1beta1.Query/GranteeGrants` + ([reference](/sdk/next/api-reference/grpc/authz#granteegrants)) + + + GranteeGrants returns a list of `GrantAuthorization` by grantee. + x-grpc-method: cosmos.authz.v1beta1.Query/GranteeGrants + /cosmos/authz/v1beta1/grants/granter/{granter}: + get: + summary: GranterGrants + operationId: authz_v1beta1_GranterGrants + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + authorization: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + expiration: + type: string + format: date-time + nullable: true + title: >- + GrantAuthorization extends a grant with both the addresses of the grantee + and granter. + + It is used in genesis.proto and query.proto + description: grants is a list of grants granted by the granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: >- + QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: granter + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - authz + description: >- + gRPC: `cosmos.authz.v1beta1.Query/GranterGrants` + ([reference](/sdk/next/api-reference/grpc/authz#grantergrants)) + + + GranterGrants returns list of `GrantAuthorization`, granted by granter. + x-grpc-method: cosmos.authz.v1beta1.Query/GranterGrants + /cosmos/bank/v1beta1/balances/{address}: + get: + summary: AllBalances + description: >- + gRPC: `cosmos.bank.v1beta1.Query/AllBalances` + ([reference](/sdk/next/api-reference/grpc/bank#allbalances)) + + + AllBalances queries the balance of all coins for a single account. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: bank_v1beta1_AllBalances + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: balances is the balances of all the coins. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryAllBalancesResponse is the response type for the Query/AllBalances RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: address + description: address is the address to query balances for. + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + - name: resolveDenom + description: >- + resolve_denom is the flag to resolve the denom into a human-readable form from the + metadata. + in: query + required: false + schema: + type: boolean + tags: + - bank + x-grpc-method: cosmos.bank.v1beta1.Query/AllBalances + /cosmos/bank/v1beta1/balances/{address}/by_denom: + get: + summary: Balance + operationId: bank_v1beta1_Balance + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + balance: + description: balance is the balance of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + additionalProperties: false + description: QueryBalanceResponse is the response type for the Query/Balance RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: address + description: address is the address to query balances for. + in: path + required: true + schema: + type: string + - name: denom + description: denom is the coin denom to query balances for. + in: query + required: false + schema: + type: string + tags: + - bank + description: >- + gRPC: `cosmos.bank.v1beta1.Query/Balance` + ([reference](/sdk/next/api-reference/grpc/bank#balance)) + + + Balance queries the balance of a single coin for a single account. + x-grpc-method: cosmos.bank.v1beta1.Query/Balance + /cosmos/bank/v1beta1/denom_owners/{denom}: + get: + summary: DenomOwners + description: >- + gRPC: `cosmos.bank.v1beta1.Query/DenomOwners` + ([reference](/sdk/next/api-reference/grpc/bank#denomowners)) + + + DenomOwners queries for all account addresses that own a particular token + + denomination. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: bank_v1beta1_DenomOwners + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + denom_owners: + type: array + items: + type: object + properties: + address: + type: string + description: address defines the address that owns a particular denomination. + balance: + description: balance is the balance of the denominated coin for an account. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + additionalProperties: false + description: |- + DenomOwner defines structure representing an account that owns or holds a + particular denominated token. It contains the account address and account + balance of the denominated token. + additionalProperties: false + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denom + description: denom defines the coin denomination to query all account holders for. + in: path + required: true + schema: + type: string + pattern: .+ + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - bank + x-grpc-method: cosmos.bank.v1beta1.Query/DenomOwners + /cosmos/bank/v1beta1/denom_owners_by_query: + get: + summary: DenomOwnersByQuery + operationId: bank_v1beta1_DenomOwnersByQuery + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + denom_owners: + type: array + items: + type: object + properties: + address: + type: string + description: address defines the address that owns a particular denomination. + balance: + description: balance is the balance of the denominated coin for an account. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + additionalProperties: false + description: |- + DenomOwner defines structure representing an account that owns or holds a + particular denominated token. It contains the account address and account + balance of the denominated token. + additionalProperties: false + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: >- + QueryDenomOwnersByQueryResponse defines the RPC response of a DenomOwnersByQuery + RPC query. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denom + description: denom defines the coin denomination to query all account holders for. + in: query + required: false + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - bank + description: >- + gRPC: `cosmos.bank.v1beta1.Query/DenomOwnersByQuery` + ([reference](/sdk/next/api-reference/grpc/bank#denomownersbyquery)) + + + DenomOwnersByQuery queries for all account addresses that own a particular token + + denomination. + x-grpc-method: cosmos.bank.v1beta1.Query/DenomOwnersByQuery + /cosmos/bank/v1beta1/denoms_metadata: + get: + summary: DenomsMetadata + operationId: bank_v1beta1_DenomsMetadata + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + metadatas: + type: array + items: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit (e.g + uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given DenomUnit's + denom + + 1 denom = 10^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit of + 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + additionalProperties: false + title: denom_units represents the list of DenomUnit's for a given coin + nullable: true + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with exponent = + 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This + can + + be the same as the display. + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional + information. Optional. + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. It's used to + verify that + + the document didn't change. Optional. + description: |- + Metadata represents a struct that describes + a basic token. + additionalProperties: false + description: metadata provides the client information for all the registered tokens. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - bank + description: >- + gRPC: `cosmos.bank.v1beta1.Query/DenomsMetadata` + ([reference](/sdk/next/api-reference/grpc/bank#denomsmetadata)) + + + DenomsMetadata queries the client metadata for all registered coin + + denominations. + x-grpc-method: cosmos.bank.v1beta1.Query/DenomsMetadata + /cosmos/bank/v1beta1/denoms_metadata/{denom}: + get: + summary: DenomMetadata + operationId: bank_v1beta1_DenomMetadata + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + metadata: + description: >- + metadata describes and provides all the client information for the requested + token. + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit (e.g + uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given DenomUnit's + denom + + 1 denom = 10^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit of + 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + additionalProperties: false + title: denom_units represents the list of DenomUnit's for a given coin + nullable: true + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with exponent = + 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: |- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + be the same as the display. + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional information. + Optional. + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. It's used to verify + that + + the document didn't change. Optional. + nullable: true + additionalProperties: false + description: |- + QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denom + description: denom is the coin denom to query the metadata for. + in: path + required: true + schema: + type: string + pattern: .+ + tags: + - bank + description: >- + gRPC: `cosmos.bank.v1beta1.Query/DenomMetadata` + ([reference](/sdk/next/api-reference/grpc/bank#denommetadata)) + + + DenomMetadata queries the client metadata of a given coin denomination. + x-grpc-method: cosmos.bank.v1beta1.Query/DenomMetadata + /cosmos/bank/v1beta1/denoms_metadata_by_query_string: + get: + summary: DenomMetadataByQueryString + operationId: bank_v1beta1_DenomMetadataByQueryString + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + metadata: + description: >- + metadata describes and provides all the client information for the requested + token. + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: >- + denom represents the string name of the given denom unit (e.g + uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given DenomUnit's + denom + + 1 denom = 10^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit of + 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + additionalProperties: false + title: denom_units represents the list of DenomUnit's for a given coin + nullable: true + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with exponent = + 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: |- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + be the same as the display. + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional information. + Optional. + uri_hash: + type: string + description: >- + URIHash is a sha256 hash of a document pointed by URI. It's used to verify + that + + the document didn't change. Optional. + nullable: true + additionalProperties: false + description: >- + QueryDenomMetadataByQueryStringResponse is the response type for the + Query/DenomMetadata RPC + + method. Identical with QueryDenomMetadataResponse but receives denom as query + string in request. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denom + description: denom is the coin denom to query the metadata for. + in: query + required: false + schema: + type: string + tags: + - bank + description: >- + gRPC: `cosmos.bank.v1beta1.Query/DenomMetadataByQueryString` + ([reference](/sdk/next/api-reference/grpc/bank#denommetadatabyquerystring)) + + + DenomMetadataByQueryString queries the client metadata of a given coin denomination. + x-grpc-method: cosmos.bank.v1beta1.Query/DenomMetadataByQueryString + /cosmos/bank/v1beta1/params: + get: + summary: Params + operationId: bank_v1beta1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + params: + description: params provides the parameters of the bank module. + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + additionalProperties: false + description: >- + Deprecated: Use of SendEnabled in params is deprecated. + + For genesis, use the newly added send_enabled field in the genesis object. + + Storage, lookup, and manipulation of this information is now in the + keeper. + + + As of cosmos-sdk 0.47, this only exists for backwards compatibility of + genesis files. + nullable: true + default_send_enabled: + type: boolean + nullable: true + additionalProperties: false + description: QueryParamsResponse defines the response type for querying x/bank parameters. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - bank + description: >- + gRPC: `cosmos.bank.v1beta1.Query/Params` + ([reference](/sdk/next/api-reference/grpc/bank#params)) + + + Params queries the parameters of x/bank module. + x-grpc-method: cosmos.bank.v1beta1.Query/Params + /cosmos/bank/v1beta1/send_enabled: + get: + summary: SendEnabled + description: >- + gRPC: `cosmos.bank.v1beta1.Query/SendEnabled` + ([reference](/sdk/next/api-reference/grpc/bank#sendenabled)) + + + SendEnabled queries for SendEnabled entries. + + + This query only returns denominations that have specific SendEnabled settings. + + Any denomination that does not have a specific setting will use the default + + params.default_send_enabled, and will not be returned by this query. + operationId: bank_v1beta1_SendEnabled + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + additionalProperties: false + nullable: true + pagination: + description: |- + pagination defines the pagination in the response. This field is only + populated if the denoms field in the request is empty. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QuerySendEnabledResponse defines the RPC response of a SendEnable query. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denoms + description: denoms is the specific denoms you want look up. Leave empty to get all entries. + in: query + required: false + explode: true + schema: + type: array + items: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - bank + x-grpc-method: cosmos.bank.v1beta1.Query/SendEnabled + /cosmos/bank/v1beta1/spendable_balances/{address}: + get: + summary: SpendableBalances + description: >- + gRPC: `cosmos.bank.v1beta1.Query/SpendableBalances` + ([reference](/sdk/next/api-reference/grpc/bank#spendablebalances)) + + + SpendableBalances queries the spendable balance of all coins for a single + + account. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: bank_v1beta1_SpendableBalances + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: balances is the spendable balances of all the coins. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QuerySpendableBalancesResponse defines the gRPC response structure for querying + an account's spendable balances. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: address + description: address is the address to query spendable balances for. + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - bank + x-grpc-method: cosmos.bank.v1beta1.Query/SpendableBalances + /cosmos/bank/v1beta1/spendable_balances/{address}/by_denom: + get: + summary: SpendableBalanceByDenom + description: >- + gRPC: `cosmos.bank.v1beta1.Query/SpendableBalanceByDenom` + ([reference](/sdk/next/api-reference/grpc/bank#spendablebalancebydenom)) + + + SpendableBalanceByDenom queries the spendable balance of a single denom for + + a single account. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: bank_v1beta1_SpendableBalanceByDenom + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + balance: + description: balance is the balance of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + additionalProperties: false + description: |- + QuerySpendableBalanceByDenomResponse defines the gRPC response structure for + querying an account's spendable balance for a specific denom. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: address + description: address is the address to query balances for. + in: path + required: true + schema: + type: string + - name: denom + description: denom is the coin denom to query balances for. + in: query + required: false + schema: + type: string + tags: + - bank + x-grpc-method: cosmos.bank.v1beta1.Query/SpendableBalanceByDenom + /cosmos/bank/v1beta1/supply: + get: + summary: TotalSupply + description: >- + gRPC: `cosmos.bank.v1beta1.Query/TotalSupply` + ([reference](/sdk/next/api-reference/grpc/bank#totalsupply)) + + + TotalSupply queries the total supply of all coins. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: bank_v1beta1_TotalSupply + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + supply: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + title: supply is the supply of the coins + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + title: |- + QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC + method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - bank + x-grpc-method: cosmos.bank.v1beta1.Query/TotalSupply + /cosmos/bank/v1beta1/supply/by_denom: + get: + summary: SupplyOf + description: >- + gRPC: `cosmos.bank.v1beta1.Query/SupplyOf` + ([reference](/sdk/next/api-reference/grpc/bank#supplyof)) + + + SupplyOf queries the supply of a single coin. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: bank_v1beta1_SupplyOf + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + amount: + description: amount is the supply of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + additionalProperties: false + description: QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: denom + description: denom is the coin denom to query balances for. + in: query + required: false + schema: + type: string + tags: + - bank + x-grpc-method: cosmos.bank.v1beta1.Query/SupplyOf + /cosmos/base/node/v1beta1/config: + get: + summary: Config + operationId: base_v1beta1_Config + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + minimum_gas_price: + type: string + pruning_keep_recent: + type: string + pruning_interval: + type: string + halt_height: + type: string + format: uint64 + description: ConfigResponse defines the response structure for the Config gRPC query. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - base + description: >- + gRPC: `cosmos.base.node.v1beta1.Service/Config` + ([reference](/sdk/next/api-reference/grpc/base#config)) + + + Config queries for the operator configuration. + x-grpc-method: cosmos.base.node.v1beta1.Service/Config + /cosmos/base/node/v1beta1/status: + get: + summary: Status + operationId: base_v1beta1_Status + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + earliest_store_height: + type: string + format: uint64 + title: earliest block height available in the store + height: + type: string + format: uint64 + title: current block height + timestamp: + type: string + format: date-time + title: block height timestamp + nullable: true + app_hash: + type: string + format: byte + title: app hash of the current block + nullable: true + validator_hash: + type: string + format: byte + title: validator hash provided by the consensus header + nullable: true + description: StateResponse defines the response structure for the status of a node. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - base + description: >- + gRPC: `cosmos.base.node.v1beta1.Service/Status` + ([reference](/sdk/next/api-reference/grpc/base#status)) + + + Status queries for the node status. + x-grpc-method: cosmos.base.node.v1beta1.Service/Status + /cosmos/base/tendermint/v1beta1/abci_query: + get: + summary: ABCIQuery + operationId: base_v1beta1_ABCIQuery + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int64 + log: + type: string + title: nondeterministic + info: + type: string + title: nondeterministic + index: + type: string + format: int64 + key: + type: string + format: byte + nullable: true + value: + type: string + format: byte + nullable: true + proof_ops: + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + nullable: true + data: + type: string + format: byte + nullable: true + description: >- + ProofOp defines an operation used for calculating Merkle root. The data + could + + be arbitrary format, providing necessary data for example neighbouring + node + + hash. + + + Note: This type is a duplicate of the ProofOp proto type defined in + Tendermint. + additionalProperties: false + nullable: true + description: >- + ProofOps is Merkle proof defined by the list of ProofOps. + + + Note: This type is a duplicate of the ProofOps proto type defined in + Tendermint. + nullable: true + additionalProperties: false + height: + type: string + format: int64 + codespace: + type: string + description: |- + ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query. + + Note: This type is a duplicate of the ResponseQuery proto type defined in + Tendermint. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: data + in: query + required: false + schema: + type: string + format: byte + - name: path + in: query + required: false + schema: + type: string + - name: height + in: query + required: false + schema: + type: string + format: int64 + - name: prove + in: query + required: false + schema: + type: boolean + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/ABCIQuery` + ([reference](/sdk/next/api-reference/grpc/base#abciquery)) + + + ABCIQuery defines a query handler that supports ABCI queries directly to the + + application, bypassing Tendermint completely. The ABCI query must contain + + a valid and supported path, including app, custom, p2p, and store. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/ABCIQuery + /cosmos/base/tendermint/v1beta1/block_results/latest: + get: + summary: GetLatestBlockResults + operationId: base_v1beta1_GetLatestBlockResults + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + height: + type: string + format: int64 + description: height is the block height. + txs_results: + type: array + items: + type: object + properties: + code: + type: integer + format: int64 + data: + type: string + format: byte + nullable: true + log: + type: string + title: nondeterministic + info: + type: string + title: nondeterministic + gas_wanted: + type: string + format: int64 + gas_used: + type: string + format: int64 + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: >- + EventAttribute is a single key-value pair, associated with an + event. + additionalProperties: false + nullable: true + description: >- + Event allows application developers to attach additional information + to + + ResponseFinalizeBlock and ResponseCheckTx. + + Later, transactions may be queried using these events. + additionalProperties: false + title: nondeterministic + nullable: true + codespace: + type: string + description: >- + ExecTxResult contains results of executing one individual transaction. + + + * Its structure is equivalent to #ResponseDeliverTx which will be + deprecated/deleted + additionalProperties: false + description: txs_results contains the results of each transaction execution. + nullable: true + finalize_block_events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + additionalProperties: false + nullable: true + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + additionalProperties: false + description: |- + finalize_block_events contains consensus-level events emitted during block + finalization, including slashing, jailing, and validator set updates. + nullable: true + validator_updates: + type: array + items: + type: object + properties: + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: PublicKey defines the keys available for use with Validators + nullable: true + additionalProperties: false + power: + type: string + format: int64 + additionalProperties: false + description: validator_updates contains the validator updates for this block. + nullable: true + consensus_param_updates: + description: >- + consensus_param_updates contains any consensus parameter updates for this + block. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + nullable: true + additionalProperties: false + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: >- + Max age of evidence, in blocks. + + + The basic formula for calculating this is: MaxAgeDuration / {average + block + + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + nullable: true + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be + committed in a single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + nullable: true + additionalProperties: false + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + nullable: true + additionalProperties: false + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + nullable: true + additionalProperties: false + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: >- + vote_extensions_enable_height configures the first height during which + + vote extensions will be enabled. During this specified height, and for + all + + subsequent heights, precommit messages that do not contain valid + extension data + + will be considered invalid. Prior to this height, vote extensions will + not + + be used or accepted by validators on the network. + + + Once enabled, vote extensions will be created by the application in + ExtendVote, + + passed to the application for validation in VerifyVoteExtension and + given + + to the application to use when proposing a block during + PrepareProposal. + description: >- + ABCIParams configure functionality specific to the Application Blockchain + Interface. + nullable: true + additionalProperties: false + authority: + type: object + properties: + authority: + type: string + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + app_hash: + type: string + format: byte + description: app_hash is the app hash after processing this block. + nullable: true + description: >- + GetLatestBlockResultsResponse is the response type for the + Query/GetLatestBlockResults RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetLatestBlockResults` + ([reference](/sdk/next/api-reference/grpc/base#getlatestblockresults)) + + + GetLatestBlockResults returns the block results for the latest block. + + Block results contain finalize_block_events which include consensus-level + + events like slashing, jailing, and validator set updates. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetLatestBlockResults + /cosmos/base/tendermint/v1beta1/block_results/{height}: + get: + summary: GetBlockResults + operationId: base_v1beta1_GetBlockResults + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + height: + type: string + format: int64 + description: height is the block height. + txs_results: + type: array + items: + type: object + properties: + code: + type: integer + format: int64 + data: + type: string + format: byte + nullable: true + log: + type: string + title: nondeterministic + info: + type: string + title: nondeterministic + gas_wanted: + type: string + format: int64 + gas_used: + type: string + format: int64 + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: >- + EventAttribute is a single key-value pair, associated with an + event. + additionalProperties: false + nullable: true + description: >- + Event allows application developers to attach additional information + to + + ResponseFinalizeBlock and ResponseCheckTx. + + Later, transactions may be queried using these events. + additionalProperties: false + title: nondeterministic + nullable: true + codespace: + type: string + description: >- + ExecTxResult contains results of executing one individual transaction. + + + * Its structure is equivalent to #ResponseDeliverTx which will be + deprecated/deleted + additionalProperties: false + description: txs_results contains the results of each transaction execution. + nullable: true + finalize_block_events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + additionalProperties: false + nullable: true + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + additionalProperties: false + description: |- + finalize_block_events contains consensus-level events emitted during block + finalization, including slashing, jailing, and validator set updates. + nullable: true + validator_updates: + type: array + items: + type: object + properties: + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: PublicKey defines the keys available for use with Validators + nullable: true + additionalProperties: false + power: + type: string + format: int64 + additionalProperties: false + description: validator_updates contains the validator updates for this block. + nullable: true + consensus_param_updates: + description: >- + consensus_param_updates contains any consensus parameter updates for this + block. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + nullable: true + additionalProperties: false + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: >- + Max age of evidence, in blocks. + + + The basic formula for calculating this is: MaxAgeDuration / {average + block + + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + nullable: true + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be + committed in a single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + nullable: true + additionalProperties: false + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + nullable: true + additionalProperties: false + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + nullable: true + additionalProperties: false + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: >- + vote_extensions_enable_height configures the first height during which + + vote extensions will be enabled. During this specified height, and for + all + + subsequent heights, precommit messages that do not contain valid + extension data + + will be considered invalid. Prior to this height, vote extensions will + not + + be used or accepted by validators on the network. + + + Once enabled, vote extensions will be created by the application in + ExtendVote, + + passed to the application for validation in VerifyVoteExtension and + given + + to the application to use when proposing a block during + PrepareProposal. + description: >- + ABCIParams configure functionality specific to the Application Blockchain + Interface. + nullable: true + additionalProperties: false + authority: + type: object + properties: + authority: + type: string + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + app_hash: + type: string + format: byte + description: app_hash is the app hash after processing this block. + nullable: true + description: >- + GetBlockResultsResponse is the response type for the Query/GetBlockResults RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: height + in: path + required: true + schema: + type: string + format: int64 + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetBlockResults` + ([reference](/sdk/next/api-reference/grpc/base#getblockresults)) + + + GetBlockResults queries block results for given height. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetBlockResults + /cosmos/base/tendermint/v1beta1/blocks/latest: + get: + summary: GetLatestBlock + operationId: base_v1beta1_GetLatestBlock + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + block: + title: 'Deprecated: please use `sdk_block` instead' + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. + + NOTE: not all txs here are valid. We're just agreeing on the order + first. + + This means that block.AppHash does not include these txs. + nullable: true + title: Data contains the set of transactions included in the block + nullable: true + additionalProperties: false + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + DuplicateVoteEvidence contains evidence of a validator signed + two conflicting votes. + nullable: true + additionalProperties: false + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for + processing a block in the blockchain, + + including all blockchain data structures and the + rules of the application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the + previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an + error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the + signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: >- + CommitSig is a part of the Vote included in a + Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was + committed by a set of validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + proposer: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use with + Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + nullable: true + additionalProperties: false + additionalProperties: false + nullable: true + nullable: true + additionalProperties: false + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: CommitSig is a part of the Vote included in a Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + sdk_block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + description: >- + proposer_address is the original block proposer address, formatted as + a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, we convert it to + a Bech32 string + + for better UX. + + + original proposer of the block + description: Header defines the structure of a Tendermint block header. + nullable: true + additionalProperties: false + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. + + NOTE: not all txs here are valid. We're just agreeing on the order + first. + + This means that block.AppHash does not include these txs. + nullable: true + title: Data contains the set of transactions included in the block + nullable: true + additionalProperties: false + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + DuplicateVoteEvidence contains evidence of a validator signed + two conflicting votes. + nullable: true + additionalProperties: false + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for + processing a block in the blockchain, + + including all blockchain data structures and the + rules of the application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the + previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an + error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the + signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: >- + CommitSig is a part of the Vote included in a + Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was + committed by a set of validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + proposer: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use with + Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + nullable: true + additionalProperties: false + additionalProperties: false + nullable: true + nullable: true + additionalProperties: false + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: CommitSig is a part of the Vote included in a Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + nullable: true + additionalProperties: false + description: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. + nullable: true + additionalProperties: false + description: >- + GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetLatestBlock` + ([reference](/sdk/next/api-reference/grpc/base#getlatestblock)) + + + GetLatestBlock returns the latest block. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetLatestBlock + /cosmos/base/tendermint/v1beta1/blocks/{height}: + get: + summary: GetBlockByHeight + operationId: base_v1beta1_GetBlockByHeight + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + block: + title: 'Deprecated: please use `sdk_block` instead' + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. + + NOTE: not all txs here are valid. We're just agreeing on the order + first. + + This means that block.AppHash does not include these txs. + nullable: true + title: Data contains the set of transactions included in the block + nullable: true + additionalProperties: false + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + DuplicateVoteEvidence contains evidence of a validator signed + two conflicting votes. + nullable: true + additionalProperties: false + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for + processing a block in the blockchain, + + including all blockchain data structures and the + rules of the application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the + previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an + error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the + signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: >- + CommitSig is a part of the Vote included in a + Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was + committed by a set of validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + proposer: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use with + Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + nullable: true + additionalProperties: false + additionalProperties: false + nullable: true + nullable: true + additionalProperties: false + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: CommitSig is a part of the Vote included in a Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + sdk_block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + description: >- + proposer_address is the original block proposer address, formatted as + a Bech32 string. + + In Tendermint, this type is `bytes`, but in the SDK, we convert it to + a Bech32 string + + for better UX. + + + original proposer of the block + description: Header defines the structure of a Tendermint block header. + nullable: true + additionalProperties: false + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. + + NOTE: not all txs here are valid. We're just agreeing on the order + first. + + This means that block.AppHash does not include these txs. + nullable: true + title: Data contains the set of transactions included in the block + nullable: true + additionalProperties: false + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in + consensus for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid + for precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: >- + Vote extension signature by the validator if they + participated in + + consensus for the associated block. + + Only valid for precommit messages. + nullable: true + description: >- + Vote represents a prevote or precommit vote from validators + for + + consensus. + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + DuplicateVoteEvidence contains evidence of a validator signed + two conflicting votes. + nullable: true + additionalProperties: false + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for + processing a block in the blockchain, + + including all blockchain data structures and the + rules of the application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the + previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an + error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the + signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: >- + CommitSig is a part of the Vote included in a + Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was + committed by a set of validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + proposer: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use + with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use with + Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + nullable: true + additionalProperties: false + additionalProperties: false + nullable: true + nullable: true + additionalProperties: false + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: CommitSig is a part of the Vote included in a Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + nullable: true + additionalProperties: false + description: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. + nullable: true + additionalProperties: false + description: >- + GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: height + in: path + required: true + schema: + type: string + format: int64 + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight` + ([reference](/sdk/next/api-reference/grpc/base#getblockbyheight)) + + + GetBlockByHeight queries block for given height. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetBlockByHeight + /cosmos/base/tendermint/v1beta1/node_info: + get: + summary: GetNodeInfo + operationId: base_v1beta1_GetNodeInfo + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + default_node_info: + type: object + properties: + protocol_version: + type: object + properties: + p2p: + type: string + format: uint64 + block: + type: string + format: uint64 + app: + type: string + format: uint64 + nullable: true + additionalProperties: false + default_node_id: + type: string + listen_addr: + type: string + network: + type: string + version: + type: string + channels: + type: string + format: byte + nullable: true + moniker: + type: string + other: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + application_version: + type: object + properties: + name: + type: string + app_name: + type: string + version: + type: string + git_commit: + type: string + build_tags: + type: string + go_version: + type: string + build_deps: + type: array + items: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + additionalProperties: false + nullable: true + cosmos_sdk_version: + type: string + description: VersionInfo is the type for the GetNodeInfoResponse message. + nullable: true + additionalProperties: false + description: GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetNodeInfo` + ([reference](/sdk/next/api-reference/grpc/base#getnodeinfo)) + + + GetNodeInfo queries the current node info. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetNodeInfo + /cosmos/base/tendermint/v1beta1/syncing: + get: + summary: GetSyncing + operationId: base_v1beta1_GetSyncing + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + syncing: + type: boolean + earliest_block_height: + type: string + format: int64 + description: earliest_block_height is the earliest block height available on this node. + latest_block_height: + type: string + format: int64 + description: latest_block_height is the latest block height available on this node. + description: GetSyncingResponse is the response type for the Query/GetSyncing RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetSyncing` + ([reference](/sdk/next/api-reference/grpc/base#getsyncing)) + + + GetSyncing queries node syncing. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetSyncing + /cosmos/base/tendermint/v1beta1/validatorsets/latest: + get: + summary: GetLatestValidatorSet + operationId: base_v1beta1_GetLatestValidatorSet + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + block_height: + type: string + format: int64 + validators: + type: array + items: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + nullable: true + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: >- + GetLatestValidatorSetResponse is the response type for the + Query/GetValidatorSetByHeight RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet` + ([reference](/sdk/next/api-reference/grpc/base#getlatestvalidatorset)) + + + GetLatestValidatorSet queries latest validator-set. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet + /cosmos/base/tendermint/v1beta1/validatorsets/{height}: + get: + summary: GetValidatorSetByHeight + operationId: base_v1beta1_GetValidatorSetByHeight + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + block_height: + type: string + format: int64 + validators: + type: array + items: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + nullable: true + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: >- + GetValidatorSetByHeightResponse is the response type for the + Query/GetValidatorSetByHeight RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: height + in: path + required: true + schema: + type: string + format: int64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - base + description: >- + gRPC: `cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight` + ([reference](/sdk/next/api-reference/grpc/base#getvalidatorsetbyheight)) + + + GetValidatorSetByHeight queries validator-set at a given height. + x-grpc-method: cosmos.base.tendermint.v1beta1.Service/GetValidatorSetByHeight + /cosmos/consensus/v1/params: + get: + summary: Params + operationId: consensus_v1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + params: + description: |- + params are the tendermint consensus params stored in the consensus module. + Please note that `params.version` is not populated in this response, it is + tracked separately in the x/upgrade module. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + nullable: true + additionalProperties: false + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: >- + Max age of evidence, in blocks. + + + The basic formula for calculating this is: MaxAgeDuration / {average + block + + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + nullable: true + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be + committed in a single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + nullable: true + additionalProperties: false + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + nullable: true + additionalProperties: false + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + nullable: true + additionalProperties: false + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: >- + vote_extensions_enable_height configures the first height during which + + vote extensions will be enabled. During this specified height, and for + all + + subsequent heights, precommit messages that do not contain valid + extension data + + will be considered invalid. Prior to this height, vote extensions will + not + + be used or accepted by validators on the network. + + + Once enabled, vote extensions will be created by the application in + ExtendVote, + + passed to the application for validation in VerifyVoteExtension and + given + + to the application to use when proposing a block during + PrepareProposal. + description: >- + ABCIParams configure functionality specific to the Application Blockchain + Interface. + nullable: true + additionalProperties: false + authority: + type: object + properties: + authority: + type: string + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + description: QueryParamsResponse defines the response type for querying x/consensus parameters. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - consensus + description: >- + gRPC: `cosmos.consensus.v1.Query/Params` + ([reference](/sdk/next/api-reference/grpc/consensus#params)) + + + Params queries the parameters of x/consensus module. + x-grpc-method: cosmos.consensus.v1.Query/Params + /cosmos/distribution/v1beta1/community_pool: + get: + summary: CommunityPool + operationId: distribution_v1beta1_CommunityPool + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + pool: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: pool defines community pool's coins. + nullable: true + description: |- + QueryCommunityPoolResponse is the response type for the Query/CommunityPool + RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/CommunityPool` + ([reference](/sdk/next/api-reference/grpc/distribution#communitypool)) + + + CommunityPool queries the community pool coins. + x-grpc-method: cosmos.distribution.v1beta1.Query/CommunityPool + /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards: + get: + summary: DelegationTotalRewards + operationId: distribution_v1beta1_DelegationTotalRewards + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + validator_address: + type: string + reward: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + nullable: true + description: |- + DelegationDelegatorReward represents the properties + of a delegator's delegation reward. + additionalProperties: false + description: rewards defines all the rewards accrued by a delegator. + nullable: true + total: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: total defines the sum of all the rewards. + nullable: true + claimable: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + additionalProperties: false + description: >- + claimable defines the amount that can actually be withdrawn. Each delegation + reward is truncated individually, mirroring what Msg/WithdrawDelegatorReward + pays out, so claimable is at most total. + nullable: true + description: |- + QueryDelegationTotalRewardsResponse is the response type for the + Query/DelegationTotalRewards RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: delegatorAddress + description: delegator_address defines the delegator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/DelegationTotalRewards` + ([reference](/sdk/next/api-reference/grpc/distribution#delegationtotalrewards)) + + + DelegationTotalRewards queries the total rewards accrued by each + + validator. + x-grpc-method: cosmos.distribution.v1beta1.Query/DelegationTotalRewards + /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/rewards/{validatorAddress}: + get: + summary: DelegationRewards + operationId: distribution_v1beta1_DelegationRewards + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: rewards defines the rewards accrued by a delegation. + nullable: true + description: |- + QueryDelegationRewardsResponse is the response type for the + Query/DelegationRewards RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: delegatorAddress + description: delegator_address defines the delegator address to query for. + in: path + required: true + schema: + type: string + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/DelegationRewards` + ([reference](/sdk/next/api-reference/grpc/distribution#delegationrewards)) + + + DelegationRewards queries the total rewards accrued by a delegation. + x-grpc-method: cosmos.distribution.v1beta1.Query/DelegationRewards + /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/starting_info/{validatorAddress}: + get: + summary: DelegatorStartingInfo + operationId: distribution_v1beta1_DelegatorStartingInfo + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + starting_info: + description: starting_info defines the starting info of a delegator. + type: object + properties: + previous_period: + type: string + format: uint64 + stake: + type: string + height: + type: string + format: uint64 + nullable: true + additionalProperties: false + description: |- + QueryDelegatorStartingInfoResponse is the response type for the + Query/DelegatorStartingInfo RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: delegatorAddress + description: delegator_address defines the delegator address to query for. + in: path + required: true + schema: + type: string + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/DelegatorStartingInfo` + ([reference](/sdk/next/api-reference/grpc/distribution#delegatorstartinginfo)) + + + DelegatorStartingInfo queries the starting info for a delegator. + x-grpc-method: cosmos.distribution.v1beta1.Query/DelegatorStartingInfo + /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/validators: + get: + summary: DelegatorValidators + operationId: distribution_v1beta1_DelegatorValidators + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + validators: + type: array + items: + type: string + description: validators defines the validators a delegator is delegating for. + description: |- + QueryDelegatorValidatorsResponse is the response type for the + Query/DelegatorValidators RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: delegatorAddress + description: delegator_address defines the delegator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/DelegatorValidators` + ([reference](/sdk/next/api-reference/grpc/distribution#delegatorvalidators)) + + + DelegatorValidators queries the validators of a delegator. + x-grpc-method: cosmos.distribution.v1beta1.Query/DelegatorValidators + /cosmos/distribution/v1beta1/delegators/{delegatorAddress}/withdraw_address: + get: + summary: DelegatorWithdrawAddress + operationId: distribution_v1beta1_DelegatorWithdrawAddress + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + withdraw_address: + type: string + description: withdraw_address defines the delegator address to query for. + description: |- + QueryDelegatorWithdrawAddressResponse is the response type for the + Query/DelegatorWithdrawAddress RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: delegatorAddress + description: delegator_address defines the delegator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress` + ([reference](/sdk/next/api-reference/grpc/distribution#delegatorwithdrawaddress)) + + + DelegatorWithdrawAddress queries withdraw address of a delegator. + x-grpc-method: cosmos.distribution.v1beta1.Query/DelegatorWithdrawAddress + /cosmos/distribution/v1beta1/params: + get: + summary: Params + operationId: distribution_v1beta1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + community_tax: + type: string + base_proposer_reward: + type: string + description: >- + Deprecated: The base_proposer_reward field is deprecated and is no longer + used + + in the x/distribution module's reward mechanism. + bonus_proposer_reward: + type: string + description: >- + Deprecated: The bonus_proposer_reward field is deprecated and is no longer + used + + in the x/distribution module's reward mechanism. + withdraw_addr_enabled: + type: boolean + nullable: true + additionalProperties: false + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/Params` + ([reference](/sdk/next/api-reference/grpc/distribution#params)) + + + Params queries params of the distribution module. + x-grpc-method: cosmos.distribution.v1beta1.Query/Params + /cosmos/distribution/v1beta1/validators/{validatorAddress}: + get: + summary: ValidatorDistributionInfo + operationId: distribution_v1beta1_ValidatorDistributionInfo + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + operator_address: + type: string + description: operator_address defines the validator operator address. + self_bond_rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: self_bond_rewards defines the self delegations rewards. + nullable: true + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: commission defines the commission the validator received. + nullable: true + description: >- + QueryValidatorDistributionInfoResponse is the response type for the + Query/ValidatorDistributionInfo RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo` + ([reference](/sdk/next/api-reference/grpc/distribution#validatordistributioninfo)) + + + ValidatorDistributionInfo queries validator commission and self-delegation rewards for + validator + x-grpc-method: cosmos.distribution.v1beta1.Query/ValidatorDistributionInfo + /cosmos/distribution/v1beta1/validators/{validatorAddress}/commission: + get: + summary: ValidatorCommission + operationId: distribution_v1beta1_ValidatorCommission + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + commission: + description: commission defines the commission the validator received. + type: object + properties: + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + nullable: true + nullable: true + additionalProperties: false + title: |- + QueryValidatorCommissionResponse is the response type for the + Query/ValidatorCommission RPC method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/ValidatorCommission` + ([reference](/sdk/next/api-reference/grpc/distribution#validatorcommission)) + + + ValidatorCommission queries accumulated commission for a validator. + x-grpc-method: cosmos.distribution.v1beta1.Query/ValidatorCommission + /cosmos/distribution/v1beta1/validators/{validatorAddress}/current_rewards: + get: + summary: ValidatorCurrentRewards + operationId: distribution_v1beta1_ValidatorCurrentRewards + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + rewards: + description: rewards defines the current rewards of a validator. + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + nullable: true + period: + type: string + format: uint64 + nullable: true + additionalProperties: false + description: |- + QueryValidatorCurrentRewardsResponse is the response type for the + Query/ValidatorCurrentRewards RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/ValidatorCurrentRewards` + ([reference](/sdk/next/api-reference/grpc/distribution#validatorcurrentrewards)) + + + ValidatorCurrentRewards queries current rewards for a validator. + x-grpc-method: cosmos.distribution.v1beta1.Query/ValidatorCurrentRewards + /cosmos/distribution/v1beta1/validators/{validatorAddress}/historical_rewards/{period}: + get: + summary: ValidatorHistoricalRewards + operationId: distribution_v1beta1_ValidatorHistoricalRewards + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + rewards: + description: rewards defines the historical rewards of a validator. + type: object + properties: + cumulative_reward_ratio: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + nullable: true + reference_count: + type: integer + format: int64 + title: |- + ValidatorHistoricalRewards represents historical rewards for a validator. + Height is implicit within the store key. + Cumulative reward ratio is the sum from the zeroeth period + until this period of rewards / tokens, per the spec. + The reference count indicates the number of objects + which might need to reference this historical entry at any point. + ReferenceCount = + number of outstanding delegations which ended the associated period (and + might need to read that record) + + number of slashes which ended the associated period (and might need to + read that record) + + one per validator for the zeroeth period, set on initialization + nullable: true + additionalProperties: false + description: |- + QueryValidatorHistoricalRewardsResponse is the response type for the + Query/ValidatorHistoricalRewards RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + - name: period + description: period defines the period to query historical rewards for. + in: path + required: true + schema: + type: string + format: uint64 + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/ValidatorHistoricalRewards` + ([reference](/sdk/next/api-reference/grpc/distribution#validatorhistoricalrewards)) + + + ValidatorHistoricalRewards queries historical rewards for a validator at a specific period. + x-grpc-method: cosmos.distribution.v1beta1.Query/ValidatorHistoricalRewards + /cosmos/distribution/v1beta1/validators/{validatorAddress}/outstanding_rewards: + get: + summary: ValidatorOutstandingRewards + operationId: distribution_v1beta1_ValidatorOutstandingRewards + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + rewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + nullable: true + description: |- + ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards + for a validator inexpensive to track, allows simple sanity checks. + nullable: true + additionalProperties: false + description: |- + QueryValidatorOutstandingRewardsResponse is the response type for the + Query/ValidatorOutstandingRewards RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards` + ([reference](/sdk/next/api-reference/grpc/distribution#validatoroutstandingrewards)) + + + ValidatorOutstandingRewards queries rewards of a validator address. + x-grpc-method: cosmos.distribution.v1beta1.Query/ValidatorOutstandingRewards + /cosmos/distribution/v1beta1/validators/{validatorAddress}/slashes: + get: + summary: ValidatorSlashes + operationId: distribution_v1beta1_ValidatorSlashes + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + slashes: + type: array + items: + type: object + properties: + validator_period: + type: string + format: uint64 + fraction: + type: string + description: |- + ValidatorSlashEvent represents a validator slash event. + Height is implicit within the store key. + This is needed to calculate appropriate amount of staking tokens + for delegations which are withdrawn after a slash has occurred. + additionalProperties: false + description: slashes defines the slashes the validator received. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryValidatorSlashesResponse is the response type for the + Query/ValidatorSlashes RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: validatorAddress + description: validator_address defines the validator address to query for. + in: path + required: true + schema: + type: string + - name: startingHeight + description: starting_height defines the optional starting height to query the slashes. + in: query + required: false + schema: + type: string + format: uint64 + - name: endingHeight + description: starting_height defines the optional ending height to query the slashes. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - distribution + description: >- + gRPC: `cosmos.distribution.v1beta1.Query/ValidatorSlashes` + ([reference](/sdk/next/api-reference/grpc/distribution#validatorslashes)) + + + ValidatorSlashes queries slash events of a validator. + x-grpc-method: cosmos.distribution.v1beta1.Query/ValidatorSlashes + /cosmos/epochs/v1beta1/current_epoch: + get: + summary: CurrentEpoch + operationId: epochs_v1beta1_CurrentEpoch + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + current_epoch: + type: string + format: int64 + description: |- + QueryCurrentEpochResponse defines the gRPC response structure for + querying an epoch by its identifier. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: identifier + in: query + required: false + schema: + type: string + tags: + - epochs + description: >- + gRPC: `cosmos.epochs.v1beta1.Query/CurrentEpoch` + ([reference](/sdk/next/api-reference/grpc/epochs#currentepoch)) + + + CurrentEpoch provide current epoch of specified identifier + x-grpc-method: cosmos.epochs.v1beta1.Query/CurrentEpoch + /cosmos/epochs/v1beta1/epochs: + get: + summary: EpochInfos + operationId: epochs_v1beta1_EpochInfos + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + epochs: + type: array + items: + type: object + properties: + identifier: + type: string + description: identifier is a unique reference to this particular timer. + start_time: + type: string + format: date-time + description: |- + start_time is the time at which the timer first ever ticks. + If start_time is in the future, the epoch will not begin until the start + time. + nullable: true + duration: + type: string + description: |- + duration is the time in between epoch ticks. + In order for intended behavior to be met, duration should + be greater than the chains expected block time. + Duration must be non-zero. + nullable: true + current_epoch: + type: string + format: int64 + description: >- + current_epoch is the current epoch number, or in other words, + + how many times has the timer 'ticked'. + + The first tick (current_epoch=1) is defined as + + the first block whose blocktime is greater than the EpochInfo + start_time. + current_epoch_start_time: + type: string + format: date-time + description: >- + current_epoch_start_time describes the start time of the current timer + + interval. The interval is (current_epoch_start_time, + + current_epoch_start_time + duration] When the timer ticks, this is set + to + + current_epoch_start_time = last_epoch_start_time + duration only one + timer + + tick for a given identifier can occur per block. + + + NOTE! The current_epoch_start_time may diverge significantly from the + + wall-clock time the epoch began at. Wall-clock time of epoch start may + be + + >> current_epoch_start_time. Suppose current_epoch_start_time = 10, + + duration = 5. Suppose the chain goes offline at t=14, and comes back + online + + at t=30, and produces blocks at every successive time. (t=31, 32, etc.) + + * The t=30 block will start the epoch for (10, 15] + + * The t=31 block will start the epoch for (15, 20] + + * The t=32 block will start the epoch for (20, 25] + + * The t=33 block will start the epoch for (25, 30] + + * The t=34 block will start the epoch for (30, 35] + + * The **t=36** block will start the epoch for (35, 40] + nullable: true + epoch_counting_started: + type: boolean + description: |- + epoch_counting_started is a boolean, that indicates whether this + epoch timer has began yet. + current_epoch_start_height: + type: string + format: int64 + title: >- + current_epoch_start_height is the block height at which the current + epoch + + started. (The block height at which the timer last ticked) + description: |- + EpochInfo is a struct that describes the data going into + a timer defined by the x/epochs module. + additionalProperties: false + nullable: true + description: |- + QueryEpochInfosRequest defines the gRPC response structure for + querying all epoch info. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - epochs + description: >- + gRPC: `cosmos.epochs.v1beta1.Query/EpochInfos` + ([reference](/sdk/next/api-reference/grpc/epochs#epochinfos)) + + + EpochInfos provide running epochInfos + x-grpc-method: cosmos.epochs.v1beta1.Query/EpochInfos + /cosmos/evidence/v1beta1/evidence: + get: + summary: AllEvidence + operationId: evidence_v1beta1_AllEvidence + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: evidence returns all evidences. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC + method. + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - evidence + description: >- + gRPC: `cosmos.evidence.v1beta1.Query/AllEvidence` + ([reference](/sdk/next/api-reference/grpc/evidence#allevidence)) + + + AllEvidence queries all evidence. + x-grpc-method: cosmos.evidence.v1beta1.Query/AllEvidence + /cosmos/evidence/v1beta1/evidence/{hash}: + get: + summary: Evidence + operationId: evidence_v1beta1_Evidence + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + evidence: + description: evidence returns the requested evidence. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + description: QueryEvidenceResponse is the response type for the Query/Evidence RPC method. + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: hash + description: hash defines the evidence hash of the requested evidence. + in: path + required: true + schema: + type: string + - name: evidenceHash + description: |- + evidence_hash defines the hash of the requested evidence. + Deprecated: Use hash, a HEX encoded string, instead. + in: query + required: false + schema: + type: string + format: byte + tags: + - evidence + description: >- + gRPC: `cosmos.evidence.v1beta1.Query/Evidence` + ([reference](/sdk/next/api-reference/grpc/evidence#evidence)) + + + Evidence queries evidence based on evidence hash. + x-grpc-method: cosmos.evidence.v1beta1.Query/Evidence + /cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}: + get: + summary: Allowance + operationId: feegrant_v1beta1_Allowance + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + allowance: + description: allowance is an allowance granted for grantee by granter. + type: object + properties: + granter: + type: string + description: granter is the address of the user granting an allowance of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of another + user's funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + title: Grant is stored in the KVStore to record a grant with full context + nullable: true + description: QueryAllowanceResponse is the response type for the Query/Allowance RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: granter + description: granter is the address of the user granting an allowance of their funds. + in: path + required: true + schema: + type: string + - name: grantee + description: grantee is the address of the user being granted an allowance of another user's funds. + in: path + required: true + schema: + type: string + tags: + - feegrant + description: >- + gRPC: `cosmos.feegrant.v1beta1.Query/Allowance` + ([reference](/sdk/next/api-reference/grpc/feegrant#allowance)) + + + Allowance returns granted allowance to the grantee by the granter. + x-grpc-method: cosmos.feegrant.v1beta1.Query/Allowance + /cosmos/feegrant/v1beta1/allowances/{grantee}: + get: + summary: Allowances + operationId: feegrant_v1beta1_Allowances + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: granter is the address of the user granting an allowance of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of another + user's funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + title: Grant is stored in the KVStore to record a grant with full context + description: allowances are allowance's granted for grantee by granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryAllowancesResponse is the response type for the Query/Allowances RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: grantee + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - feegrant + description: >- + gRPC: `cosmos.feegrant.v1beta1.Query/Allowances` + ([reference](/sdk/next/api-reference/grpc/feegrant#allowances)) + + + Allowances returns all the grants for the given grantee address. + x-grpc-method: cosmos.feegrant.v1beta1.Query/Allowances + /cosmos/feegrant/v1beta1/issued/{granter}: + get: + summary: AllowancesByGranter + operationId: feegrant_v1beta1_AllowancesByGranter + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: granter is the address of the user granting an allowance of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of another + user's funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + title: Grant is stored in the KVStore to record a grant with full context + description: allowances that have been issued by the granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: >- + QueryAllowancesByGranterResponse is the response type for the + Query/AllowancesByGranter RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: granter + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - feegrant + description: >- + gRPC: `cosmos.feegrant.v1beta1.Query/AllowancesByGranter` + ([reference](/sdk/next/api-reference/grpc/feegrant#allowancesbygranter)) + + + AllowancesByGranter returns all the grants given by an address + x-grpc-method: cosmos.feegrant.v1beta1.Query/AllowancesByGranter + /cosmos/gov/v1/constitution: + get: + summary: Constitution + operationId: gov_v1_Constitution + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + constitution: + type: string + title: >- + QueryConstitutionResponse is the response type for the Query/Constitution RPC + method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1.Query/Constitution` + ([reference](/sdk/next/api-reference/grpc/gov#constitution)) + + + Constitution queries the chain's constitution. + x-grpc-method: cosmos.gov.v1.Query/Constitution + /cosmos/gov/v1/params/{paramsType}: + get: + summary: Params (v1) + operationId: gov_v1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + voting_params: + description: |- + Deprecated: Prefer to use `params` instead. + voting_params defines the parameters related to voting. + type: object + properties: + voting_period: + type: string + description: Duration of the voting period. + nullable: true + nullable: true + additionalProperties: false + deposit_params: + description: |- + Deprecated: Prefer to use `params` instead. + deposit_params defines the parameters related to deposit. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: Minimum deposit for a proposal to enter voting period. + nullable: true + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + nullable: true + additionalProperties: false + tally_params: + description: |- + Deprecated: Prefer to use `params` instead. + tally_params defines the parameters related to tally. + type: object + properties: + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + veto_threshold: + type: string + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + nullable: true + additionalProperties: false + params: + description: params defines all the parameters of x/gov module. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: Minimum deposit for a proposal to enter voting period. + nullable: true + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + voting_period: + type: string + description: Duration of the voting period. + nullable: true + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + veto_threshold: + type: string + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + min_initial_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value that must be + paid at proposal submission. + proposal_cancel_ratio: + type: string + description: >- + The cancel ratio which will not be returned back to the depositors when a + proposal is cancelled. + proposal_cancel_dest: + type: string + description: >- + The address which will receive (proposal_cancel_ratio * deposit) proposal + deposits. + + If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be + burned. + expedited_voting_period: + type: string + description: Duration of the voting period of an expedited proposal. + nullable: true + expedited_threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.67.' + expedited_min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: Minimum expedited deposit for a proposal to enter voting period. + nullable: true + burn_vote_quorum: + type: boolean + title: burn deposits if a proposal does not meet quorum + burn_proposal_deposit_prevote: + type: boolean + title: burn deposits if the proposal does not enter voting period + burn_vote_veto: + type: boolean + title: burn deposits if quorum with vote type no_veto is met + min_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value minimum that + must be met when making a deposit. + + Default value: 0.01. Meaning that for a chain with a min_deposit of + 100stake, a deposit of 1stake would be + + required. + nullable: true + additionalProperties: false + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: paramsType + description: |- + params_type defines which parameters to query for, can be one of "voting", + "tallying" or "deposit". + in: path + required: true + schema: + type: string + tags: + - gov + description: |- + gRPC: `cosmos.gov.v1.Query/Params` ([reference](/sdk/next/api-reference/grpc/gov#params-v1)) + + Params queries all parameters of the gov module. + x-grpc-method: cosmos.gov.v1.Query/Params + /cosmos/gov/v1/proposals: + get: + summary: Proposals (v1) + operationId: gov_v1_Proposals + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id defines the unique id of the proposal. + messages: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + messages are the arbitrary messages to be executed if the proposal + passes. + nullable: true + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + nullable: true + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: >- + no_with_veto_count is the number of no with veto votes on a + proposal. + nullable: true + additionalProperties: false + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + nullable: true + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + nullable: true + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: total_deposit is the total deposit on the proposal. + nullable: true + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + nullable: true + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + nullable: true + metadata: + type: string + title: |- + metadata is any arbitrary metadata attached to the proposal. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#proposal-3 + title: + type: string + title: title is the title of the proposal + summary: + type: string + title: summary is a short summary of the proposal + proposer: + type: string + title: proposer is the address of the proposal submitter + expedited: + type: boolean + title: expedited defines if the proposal is expedited + failed_reason: + type: string + title: failed_reason defines the reason why the proposal failed + description: Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryProposalsResponse is the response type for the Query/Proposals RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalStatus + description: |- + proposal_status defines the status of the proposals. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + in: query + required: false + schema: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + - name: voter + description: voter defines the voter address for the proposals. + in: query + required: false + schema: + type: string + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: query + required: false + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1.Query/Proposals` + ([reference](/sdk/next/api-reference/grpc/gov#proposals-v1)) + + + Proposals queries all proposals based on given status. + x-grpc-method: cosmos.gov.v1.Query/Proposals + /cosmos/gov/v1/proposals/{proposalId}: + get: + summary: Proposal (v1) + operationId: gov_v1_Proposal + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + proposal: + description: proposal is the requested governance proposal. + type: object + properties: + id: + type: string + format: uint64 + description: id defines the unique id of the proposal. + messages: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: messages are the arbitrary messages to be executed if the proposal passes. + nullable: true + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + nullable: true + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. + nullable: true + additionalProperties: false + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + nullable: true + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + nullable: true + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: total_deposit is the total deposit on the proposal. + nullable: true + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + nullable: true + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + nullable: true + metadata: + type: string + title: |- + metadata is any arbitrary metadata attached to the proposal. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#proposal-3 + title: + type: string + title: title is the title of the proposal + summary: + type: string + title: summary is a short summary of the proposal + proposer: + type: string + title: proposer is the address of the proposal submitter + expedited: + type: boolean + title: expedited defines if the proposal is expedited + failed_reason: + type: string + title: failed_reason defines the reason why the proposal failed + nullable: true + description: QueryProposalResponse is the response type for the Query/Proposal RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1.Query/Proposal` + ([reference](/sdk/next/api-reference/grpc/gov#proposal-v1)) + + + Proposal queries proposal details based on ProposalID. + x-grpc-method: cosmos.gov.v1.Query/Proposal + /cosmos/gov/v1/proposals/{proposalId}/deposits: + get: + summary: Deposits (v1) + operationId: gov_v1_Deposits + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + deposits: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: amount to be deposited by depositor. + nullable: true + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + additionalProperties: false + description: deposits defines the requested deposits. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryDepositsResponse is the response type for the Query/Deposits RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1.Query/Deposits` + ([reference](/sdk/next/api-reference/grpc/gov#deposits-v1)) + + + Deposits queries all deposits of a single proposal. + x-grpc-method: cosmos.gov.v1.Query/Deposits + /cosmos/gov/v1/proposals/{proposalId}/deposits/{depositor}: + get: + summary: Deposit (Query, v1) + operationId: gov_v1_Deposit + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + deposit: + description: deposit defines the requested deposit. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: amount to be deposited by depositor. + nullable: true + nullable: true + additionalProperties: false + description: QueryDepositResponse is the response type for the Query/Deposit RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: path + required: true + schema: + type: string + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1.Query/Deposit` + ([reference](/sdk/next/api-reference/grpc/gov#deposit-query-v1)) + + + Deposit queries single deposit information based on proposalID, depositAddr. + x-grpc-method: cosmos.gov.v1.Query/Deposit + /cosmos/gov/v1/proposals/{proposalId}/tally: + get: + summary: TallyResult (v1) + operationId: gov_v1_TallyResult + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. + nullable: true + additionalProperties: false + description: QueryTallyResultResponse is the response type for the Query/Tally RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1.Query/TallyResult` + ([reference](/sdk/next/api-reference/grpc/gov#tallyresult-v1)) + + + TallyResult queries the tally of a proposal vote. + x-grpc-method: cosmos.gov.v1.Query/TallyResult + /cosmos/gov/v1/proposals/{proposalId}/votes: + get: + summary: Votes (v1) + operationId: gov_v1_Votes + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain + duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + additionalProperties: false + description: options is the weighted vote options. + nullable: true + metadata: + type: string + title: >- + metadata is any arbitrary metadata attached to the vote. + + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#vote-5 + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + additionalProperties: false + description: votes defines the queried votes. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryVotesResponse is the response type for the Query/Votes RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - gov + description: |- + gRPC: `cosmos.gov.v1.Query/Votes` ([reference](/sdk/next/api-reference/grpc/gov#votes-v1)) + + Votes queries votes of a given proposal. + x-grpc-method: cosmos.gov.v1.Query/Votes + /cosmos/gov/v1/proposals/{proposalId}/votes/{voter}: + get: + summary: Vote (Query, v1) + operationId: gov_v1_Vote + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + vote: + description: vote defines the queried vote. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain duplicate + vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + additionalProperties: false + description: options is the weighted vote options. + nullable: true + metadata: + type: string + title: >- + metadata is any arbitrary metadata attached to the vote. + + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#vote-5 + nullable: true + additionalProperties: false + description: QueryVoteResponse is the response type for the Query/Vote RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: voter + description: voter defines the voter address for the proposals. + in: path + required: true + schema: + type: string + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1.Query/Vote` + ([reference](/sdk/next/api-reference/grpc/gov#vote-query-v1)) + + + Vote queries voted information based on proposalID, voterAddr. + x-grpc-method: cosmos.gov.v1.Query/Vote + /cosmos/gov/v1beta1/params/{paramsType}: + get: + summary: Params (v1beta1) + operationId: gov_v1beta1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + voting_params: + description: voting_params defines the parameters related to voting. + type: object + properties: + voting_period: + type: string + description: Duration of the voting period. + nullable: true + nullable: true + additionalProperties: false + deposit_params: + description: deposit_params defines the parameters related to deposit. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: Minimum deposit for a proposal to enter voting period. + nullable: true + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + nullable: true + additionalProperties: false + tally_params: + description: tally_params defines the parameters related to tally. + type: object + properties: + quorum: + type: string + format: byte + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + nullable: true + threshold: + type: string + format: byte + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + nullable: true + veto_threshold: + type: string + format: byte + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + nullable: true + nullable: true + additionalProperties: false + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: paramsType + description: |- + params_type defines which parameters to query for, can be one of "voting", + "tallying" or "deposit". + in: path + required: true + schema: + type: string + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/Params` + ([reference](/sdk/next/api-reference/grpc/gov#params-v1beta1)) + + + Params queries all parameters of the gov module. + x-grpc-method: cosmos.gov.v1beta1.Query/Params + /cosmos/gov/v1beta1/proposals: + get: + summary: Proposals (v1beta1) + operationId: gov_v1beta1_Proposals + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + content: + description: content is the proposal's content. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + nullable: true + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + nullable: true + additionalProperties: false + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + nullable: true + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + nullable: true + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: total_deposit is the total deposit on the proposal. + nullable: true + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + nullable: true + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + nullable: true + description: Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryProposalsResponse is the response type for the Query/Proposals RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalStatus + description: |- + proposal_status defines the status of the proposals. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + in: query + required: false + schema: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + - name: voter + description: voter defines the voter address for the proposals. + in: query + required: false + schema: + type: string + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: query + required: false + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/Proposals` + ([reference](/sdk/next/api-reference/grpc/gov#proposals-v1beta1)) + + + Proposals queries all proposals based on given status. + x-grpc-method: cosmos.gov.v1beta1.Query/Proposals + /cosmos/gov/v1beta1/proposals/{proposalId}: + get: + summary: Proposal (v1beta1) + operationId: gov_v1beta1_Proposal + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + proposal: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + content: + description: content is the proposal's content. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + nullable: true + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + nullable: true + additionalProperties: false + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + nullable: true + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + nullable: true + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: total_deposit is the total deposit on the proposal. + nullable: true + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + nullable: true + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + nullable: true + description: Proposal defines the core field members of a governance proposal. + nullable: true + description: QueryProposalResponse is the response type for the Query/Proposal RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/Proposal` + ([reference](/sdk/next/api-reference/grpc/gov#proposal-v1beta1)) + + + Proposal queries proposal details based on ProposalID. + x-grpc-method: cosmos.gov.v1beta1.Query/Proposal + /cosmos/gov/v1beta1/proposals/{proposalId}/deposits: + get: + summary: Deposits (v1beta1) + operationId: gov_v1beta1_Deposits + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + deposits: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: amount to be deposited by depositor. + nullable: true + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + additionalProperties: false + description: deposits defines the requested deposits. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryDepositsResponse is the response type for the Query/Deposits RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/Deposits` + ([reference](/sdk/next/api-reference/grpc/gov#deposits-v1beta1)) + + + Deposits queries all deposits of a single proposal. + x-grpc-method: cosmos.gov.v1beta1.Query/Deposits + /cosmos/gov/v1beta1/proposals/{proposalId}/deposits/{depositor}: + get: + summary: Deposit (Query, v1beta1) + operationId: gov_v1beta1_Deposit + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + deposit: + description: deposit defines the requested deposit. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + description: amount to be deposited by depositor. + nullable: true + nullable: true + additionalProperties: false + description: QueryDepositResponse is the response type for the Query/Deposit RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: path + required: true + schema: + type: string + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/Deposit` + ([reference](/sdk/next/api-reference/grpc/gov#deposit-query-v1beta1)) + + + Deposit queries single deposit information based on proposalID, depositor address. + x-grpc-method: cosmos.gov.v1beta1.Query/Deposit + /cosmos/gov/v1beta1/proposals/{proposalId}/tally: + get: + summary: TallyResult (v1beta1) + operationId: gov_v1beta1_TallyResult + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + nullable: true + additionalProperties: false + description: QueryTallyResultResponse is the response type for the Query/Tally RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/TallyResult` + ([reference](/sdk/next/api-reference/grpc/gov#tallyresult-v1beta1)) + + + TallyResult queries the tally of a proposal vote. + x-grpc-method: cosmos.gov.v1beta1.Query/TallyResult + /cosmos/gov/v1beta1/proposals/{proposalId}/votes: + get: + summary: Votes (v1beta1) + operationId: gov_v1beta1_Votes + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + option: + description: >- + Deprecated: Prefer to use `options` instead. This field is set in + queries + + if and only if `len(options) == 1` and that option has weight 1. In all + + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain + duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + additionalProperties: false + description: options is the weighted vote options. + nullable: true + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + additionalProperties: false + description: votes defines the queried votes. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: QueryVotesResponse is the response type for the Query/Votes RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/Votes` + ([reference](/sdk/next/api-reference/grpc/gov#votes-v1beta1)) + + + Votes queries votes of a given proposal. + x-grpc-method: cosmos.gov.v1beta1.Query/Votes + /cosmos/gov/v1beta1/proposals/{proposalId}/votes/{voter}: + get: + summary: Vote (Query, v1beta1) + operationId: gov_v1beta1_Vote + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + vote: + description: vote defines the queried vote. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + option: + description: |- + Deprecated: Prefer to use `options` instead. This field is set in queries + if and only if `len(options) == 1` and that option has weight 1. In all + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain duplicate + vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + additionalProperties: false + description: options is the weighted vote options. + nullable: true + nullable: true + additionalProperties: false + description: QueryVoteResponse is the response type for the Query/Vote RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: proposalId + description: proposal_id defines the unique id of the proposal. + in: path + required: true + schema: + type: string + format: uint64 + - name: voter + description: voter defines the voter address for the proposals. + in: path + required: true + schema: + type: string + tags: + - gov + description: >- + gRPC: `cosmos.gov.v1beta1.Query/Vote` + ([reference](/sdk/next/api-reference/grpc/gov#vote-query-v1beta1)) + + + Vote queries voted information based on proposalID, voterAddr. + x-grpc-method: cosmos.gov.v1beta1.Query/Vote + /cosmos/mint/v1beta1/annual_provisions: + get: + summary: AnnualProvisions + operationId: mint_v1beta1_AnnualProvisions + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + annual_provisions: + type: string + format: byte + description: annual_provisions is the current minting annual provisions value. + nullable: true + description: |- + QueryAnnualProvisionsResponse is the response type for the + Query/AnnualProvisions RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - mint + description: >- + gRPC: `cosmos.mint.v1beta1.Query/AnnualProvisions` + ([reference](/sdk/next/api-reference/grpc/mint#annualprovisions)) + + + AnnualProvisions current minting annual provisions value. + x-grpc-method: cosmos.mint.v1beta1.Query/AnnualProvisions + /cosmos/mint/v1beta1/inflation: + get: + summary: Inflation + operationId: mint_v1beta1_Inflation + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + inflation: + type: string + format: byte + description: inflation is the current minting inflation value. + nullable: true + description: |- + QueryInflationResponse is the response type for the Query/Inflation RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - mint + description: >- + gRPC: `cosmos.mint.v1beta1.Query/Inflation` + ([reference](/sdk/next/api-reference/grpc/mint#inflation)) + + + Inflation returns the current minting inflation value. + x-grpc-method: cosmos.mint.v1beta1.Query/Inflation + /cosmos/mint/v1beta1/params: + get: + summary: Params + operationId: mint_v1beta1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + mint_denom: + type: string + title: type of coin to mint + inflation_rate_change: + type: string + title: maximum annual change in inflation rate + inflation_max: + type: string + title: maximum inflation rate + inflation_min: + type: string + title: minimum inflation rate + goal_bonded: + type: string + title: goal of percent bonded atoms + blocks_per_year: + type: string + format: uint64 + title: expected blocks per year + max_supply: + type: string + description: |- + maximum supply for the token. + + A value of "0" indicates an unlimited (infinite) maximum supply. + nullable: true + additionalProperties: false + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - mint + description: >- + gRPC: `cosmos.mint.v1beta1.Query/Params` + ([reference](/sdk/next/api-reference/grpc/mint#params)) + + + Params returns the total set of minting parameters. + x-grpc-method: cosmos.mint.v1beta1.Query/Params + /cosmos/slashing/v1beta1/params: + get: + summary: Params + operationId: slashing_v1beta1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + params: + type: object + properties: + signed_blocks_window: + type: string + format: int64 + min_signed_per_window: + type: string + format: byte + nullable: true + downtime_jail_duration: + type: string + nullable: true + slash_fraction_double_sign: + type: string + format: byte + nullable: true + slash_fraction_downtime: + type: string + format: byte + nullable: true + description: Params represents the parameters used for by the slashing module. + nullable: true + additionalProperties: false + title: QueryParamsResponse is the response type for the Query/Params RPC method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - slashing + description: >- + gRPC: `cosmos.slashing.v1beta1.Query/Params` + ([reference](/sdk/next/api-reference/grpc/slashing#params)) + + + Params queries the parameters of slashing module + x-grpc-method: cosmos.slashing.v1beta1.Query/Params + /cosmos/slashing/v1beta1/signing_infos: + get: + summary: SigningInfos + operationId: slashing_v1beta1_SigningInfos + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + info: + type: array + items: + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: Height at which validator was first a candidate OR was un-jailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented every time a validator is bonded in a block + and + + _may_ have signed a pre-commit or not. This in conjunction with the + + signed_blocks_window param determines the index in the missed block + bitmap. + jailed_until: + type: string + format: date-time + description: Timestamp until which the validator is jailed due to liveness downtime. + nullable: true + tombstoned: + type: boolean + description: >- + Whether or not a validator has been tombstoned (killed out of validator + + set). It is set once the validator commits an equivocation or for any + other + + configured misbehavior. + missed_blocks_counter: + type: string + format: int64 + description: |- + A counter of missed (unsigned) blocks. It is used to avoid unnecessary + reads in the missed block bitmap. + description: |- + ValidatorSigningInfo defines a validator's signing info for monitoring their + liveness activity. + additionalProperties: false + title: info is the signing info of all validators + nullable: true + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + nullable: true + additionalProperties: false + title: |- + QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC + method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - slashing + description: >- + gRPC: `cosmos.slashing.v1beta1.Query/SigningInfos` + ([reference](/sdk/next/api-reference/grpc/slashing#signinginfos)) + + + SigningInfos queries signing info of all validators + x-grpc-method: cosmos.slashing.v1beta1.Query/SigningInfos + /cosmos/slashing/v1beta1/signing_infos/{consAddress}: + get: + summary: SigningInfo + operationId: slashing_v1beta1_SigningInfo + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + val_signing_info: + title: val_signing_info is the signing info of requested val cons address + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: Height at which validator was first a candidate OR was un-jailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented every time a validator is bonded in a block and + + _may_ have signed a pre-commit or not. This in conjunction with the + + signed_blocks_window param determines the index in the missed block + bitmap. + jailed_until: + type: string + format: date-time + description: Timestamp until which the validator is jailed due to liveness downtime. + nullable: true + tombstoned: + type: boolean + description: >- + Whether or not a validator has been tombstoned (killed out of validator + + set). It is set once the validator commits an equivocation or for any + other + + configured misbehavior. + missed_blocks_counter: + type: string + format: int64 + description: |- + A counter of missed (unsigned) blocks. It is used to avoid unnecessary + reads in the missed block bitmap. + description: |- + ValidatorSigningInfo defines a validator's signing info for monitoring their + liveness activity. + nullable: true + additionalProperties: false + title: |- + QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC + method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + parameters: + - name: consAddress + description: cons_address is the address to query signing info of + in: path + required: true + schema: + type: string + tags: + - slashing + description: >- + gRPC: `cosmos.slashing.v1beta1.Query/SigningInfo` + ([reference](/sdk/next/api-reference/grpc/slashing#signinginfo)) + + + SigningInfo queries the signing info of given cons address + x-grpc-method: cosmos.slashing.v1beta1.Query/SigningInfo + /cosmos/staking/v1beta1/delegations/{delegatorAddr}: + get: + summary: DelegatorDelegations + description: >- + gRPC: `cosmos.staking.v1beta1.Query/DelegatorDelegations` + ([reference](/sdk/next/api-reference/grpc/staking#delegatordelegations)) + + + DelegatorDelegations queries all delegations of a given delegator address. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: staking_v1beta1_DelegatorDelegations + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + delegation_responses: + type: array + items: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + nullable: true + additionalProperties: false + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + nullable: true + additionalProperties: false + description: |- + DelegationResponse is equivalent to Delegation except that it contains a + balance in addition to shares which is more suitable for client responses. + additionalProperties: false + description: delegation_responses defines all the delegations' info of a delegator. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryDelegatorDelegationsResponse is response type for the + Query/DelegatorDelegations RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: delegatorAddr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - staking + x-grpc-method: cosmos.staking.v1beta1.Query/DelegatorDelegations + /cosmos/staking/v1beta1/delegators/{delegatorAddr}/redelegations: + get: + summary: Redelegations + description: >- + gRPC: `cosmos.staking.v1beta1.Query/Redelegations` + ([reference](/sdk/next/api-reference/grpc/staking#redelegations)) + + + Redelegations queries redelegations of given address. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: staking_v1beta1_Redelegations + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + redelegation_responses: + type: array + items: + type: object + properties: + redelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_src_address: + type: string + description: >- + validator_src_address is the validator redelegation source operator + address. + validator_dst_address: + type: string + description: >- + validator_dst_address is the validator redelegation destination + operator address. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the redelegation + took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + nullable: true + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when redelegation + started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares + created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped + by external modules + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + additionalProperties: false + description: |- + entries are the redelegation entries. + + redelegation entries + nullable: true + description: >- + Redelegation contains the list of a particular delegator's redelegating + bonds + + from a particular source validator to a particular destination + validator. + nullable: true + additionalProperties: false + entries: + type: array + items: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the redelegation + took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for redelegation + completion. + nullable: true + initial_balance: + type: string + description: >- + initial_balance defines the initial balance when redelegation + started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares + created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped + by external modules + description: >- + RedelegationEntry defines a redelegation object with relevant + metadata. + nullable: true + additionalProperties: false + balance: + type: string + description: >- + RedelegationEntryResponse is equivalent to a RedelegationEntry except + that it + + contains a balance in addition to shares which is more suitable for + client + + responses. + additionalProperties: false + nullable: true + description: |- + RedelegationResponse is equivalent to a Redelegation except that its entries + contain a balance in addition to shares which is more suitable for client + responses. + additionalProperties: false + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryRedelegationsResponse is response type for the Query/Redelegations RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: delegatorAddr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + schema: + type: string + - name: srcValidatorAddr + description: src_validator_addr defines the validator address to redelegate from. + in: query + required: false + schema: + type: string + - name: dstValidatorAddr + description: dst_validator_addr defines the validator address to redelegate to. + in: query + required: false + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - staking + x-grpc-method: cosmos.staking.v1beta1.Query/Redelegations + /cosmos/staking/v1beta1/delegators/{delegatorAddr}/unbonding_delegations: + get: + summary: DelegatorUnbondingDelegations + description: >- + gRPC: `cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations` + ([reference](/sdk/next/api-reference/grpc/staking#delegatorunbondingdelegations)) + + + DelegatorUnbondingDelegations queries all unbonding delegations of a given + + delegator address. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: staking_v1beta1_DelegatorUnbondingDelegations + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + nullable: true + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to receive + at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: >- + UnbondingDelegationEntry defines an unbonding object with relevant + metadata. + additionalProperties: false + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + nullable: true + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. + additionalProperties: false + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryUnbondingDelegatorDelegationsResponse is response type for the + Query/UnbondingDelegatorDelegations RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: delegatorAddr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - staking + x-grpc-method: cosmos.staking.v1beta1.Query/DelegatorUnbondingDelegations + /cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators: + get: + summary: DelegatorValidators + description: >- + gRPC: `cosmos.staking.v1beta1.Query/DelegatorValidators` + ([reference](/sdk/next/api-reference/grpc/staking#delegatorvalidators)) + + + DelegatorValidators queries all validators info for given delegator + + address. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: staking_v1beta1_DelegatorValidators + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + validators: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech + encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, as a + Protobuf Any. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded status + or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + nullable: true + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + nullable: true + additionalProperties: false + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to + complete unbonding. + nullable: true + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for + creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can + ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + nullable: true + additionalProperties: false + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + nullable: true + nullable: true + additionalProperties: false + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by + external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifying an unbonding of this + validator + description: >- + Validator defines a validator, together with the total amount of the + + Validator's bond shares and their exchange rate to coins. Slashing results + in + + a decrease in the exchange rate, allowing correct calculation of future + + undelegations without iterating over delegators. When coins are delegated to + + this validator, the validator is credited with a delegation whose number of + + bond shares is based on the amount of coins delegated divided by the current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. + description: validators defines the validators' info of a delegator. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryDelegatorValidatorsResponse is response type for the + Query/DelegatorValidators RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: delegatorAddr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - staking + x-grpc-method: cosmos.staking.v1beta1.Query/DelegatorValidators + /cosmos/staking/v1beta1/delegators/{delegatorAddr}/validators/{validatorAddr}: + get: + summary: DelegatorValidator + operationId: staking_v1beta1_DelegatorValidator + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + validator: + description: validator defines the validator info. + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech + encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, as a + Protobuf Any. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded status or + not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + nullable: true + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + nullable: true + additionalProperties: false + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator + has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to + complete unbonding. + nullable: true + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for + creating a validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can + ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + nullable: true + additionalProperties: false + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + nullable: true + nullable: true + additionalProperties: false + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by + external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifying an unbonding of this + validator + nullable: true + description: |- + QueryDelegatorValidatorResponse response type for the + Query/DelegatorValidator RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: delegatorAddr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + schema: + type: string + - name: validatorAddr + description: validator_addr defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - staking + description: >- + gRPC: `cosmos.staking.v1beta1.Query/DelegatorValidator` + ([reference](/sdk/next/api-reference/grpc/staking#delegatorvalidator)) + + + DelegatorValidator queries validator info for given delegator validator + + pair. + x-grpc-method: cosmos.staking.v1beta1.Query/DelegatorValidator + /cosmos/staking/v1beta1/historical_info/{height}: + get: + summary: HistoricalInfo + operationId: staking_v1beta1_HistoricalInfo + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + hist: + description: hist defines the historical info at the given height. + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + title: prev block info + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + valset: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; + bech encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, as a + Protobuf Any. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. As of May 2023, there are no widely used + type server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded + status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + nullable: true + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + nullable: true + additionalProperties: false + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator + to complete unbonding. + nullable: true + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used + for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator + can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + nullable: true + additionalProperties: false + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + nullable: true + nullable: true + additionalProperties: false + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by + external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifying an unbonding of + this validator + description: >- + Validator defines a validator, together with the total amount of the + + Validator's bond shares and their exchange rate to coins. Slashing + results in + + a decrease in the exchange rate, allowing correct calculation of future + + undelegations without iterating over delegators. When coins are + delegated to + + this validator, the validator is credited with a delegation whose number + of + + bond shares is based on the amount of coins delegated divided by the + current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. + nullable: true + nullable: true + additionalProperties: false + description: |- + QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: height + description: height defines at which height to query the historical info. + in: path + required: true + schema: + type: string + format: int64 + tags: + - staking + description: >- + gRPC: `cosmos.staking.v1beta1.Query/HistoricalInfo` + ([reference](/sdk/next/api-reference/grpc/staking#historicalinfo)) + + + HistoricalInfo queries the historical info for given height. + x-grpc-method: cosmos.staking.v1beta1.Query/HistoricalInfo + /cosmos/staking/v1beta1/params: + get: + summary: Params + operationId: staking_v1beta1_Params + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + unbonding_time: + type: string + description: unbonding_time is the time duration of unbonding. + nullable: true + max_validators: + type: integer + format: int64 + description: max_validators is the maximum number of validators. + max_entries: + type: integer + format: int64 + description: >- + max_entries is the max entries for either unbonding delegation or + redelegation (per pair/trio). + historical_entries: + type: integer + format: int64 + description: historical_entries is the number of historical entries to persist. + bond_denom: + type: string + description: bond_denom defines the bondable coin denomination. + min_commission_rate: + type: string + title: >- + min_commission_rate is the chain-wide minimum commission rate that a + validator can charge their delegators + key_rotation_fee: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + key_rotation_fee is the fee charged when rotating a validator's consensus + key. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + description: QueryParamsResponse is response type for the Query/Params RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - staking + description: >- + gRPC: `cosmos.staking.v1beta1.Query/Params` + ([reference](/sdk/next/api-reference/grpc/staking#params)) + + + Parameters queries the staking parameters. + x-grpc-method: cosmos.staking.v1beta1.Query/Params + /cosmos/staking/v1beta1/pool: + get: + summary: Pool + operationId: staking_v1beta1_Pool + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + pool: + description: pool defines the pool info. + type: object + properties: + not_bonded_tokens: + type: string + bonded_tokens: + type: string + nullable: true + additionalProperties: false + description: QueryPoolResponse is response type for the Query/Pool RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - staking + description: >- + gRPC: `cosmos.staking.v1beta1.Query/Pool` + ([reference](/sdk/next/api-reference/grpc/staking#pool)) + + + Pool queries the pool info. + x-grpc-method: cosmos.staking.v1beta1.Query/Pool + /cosmos/staking/v1beta1/validators: + get: + summary: Validators + description: >- + gRPC: `cosmos.staking.v1beta1.Query/Validators` + ([reference](/sdk/next/api-reference/grpc/staking#validators)) + + + Validators queries all validators that match the given status. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: staking_v1beta1_Validators + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + validators: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech + encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, as a + Protobuf Any. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded status + or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + nullable: true + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a validator's + delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + nullable: true + additionalProperties: false + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this + validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to + complete unbonding. + nullable: true + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for + creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, as a + fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can + ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + nullable: true + additionalProperties: false + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + nullable: true + nullable: true + additionalProperties: false + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by + external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifying an unbonding of this + validator + description: >- + Validator defines a validator, together with the total amount of the + + Validator's bond shares and their exchange rate to coins. Slashing results + in + + a decrease in the exchange rate, allowing correct calculation of future + + undelegations without iterating over delegators. When coins are delegated to + + this validator, the validator is credited with a delegation whose number of + + bond shares is based on the amount of coins delegated divided by the current + + exchange rate. Voting power can be calculated as total bonded shares + + multiplied by exchange rate. + description: validators contains all the queried validators. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + title: QueryValidatorsResponse is response type for the Query/Validators RPC method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: status + description: status enables to query for validators matching a given status. + in: query + required: false + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - staking + x-grpc-method: cosmos.staking.v1beta1.Query/Validators + /cosmos/staking/v1beta1/validators/{validatorAddr}: + get: + summary: Validator + operationId: staking_v1beta1_Validator + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + validator: + description: validator defines the validator info. + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech + encoded in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, as a + Protobuf Any. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded status or + not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + nullable: true + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. UPort or + Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + nullable: true + additionalProperties: false + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator + has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to + complete unbonding. + nullable: true + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for + creating a validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can + ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. + nullable: true + additionalProperties: false + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + nullable: true + nullable: true + additionalProperties: false + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared minimum self + delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by + external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifying an unbonding of this + validator + nullable: true + title: QueryValidatorResponse is response type for the Query/Validator RPC method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: validatorAddr + description: validator_addr defines the validator address to query for. + in: path + required: true + schema: + type: string + tags: + - staking + description: >- + gRPC: `cosmos.staking.v1beta1.Query/Validator` + ([reference](/sdk/next/api-reference/grpc/staking#validator)) + + + Validator queries validator info for given validator address. + x-grpc-method: cosmos.staking.v1beta1.Query/Validator + /cosmos/staking/v1beta1/validators/{validatorAddr}/delegations: + get: + summary: ValidatorDelegations + description: >- + gRPC: `cosmos.staking.v1beta1.Query/ValidatorDelegations` + ([reference](/sdk/next/api-reference/grpc/staking#validatordelegations)) + + + ValidatorDelegations queries delegate info for given validator. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: staking_v1beta1_ValidatorDelegations + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + delegation_responses: + type: array + items: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + nullable: true + additionalProperties: false + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + nullable: true + additionalProperties: false + description: |- + DelegationResponse is equivalent to Delegation except that it contains a + balance in addition to shares which is more suitable for client responses. + additionalProperties: false + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + title: |- + QueryValidatorDelegationsResponse is response type for the + Query/ValidatorDelegations RPC method + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: validatorAddr + description: validator_addr defines the validator address to query for. + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - staking + x-grpc-method: cosmos.staking.v1beta1.Query/ValidatorDelegations + /cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr}: + get: + summary: Delegation + operationId: staking_v1beta1_Delegation + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + delegation_response: + description: delegation_responses defines the delegation info of a delegation. + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + nullable: true + additionalProperties: false + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + description: QueryDelegationResponse is response type for the Query/Delegation RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: validatorAddr + description: validator_addr defines the validator address to query for. + in: path + required: true + schema: + type: string + - name: delegatorAddr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + schema: + type: string + tags: + - staking + description: >- + gRPC: `cosmos.staking.v1beta1.Query/Delegation` + ([reference](/sdk/next/api-reference/grpc/staking#delegation)) + + + Delegation queries delegate info for given validator delegator pair. + x-grpc-method: cosmos.staking.v1beta1.Query/Delegation + /cosmos/staking/v1beta1/validators/{validatorAddr}/delegations/{delegatorAddr}/unbonding_delegation: + get: + summary: UnbondingDelegation + operationId: staking_v1beta1_UnbondingDelegation + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + unbond: + description: unbond defines the unbonding information of a delegation. + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + nullable: true + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to receive at + completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: >- + UnbondingDelegationEntry defines an unbonding object with relevant + metadata. + additionalProperties: false + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + nullable: true + nullable: true + additionalProperties: false + description: |- + QueryDelegationResponse is response type for the Query/UnbondingDelegation + RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: validatorAddr + description: validator_addr defines the validator address to query for. + in: path + required: true + schema: + type: string + - name: delegatorAddr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + schema: + type: string + tags: + - staking + description: >- + gRPC: `cosmos.staking.v1beta1.Query/UnbondingDelegation` + ([reference](/sdk/next/api-reference/grpc/staking#unbondingdelegation)) + + + UnbondingDelegation queries unbonding info for given validator delegator + + pair. + x-grpc-method: cosmos.staking.v1beta1.Query/UnbondingDelegation + /cosmos/staking/v1beta1/validators/{validatorAddr}/unbonding_delegations: + get: + summary: ValidatorUnbondingDelegations + description: >- + gRPC: `cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations` + ([reference](/sdk/next/api-reference/grpc/staking#validatorunbondingdelegations)) + + + ValidatorUnbondingDelegations queries unbonding delegations of a validator. + + + When called from another module, this query might consume a high amount of + + gas if the pagination field is incorrectly set. + operationId: staking_v1beta1_ValidatorUnbondingDelegations + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + nullable: true + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to receive + at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by + external modules + description: >- + UnbondingDelegationEntry defines an unbonding object with relevant + metadata. + additionalProperties: false + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + nullable: true + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. + additionalProperties: false + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + QueryValidatorUnbondingDelegationsResponse is response type for the + Query/ValidatorUnbondingDelegations RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: validatorAddr + description: validator_addr defines the validator address to query for. + in: path + required: true + schema: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - staking + x-grpc-method: cosmos.staking.v1beta1.Query/ValidatorUnbondingDelegations + /cosmos/tx/v1beta1/decode: + post: + summary: TxDecode + operationId: tx_v1beta1_TxDecode + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + $ref: '#/components/schemas/cosmos.tx.v1beta1.TxDecodeResponse' + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + requestBody: + content: + application/json: + schema: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + description: |- + TxDecodeRequest is the request type for the Service.TxDecode + RPC method. + description: |- + TxDecodeRequest is the request type for the Service.TxDecode + RPC method. + required: true + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/TxDecode` + ([reference](/sdk/next/api-reference/grpc/tx#txdecode)) + + + TxDecode decodes the transaction. + x-grpc-method: cosmos.tx.v1beta1.Service/TxDecode + /cosmos/tx/v1beta1/decode/amino: + post: + summary: TxDecodeAmino + operationId: tx_v1beta1_TxDecodeAmino + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + amino_json: + type: string + description: |- + TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino + RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + requestBody: + content: + application/json: + schema: + type: object + properties: + amino_binary: + type: string + format: byte + description: |- + TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino + RPC method. + description: |- + TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino + RPC method. + required: true + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/TxDecodeAmino` + ([reference](/sdk/next/api-reference/grpc/tx#txdecodeamino)) + + + TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. + x-grpc-method: cosmos.tx.v1beta1.Service/TxDecodeAmino + /cosmos/tx/v1beta1/encode: + post: + summary: TxEncode + operationId: tx_v1beta1_TxEncode + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the encoded transaction bytes. + nullable: true + description: |- + TxEncodeResponse is the response type for the + Service.TxEncode method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cosmos.tx.v1beta1.TxEncodeRequest' + description: |- + TxEncodeRequest is the request type for the Service.TxEncode + RPC method. + required: true + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/TxEncode` + ([reference](/sdk/next/api-reference/grpc/tx#txencode)) + + + TxEncode encodes the transaction. + x-grpc-method: cosmos.tx.v1beta1.Service/TxEncode + /cosmos/tx/v1beta1/encode/amino: + post: + summary: TxEncodeAmino + operationId: tx_v1beta1_TxEncodeAmino + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + amino_binary: + type: string + format: byte + nullable: true + description: |- + TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino + RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + requestBody: + content: + application/json: + schema: + type: object + properties: + amino_json: + type: string + description: |- + TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino + RPC method. + description: |- + TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino + RPC method. + required: true + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/TxEncodeAmino` + ([reference](/sdk/next/api-reference/grpc/tx#txencodeamino)) + + + TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. + x-grpc-method: cosmos.tx.v1beta1.Service/TxEncodeAmino + /cosmos/tx/v1beta1/simulate: + post: + summary: Simulate + operationId: tx_v1beta1_Simulate + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + gas_info: + description: gas_info is the information about gas used in the simulation. + type: object + properties: + gas_wanted: + type: string + format: uint64 + description: GasWanted is the maximum units of work we allow this tx to perform. + gas_used: + type: string + format: uint64 + description: GasUsed is the amount of gas actually consumed. + nullable: true + additionalProperties: false + result: + description: result is the result of the simulation. + type: object + properties: + data: + type: string + format: byte + description: >- + Data is any data returned from message or handler execution. It MUST be + + length prefixed in order to separate data from multiple message + executions. + + Deprecated. This field is still populated, but prefer msg_response instead + + because it also contains the Msg response typeURL. + nullable: true + log: + type: string + description: Log contains the log information from message or handler execution. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: >- + EventAttribute is a single key-value pair, associated with an + event. + additionalProperties: false + nullable: true + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + additionalProperties: false + description: |- + Events contains a slice of Event objects that were emitted during message + or handler execution. + nullable: true + msg_responses: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: msg_responses contains the Msg handler responses type packed in Anys. + nullable: true + nullable: true + description: |- + SimulateResponse is the response type for the + Service.SimulateRPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/cosmos.tx.v1beta1.SimulateRequest' + description: |- + SimulateRequest is the request type for the Service.Simulate + RPC method. + required: true + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/Simulate` + ([reference](/sdk/next/api-reference/grpc/tx#simulate)) + + + Simulate simulates executing a transaction for estimating gas usage. + x-grpc-method: cosmos.tx.v1beta1.Service/Simulate + /cosmos/tx/v1beta1/txs: + get: + summary: GetTxsEvent + operationId: tx_v1beta1_GetTxsEvent + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + $ref: '#/components/schemas/cosmos.tx.v1beta1.GetTxsEventResponse' + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: events + description: |- + events is the list of transaction event type. + Deprecated post v0.47.x: use query instead, which should contain a valid + events query. + in: query + required: false + explode: true + schema: + type: array + items: + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + - name: orderBy + description: |2- + - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults + to ASC in this case. + - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order + - ORDER_BY_DESC: ORDER_BY_DESC defines descending order + in: query + required: false + schema: + type: string + enum: + - ORDER_BY_UNSPECIFIED + - ORDER_BY_ASC + - ORDER_BY_DESC + default: ORDER_BY_UNSPECIFIED + - name: page + description: |- + page is the page number to query, starts at 1. If not provided, will + default to first page. + in: query + required: false + schema: + type: string + format: uint64 + - name: limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: query + description: |- + query defines the transaction event query that is proxied to Tendermint's + TxSearch RPC method. The query must be valid. + in: query + required: false + schema: + type: string + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/GetTxsEvent` + ([reference](/sdk/next/api-reference/grpc/tx#gettxsevent)) + + + GetTxsEvent fetches txs by event. + x-grpc-method: cosmos.tx.v1beta1.Service/GetTxsEvent + post: + summary: BroadcastTx + operationId: tx_v1beta1_BroadcastTx + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + tx_response: + description: tx_response is the queried TxResponses. + type: object + properties: + height: + type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: Result bytes, if any. + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: >- + Attribute defines an attribute wrapper where the key and + value are + + strings instead of raw bytes. + additionalProperties: false + nullable: true + description: >- + StringEvent defines en Event object wrapper where all the + attributes + + contain key/value pairs that are strings instead of raw bytes. + additionalProperties: false + description: >- + Events contains a slice of Event objects that were emitted during + some + + execution. + nullable: true + description: >- + ABCIMessageLog defines a structure containing an indexed tx ABCI message + log. + additionalProperties: false + description: The output of the application's logger (typed). May be non-deterministic. + nullable: true + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + description: The request transaction bytes. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + timestamp: + type: string + description: >- + Time of the previous block. For heights > 1, it's the weighted median of + + the timestamps of the valid votes in the block.LastCommit. For height == + 1, + + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: >- + EventAttribute is a single key-value pair, associated with an + event. + additionalProperties: false + nullable: true + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + additionalProperties: false + description: >- + Events defines all the events emitted by processing a transaction. Note, + + these events include those emitted by processing all the messages and + those + + emitted from the ante. Whereas Logs contains the events, with + + additional metadata, emitted only by processing the messages. + nullable: true + nullable: true + description: |- + BroadcastTxResponse is the response type for the + Service.BroadcastTx method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + requestBody: + content: + application/json: + schema: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + mode: + type: string + enum: + - BROADCAST_MODE_UNSPECIFIED + - BROADCAST_MODE_BLOCK + - BROADCAST_MODE_SYNC + - BROADCAST_MODE_ASYNC + default: BROADCAST_MODE_UNSPECIFIED + description: |- + BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC + method. + + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, + BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. + - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits + for a CheckTx execution response only. + - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client + returns immediately. + description: |- + BroadcastTxRequest is the request type for the Service.BroadcastTxRequest + RPC method. + description: |- + BroadcastTxRequest is the request type for the Service.BroadcastTxRequest + RPC method. + required: true + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/BroadcastTx` + ([reference](/sdk/next/api-reference/grpc/tx#broadcasttx)) + + + BroadcastTx broadcast transaction. + x-grpc-method: cosmos.tx.v1beta1.Service/BroadcastTx + /cosmos/tx/v1beta1/txs/block/{height}: + get: + summary: GetBlockWithTxs + operationId: tx_v1beta1_GetBlockWithTxs + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + $ref: '#/components/schemas/cosmos.tx.v1beta1.GetBlockWithTxsResponse' + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: height + description: height is the height of the block to query. + in: path + required: true + schema: + type: string + format: int64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + schema: + type: string + format: byte + - name: pagination.offset + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.limit + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + in: query + required: false + schema: + type: string + format: uint64 + - name: pagination.countTotal + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + in: query + required: false + schema: + type: boolean + - name: pagination.reverse + description: reverse is set to true if results are to be returned in the descending order. + in: query + required: false + schema: + type: boolean + tags: + - tx + description: >- + gRPC: `cosmos.tx.v1beta1.Service/GetBlockWithTxs` + ([reference](/sdk/next/api-reference/grpc/tx#getblockwithtxs)) + + + GetBlockWithTxs fetches a block with decoded txs. + x-grpc-method: cosmos.tx.v1beta1.Service/GetBlockWithTxs + /cosmos/tx/v1beta1/txs/{hash}: + get: + summary: GetTx + operationId: tx_v1beta1_GetTx + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + $ref: '#/components/schemas/cosmos.tx.v1beta1.GetTxResponse' + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: hash + description: hash is the tx hash to query, encoded as a hex string. + in: path + required: true + schema: + type: string + tags: + - tx + description: |- + gRPC: `cosmos.tx.v1beta1.Service/GetTx` ([reference](/sdk/next/api-reference/grpc/tx#gettx)) + + GetTx fetches a tx by hash. + x-grpc-method: cosmos.tx.v1beta1.Service/GetTx + /cosmos/upgrade/v1beta1/applied_plan/{name}: + get: + summary: AppliedPlan + operationId: upgrade_v1beta1_AppliedPlan + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + height: + type: string + format: int64 + description: height is the block height at which the plan was applied. + description: |- + QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: name + description: name is the name of the applied plan to query for. + in: path + required: true + schema: + type: string + tags: + - upgrade + description: >- + gRPC: `cosmos.upgrade.v1beta1.Query/AppliedPlan` + ([reference](/sdk/next/api-reference/grpc/upgrade#appliedplan)) + + + AppliedPlan queries a previously applied upgrade plan by its name. + x-grpc-method: cosmos.upgrade.v1beta1.Query/AppliedPlan + /cosmos/upgrade/v1beta1/authority: + get: + summary: Authority + operationId: upgrade_v1beta1_Authority + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + address: + type: string + title: QueryAuthorityResponse is the response type for Query/Authority + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - upgrade + description: >- + gRPC: `cosmos.upgrade.v1beta1.Query/Authority` + ([reference](/sdk/next/api-reference/grpc/upgrade#authority)) + + + Returns the account with authority to conduct upgrades + x-grpc-method: cosmos.upgrade.v1beta1.Query/Authority + /cosmos/upgrade/v1beta1/current_plan: + get: + summary: CurrentPlan + operationId: upgrade_v1beta1_CurrentPlan + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + plan: + description: plan is the current upgrade plan. + type: object + properties: + name: + type: string + description: >- + Sets the name for the upgrade. This name will be used by the upgraded + + version of the software to apply any special "on-upgrade" commands during + + the first BeginBlock method after the upgrade is applied. It is also used + + to detect whether a software version can handle a given upgrade. If no + + upgrade handler with this name has been set in the software, it will be + + assumed that the software is out-of-date when the upgrade Time or Height + is + + reached and the software will exit. + time: + type: string + format: date-time + description: >- + Deprecated: Time based upgrades have been deprecated. Time based upgrade + logic + + has been removed from the SDK. + + If this field is not empty, an error will be thrown. + nullable: true + height: + type: string + format: int64 + description: The height at which the upgrade must be performed. + info: + type: string + title: |- + Any application specific upgrade info to be included on-chain + such as a git commit that validators could automatically upgrade to + upgraded_client_state: + description: >- + Deprecated: UpgradedClientState field has been deprecated. IBC upgrade + logic has been + + moved to the IBC module in the sub module 02-client. + + If this field is not empty, an error will be thrown. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + nullable: true + nullable: true + description: |- + QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC + method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + tags: + - upgrade + description: >- + gRPC: `cosmos.upgrade.v1beta1.Query/CurrentPlan` + ([reference](/sdk/next/api-reference/grpc/upgrade#currentplan)) + + + CurrentPlan queries the current upgrade plan. + x-grpc-method: cosmos.upgrade.v1beta1.Query/CurrentPlan + /cosmos/upgrade/v1beta1/module_versions: + get: + summary: ModuleVersions + operationId: upgrade_v1beta1_ModuleVersions + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + module_versions: + type: array + items: + type: object + properties: + name: + type: string + title: name of the app module + version: + type: string + format: uint64 + title: consensus version of the app module + description: ModuleVersion specifies a module and its consensus version. + additionalProperties: false + description: module_versions is a list of module names with their consensus versions. + nullable: true + description: |- + QueryModuleVersionsResponse is the response type for the Query/ModuleVersions + RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: moduleName + description: |- + module_name is a field to query a specific module + consensus version from state. Leaving this empty will + fetch the full list of module versions from state + in: query + required: false + schema: + type: string + tags: + - upgrade + description: >- + gRPC: `cosmos.upgrade.v1beta1.Query/ModuleVersions` + ([reference](/sdk/next/api-reference/grpc/upgrade#moduleversions)) + + + ModuleVersions queries the list of module versions from state. + x-grpc-method: cosmos.upgrade.v1beta1.Query/ModuleVersions + /cosmos/upgrade/v1beta1/upgraded_consensus_state/{lastHeight}: + get: + summary: UpgradedConsensusState + operationId: upgrade_v1beta1_UpgradedConsensusState + responses: + '200': + description: A successful response. + content: + '*/*': + schema: + type: object + properties: + upgraded_consensus_state: + type: string + format: byte + nullable: true + description: >- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState + + RPC method. + additionalProperties: false + default: + description: An unexpected error response. + content: + '*/*': + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. As of May 2023, there are no widely used type + server + + implementations and no plans to implement one. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: lastHeight + description: |- + last height of the current chain must be sent in request + as this is the height under which next consensus state is stored + in: path + required: true + schema: + type: string + format: int64 + tags: + - upgrade + description: >- + gRPC: `cosmos.upgrade.v1beta1.Query/UpgradedConsensusState` + ([reference](/sdk/next/api-reference/grpc/upgrade#upgradedconsensusstate)) + + + UpgradedConsensusState queries the consensus state that will serve + + as a trusted kernel for the next version of this chain. It will only be + + stored at the last height of this chain. + + UpgradedConsensusState RPC not supported with legacy querier + + This rpc is deprecated now that IBC has its own replacement + + (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) + x-grpc-method: cosmos.upgrade.v1beta1.Query/UpgradedConsensusState +components: + schemas: + google.protobuf.Any: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + google.rpc.Status: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + additionalProperties: false + cosmos.auth.v1beta1.AddressBytesToStringResponse: + type: object + properties: + address_string: + type: string + description: AddressBytesToStringResponse is the response type for AddressString rpc method. + additionalProperties: false + cosmos.auth.v1beta1.AddressStringToBytesResponse: + type: object + properties: + address_bytes: + type: string + format: byte + nullable: true + description: AddressStringToBytesResponse is the response type for AddressBytes rpc method. + additionalProperties: false + cosmos.auth.v1beta1.BaseAccount: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + account_number: + type: string + format: uint64 + sequence: + type: string + format: uint64 + description: |- + BaseAccount defines a base account type. It contains all the necessary fields + for basic account functionality. Any custom account type should extend this + type for additional functionality (e.g. vesting). + cosmos.auth.v1beta1.Bech32PrefixResponse: + type: object + properties: + bech32_prefix: + type: string + description: Bech32PrefixResponse is the response type for Bech32Prefix rpc method. + additionalProperties: false + cosmos.auth.v1beta1.Params: + type: object + properties: + max_memo_characters: + type: string + format: uint64 + tx_sig_limit: + type: string + format: uint64 + tx_size_cost_per_byte: + type: string + format: uint64 + sig_verify_cost_ed25519: + type: string + format: uint64 + sig_verify_cost_secp256k1: + type: string + format: uint64 + description: Params defines the parameters for the auth module. + additionalProperties: false + cosmos.auth.v1beta1.QueryAccountAddressByIDResponse: + type: object + properties: + account_address: + type: string + title: QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method + additionalProperties: false + cosmos.auth.v1beta1.QueryAccountInfoResponse: + type: object + properties: + info: + description: info is the account info which is represented by BaseAccount. + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + account_number: + type: string + format: uint64 + sequence: + type: string + format: uint64 + nullable: true + description: QueryAccountInfoResponse is the Query/AccountInfo response type. + cosmos.auth.v1beta1.QueryAccountResponse: + type: object + properties: + account: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + description: QueryAccountResponse is the response type for the Query/Account RPC method. + cosmos.auth.v1beta1.QueryAccountsResponse: + type: object + properties: + accounts: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: accounts are the existing accounts + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryAccountsResponse is the response type for the Query/Accounts RPC method. + cosmos.auth.v1beta1.QueryModuleAccountByNameResponse: + type: object + properties: + account: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + description: >- + QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC + method. + cosmos.auth.v1beta1.QueryModuleAccountsResponse: + type: object + properties: + accounts: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + description: QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method. + cosmos.auth.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_memo_characters: + type: string + format: uint64 + tx_sig_limit: + type: string + format: uint64 + tx_size_cost_per_byte: + type: string + format: uint64 + sig_verify_cost_ed25519: + type: string + format: uint64 + sig_verify_cost_secp256k1: + type: string + format: uint64 + nullable: true + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + cosmos.base.query.v1beta1.PageRequest: + type: object + properties: + key: + type: string + format: byte + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + nullable: true + offset: + type: string + format: uint64 + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + limit: + type: string + format: uint64 + description: |- + limit is the total number of results to be returned in the result page. + If left empty it will default to a value to be set by each app. + count_total: + type: boolean + description: |- + count_total is set to true to indicate that the result set should include + a count of the total number of items available for pagination in UIs. + count_total is only respected when offset is used. It is ignored when key + is set. + reverse: + type: boolean + description: reverse is set to true if results are to be returned in the descending order. + description: |- + message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } + title: |- + PageRequest is to be embedded in gRPC request messages for efficient + pagination. Ex: + additionalProperties: false + cosmos.base.query.v1beta1.PageResponse: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + additionalProperties: false + cosmos.authz.v1beta1.Grant: + type: object + properties: + authorization: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + expiration: + type: string + format: date-time + title: |- + time when the grant will expire and will be pruned. If null, then the grant + doesn't have a time expiration (other conditions in `authorization` + may apply to invalidate the grant) + nullable: true + description: |- + Grant gives permissions to execute + the provide method with expiration time. + cosmos.authz.v1beta1.GrantAuthorization: + type: object + properties: + granter: + type: string + grantee: + type: string + authorization: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + expiration: + type: string + format: date-time + nullable: true + title: |- + GrantAuthorization extends a grant with both the addresses of the grantee and granter. + It is used in genesis.proto and query.proto + cosmos.authz.v1beta1.QueryGranteeGrantsResponse: + type: object + properties: + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + authorization: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time + title: |- + GrantAuthorization extends a grant with both the addresses of the grantee and granter. + It is used in genesis.proto and query.proto + description: grants is a list of grants granted to the grantee. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. + cosmos.authz.v1beta1.QueryGranterGrantsResponse: + type: object + properties: + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + authorization: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time + title: |- + GrantAuthorization extends a grant with both the addresses of the grantee and granter. + It is used in genesis.proto and query.proto + description: grants is a list of grants granted by the granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. + cosmos.authz.v1beta1.QueryGrantsResponse: + type: object + properties: + grants: + type: array + items: + type: object + properties: + authorization: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time + title: |- + time when the grant will expire and will be pruned. If null, then the grant + doesn't have a time expiration (other conditions in `authorization` + may apply to invalidate the grant) + description: |- + Grant gives permissions to execute + the provide method with expiration time. + description: authorizations is a list of grants granted for grantee by granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryGrantsResponse is the response type for the Query/Authorizations RPC method. + cosmos.bank.v1beta1.DenomOwner: + type: object + properties: + address: + type: string + description: address defines the address that owns a particular denomination. + balance: + description: balance is the balance of the denominated coin for an account. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + description: |- + DenomOwner defines structure representing an account that owns or holds a + particular denominated token. It contains the account address and account + balance of the denominated token. + additionalProperties: false + cosmos.bank.v1beta1.DenomUnit: + type: object + properties: + denom: + type: string + description: denom represents the string name of the given denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: |- + exponent represents power of 10 exponent that one must + raise the base_denom to in order to equal the given DenomUnit's denom + 1 denom = 10^exponent base_denom + (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + additionalProperties: false + cosmos.bank.v1beta1.Metadata: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: denom represents the string name of the given denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: |- + exponent represents power of 10 exponent that one must + raise the base_denom to in order to equal the given DenomUnit's denom + 1 denom = 10^exponent base_denom + (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + nullable: true + base: + type: string + description: base represents the base denom (should be the DenomUnit with exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: |- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + be the same as the display. + uri: + type: string + description: URI to a document (on or off-chain) that contains additional information. Optional. + uri_hash: + type: string + description: |- + URIHash is a sha256 hash of a document pointed by URI. It's used to verify that + the document didn't change. Optional. + description: |- + Metadata represents a struct that describes + a basic token. + additionalProperties: false + cosmos.bank.v1beta1.Params: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + description: |- + Deprecated: Use of SendEnabled in params is deprecated. + For genesis, use the newly added send_enabled field in the genesis object. + Storage, lookup, and manipulation of this information is now in the keeper. + + As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis files. + nullable: true + default_send_enabled: + type: boolean + description: Params defines the parameters for the bank module. + additionalProperties: false + cosmos.bank.v1beta1.QueryAllBalancesResponse: + type: object + properties: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: balances is the balances of all the coins. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryAllBalancesResponse is the response type for the Query/AllBalances RPC + method. + additionalProperties: false + cosmos.bank.v1beta1.QueryBalanceResponse: + type: object + properties: + balance: + description: balance is the balance of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + description: QueryBalanceResponse is the response type for the Query/Balance RPC method. + additionalProperties: false + cosmos.bank.v1beta1.QueryDenomMetadataByQueryStringResponse: + type: object + properties: + metadata: + description: metadata describes and provides all the client information for the requested token. + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: denom represents the string name of the given denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: |- + exponent represents power of 10 exponent that one must + raise the base_denom to in order to equal the given DenomUnit's denom + 1 denom = 10^exponent base_denom + (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: base represents the base denom (should be the DenomUnit with exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: |- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + be the same as the display. + uri: + type: string + description: URI to a document (on or off-chain) that contains additional information. Optional. + uri_hash: + type: string + description: |- + URIHash is a sha256 hash of a document pointed by URI. It's used to verify that + the document didn't change. Optional. + nullable: true + description: >- + QueryDenomMetadataByQueryStringResponse is the response type for the Query/DenomMetadata RPC + + method. Identical with QueryDenomMetadataResponse but receives denom as query string in + request. + additionalProperties: false + cosmos.bank.v1beta1.QueryDenomMetadataResponse: + type: object + properties: + metadata: + description: metadata describes and provides all the client information for the requested token. + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: denom represents the string name of the given denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: |- + exponent represents power of 10 exponent that one must + raise the base_denom to in order to equal the given DenomUnit's denom + 1 denom = 10^exponent base_denom + (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: base represents the base denom (should be the DenomUnit with exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: |- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + be the same as the display. + uri: + type: string + description: URI to a document (on or off-chain) that contains additional information. Optional. + uri_hash: + type: string + description: |- + URIHash is a sha256 hash of a document pointed by URI. It's used to verify that + the document didn't change. Optional. + nullable: true + description: |- + QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC + method. + additionalProperties: false + cosmos.bank.v1beta1.QueryDenomOwnersByQueryResponse: + type: object + properties: + denom_owners: + type: array + items: + type: object + properties: + address: + type: string + description: address defines the address that owns a particular denomination. + balance: + description: balance is the balance of the denominated coin for an account. + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DenomOwner defines structure representing an account that owns or holds a + particular denominated token. It contains the account address and account + balance of the denominated token. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryDenomOwnersByQueryResponse defines the RPC response of a DenomOwnersByQuery RPC query. + additionalProperties: false + cosmos.bank.v1beta1.QueryDenomOwnersResponse: + type: object + properties: + denom_owners: + type: array + items: + type: object + properties: + address: + type: string + description: address defines the address that owns a particular denomination. + balance: + description: balance is the balance of the denominated coin for an account. + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DenomOwner defines structure representing an account that owns or holds a + particular denominated token. It contains the account address and account + balance of the denominated token. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC query. + additionalProperties: false + cosmos.bank.v1beta1.QueryDenomsMetadataResponse: + type: object + properties: + metadatas: + type: array + items: + type: object + properties: + description: + type: string + denom_units: + type: array + items: + type: object + properties: + denom: + type: string + description: denom represents the string name of the given denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: |- + exponent represents power of 10 exponent that one must + raise the base_denom to in order to equal the given DenomUnit's denom + 1 denom = 10^exponent base_denom + (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: base represents the base denom (should be the DenomUnit with exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: |- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This can + be the same as the display. + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional information. + Optional. + uri_hash: + type: string + description: |- + URIHash is a sha256 hash of a document pointed by URI. It's used to verify that + the document didn't change. Optional. + description: |- + Metadata represents a struct that describes + a basic token. + description: metadata provides the client information for all the registered tokens. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC + method. + additionalProperties: false + cosmos.bank.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params provides the parameters of the bank module. + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + description: >- + Deprecated: Use of SendEnabled in params is deprecated. + + For genesis, use the newly added send_enabled field in the genesis object. + + Storage, lookup, and manipulation of this information is now in the keeper. + + + As of cosmos-sdk 0.47, this only exists for backwards compatibility of genesis + files. + default_send_enabled: + type: boolean + nullable: true + description: QueryParamsResponse defines the response type for querying x/bank parameters. + additionalProperties: false + cosmos.bank.v1beta1.QuerySendEnabledResponse: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + nullable: true + pagination: + description: |- + pagination defines the pagination in the response. This field is only + populated if the denoms field in the request is empty. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QuerySendEnabledResponse defines the RPC response of a SendEnable query. + additionalProperties: false + cosmos.bank.v1beta1.QuerySpendableBalanceByDenomResponse: + type: object + properties: + balance: + description: balance is the balance of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + description: |- + QuerySpendableBalanceByDenomResponse defines the gRPC response structure for + querying an account's spendable balance for a specific denom. + additionalProperties: false + cosmos.bank.v1beta1.QuerySpendableBalancesResponse: + type: object + properties: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: balances is the spendable balances of all the coins. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QuerySpendableBalancesResponse defines the gRPC response structure for querying + an account's spendable balances. + additionalProperties: false + cosmos.bank.v1beta1.QuerySupplyOfResponse: + type: object + properties: + amount: + description: amount is the supply of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + nullable: true + description: QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. + additionalProperties: false + cosmos.bank.v1beta1.QueryTotalSupplyResponse: + type: object + properties: + supply: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: supply is the supply of the coins + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + title: |- + QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC + method + additionalProperties: false + cosmos.bank.v1beta1.SendEnabled: + type: object + properties: + denom: + type: string + enabled: + type: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + additionalProperties: false + cosmos.base.v1beta1.Coin: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + cosmos.base.node.v1beta1.ConfigResponse: + type: object + properties: + minimum_gas_price: + type: string + pruning_keep_recent: + type: string + pruning_interval: + type: string + halt_height: + type: string + format: uint64 + description: ConfigResponse defines the response structure for the Config gRPC query. + additionalProperties: false + cosmos.base.node.v1beta1.StatusResponse: + type: object + properties: + earliest_store_height: + type: string + format: uint64 + title: earliest block height available in the store + height: + type: string + format: uint64 + title: current block height + timestamp: + type: string + format: date-time + title: block height timestamp + nullable: true + app_hash: + type: string + format: byte + title: app hash of the current block + nullable: true + validator_hash: + type: string + format: byte + title: validator hash provided by the consensus header + nullable: true + description: StateResponse defines the response structure for the status of a node. + additionalProperties: false + cosmos.base.tendermint.v1beta1.ABCIQueryResponse: + type: object + properties: + code: + type: integer + format: int64 + log: + type: string + title: nondeterministic + info: + type: string + title: nondeterministic + index: + type: string + format: int64 + key: + type: string + format: byte + nullable: true + value: + type: string + format: byte + nullable: true + proof_ops: + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + description: |- + ProofOp defines an operation used for calculating Merkle root. The data could + be arbitrary format, providing necessary data for example neighbouring node + hash. + + Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. + description: |- + ProofOps is Merkle proof defined by the list of ProofOps. + + Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. + nullable: true + height: + type: string + format: int64 + codespace: + type: string + description: |- + ABCIQueryResponse defines the response structure for the ABCIQuery gRPC query. + + Note: This type is a duplicate of the ResponseQuery proto type defined in + Tendermint. + additionalProperties: false + cosmos.base.tendermint.v1beta1.Block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + description: >- + proposer_address is the original block proposer address, formatted as a Bech32 + string. + + In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 + string + + for better UX. + + + original proposer of the block + description: Header defines the structure of a Tendermint block header. + nullable: true + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + nullable: true + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus for + the + + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus for + the + + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two conflicting + votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set + of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators attempting + to mislead a light client. + nullable: true + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + nullable: true + description: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. + additionalProperties: false + cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + nullable: true + block: + title: 'Deprecated: please use `sdk_block` instead' + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a + block in the blockchain, + + including all blockchain data structures and the rules of + the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the previous + block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error + condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the signature is + for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a + set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + nullable: true + sdk_block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + description: >- + proposer_address is the original block proposer address, formatted as a Bech32 + string. + + In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 + string + + for better UX. + + + original proposer of the block + description: Header defines the structure of a Tendermint block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a + block in the blockchain, + + including all blockchain data structures and the rules of + the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the previous + block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error + condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the signature is + for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a + set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + description: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. + nullable: true + description: GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. + additionalProperties: false + cosmos.base.tendermint.v1beta1.GetBlockResultsResponse: + type: object + properties: + height: + type: string + format: int64 + description: height is the block height. + txs_results: + type: array + items: + type: object + properties: + code: + type: integer + format: int64 + data: + type: string + format: byte + log: + type: string + title: nondeterministic + info: + type: string + title: nondeterministic + gas_wanted: + type: string + format: int64 + gas_used: + type: string + format: int64 + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + title: nondeterministic + codespace: + type: string + description: |- + ExecTxResult contains results of executing one individual transaction. + + * Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted + description: txs_results contains the results of each transaction execution. + nullable: true + finalize_block_events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + description: |- + finalize_block_events contains consensus-level events emitted during block + finalization, including slashing, jailing, and validator set updates. + nullable: true + validator_updates: + type: array + items: + type: object + properties: + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + power: + type: string + format: int64 + description: validator_updates contains the validator updates for this block. + nullable: true + consensus_param_updates: + description: consensus_param_updates contains any consensus parameter updates for this block. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: |- + Max age of evidence, in blocks. + + The basic formula for calculating this is: MaxAgeDuration / {average block + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be committed in a + single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: |- + vote_extensions_enable_height configures the first height during which + vote extensions will be enabled. During this specified height, and for all + subsequent heights, precommit messages that do not contain valid extension data + will be considered invalid. Prior to this height, vote extensions will not + be used or accepted by validators on the network. + + Once enabled, vote extensions will be created by the application in ExtendVote, + passed to the application for validation in VerifyVoteExtension and given + to the application to use when proposing a block during PrepareProposal. + description: ABCIParams configure functionality specific to the Application Blockchain Interface. + authority: + type: object + properties: + authority: + type: string + nullable: true + app_hash: + type: string + format: byte + description: app_hash is the app hash after processing this block. + nullable: true + description: GetBlockResultsResponse is the response type for the Query/GetBlockResults RPC method. + additionalProperties: false + cosmos.base.tendermint.v1beta1.GetLatestBlockResponse: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + nullable: true + block: + title: 'Deprecated: please use `sdk_block` instead' + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a + block in the blockchain, + + including all blockchain data structures and the rules of + the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the previous + block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error + condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the signature is + for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a + set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + nullable: true + sdk_block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + description: >- + proposer_address is the original block proposer address, formatted as a Bech32 + string. + + In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 + string + + for better UX. + + + original proposer of the block + description: Header defines the structure of a Tendermint block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a + block in the blockchain, + + including all blockchain data structures and the rules of + the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the previous + block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error + condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the signature is + for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a + set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + description: |- + Block is tendermint type Block, with the Header proposer address + field converted to bech32 string. + nullable: true + description: GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. + additionalProperties: false + cosmos.base.tendermint.v1beta1.GetLatestBlockResultsResponse: + type: object + properties: + height: + type: string + format: int64 + description: height is the block height. + txs_results: + type: array + items: + type: object + properties: + code: + type: integer + format: int64 + data: + type: string + format: byte + log: + type: string + title: nondeterministic + info: + type: string + title: nondeterministic + gas_wanted: + type: string + format: int64 + gas_used: + type: string + format: int64 + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + title: nondeterministic + codespace: + type: string + description: |- + ExecTxResult contains results of executing one individual transaction. + + * Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted + description: txs_results contains the results of each transaction execution. + nullable: true + finalize_block_events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + description: |- + finalize_block_events contains consensus-level events emitted during block + finalization, including slashing, jailing, and validator set updates. + nullable: true + validator_updates: + type: array + items: + type: object + properties: + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + power: + type: string + format: int64 + description: validator_updates contains the validator updates for this block. + nullable: true + consensus_param_updates: + description: consensus_param_updates contains any consensus parameter updates for this block. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: |- + Max age of evidence, in blocks. + + The basic formula for calculating this is: MaxAgeDuration / {average block + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be committed in a + single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: |- + vote_extensions_enable_height configures the first height during which + vote extensions will be enabled. During this specified height, and for all + subsequent heights, precommit messages that do not contain valid extension data + will be considered invalid. Prior to this height, vote extensions will not + be used or accepted by validators on the network. + + Once enabled, vote extensions will be created by the application in ExtendVote, + passed to the application for validation in VerifyVoteExtension and given + to the application to use when proposing a block during PrepareProposal. + description: ABCIParams configure functionality specific to the Application Blockchain Interface. + authority: + type: object + properties: + authority: + type: string + nullable: true + app_hash: + type: string + format: byte + description: app_hash is the app hash after processing this block. + nullable: true + description: >- + GetLatestBlockResultsResponse is the response type for the Query/GetLatestBlockResults RPC + method. + additionalProperties: false + cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse: + type: object + properties: + block_height: + type: string + format: int64 + validators: + type: array + items: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + nullable: true + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: >- + GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC + method. + cosmos.base.tendermint.v1beta1.GetNodeInfoResponse: + type: object + properties: + default_node_info: + type: object + properties: + protocol_version: + type: object + properties: + p2p: + type: string + format: uint64 + block: + type: string + format: uint64 + app: + type: string + format: uint64 + default_node_id: + type: string + listen_addr: + type: string + network: + type: string + version: + type: string + channels: + type: string + format: byte + moniker: + type: string + other: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + nullable: true + application_version: + type: object + properties: + name: + type: string + app_name: + type: string + version: + type: string + git_commit: + type: string + build_tags: + type: string + go_version: + type: string + build_deps: + type: array + items: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + cosmos_sdk_version: + type: string + description: VersionInfo is the type for the GetNodeInfoResponse message. + nullable: true + description: GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC method. + additionalProperties: false + cosmos.base.tendermint.v1beta1.GetSyncingResponse: + type: object + properties: + syncing: + type: boolean + earliest_block_height: + type: string + format: int64 + description: earliest_block_height is the earliest block height available on this node. + latest_block_height: + type: string + format: int64 + description: latest_block_height is the latest block height available on this node. + description: GetSyncingResponse is the response type for the Query/GetSyncing RPC method. + additionalProperties: false + cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse: + type: object + properties: + block_height: + type: string + format: int64 + validators: + type: array + items: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + nullable: true + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: >- + GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight + RPC method. + cosmos.base.tendermint.v1beta1.Header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + nullable: true + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + nullable: true + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + description: |- + proposer_address is the original block proposer address, formatted as a Bech32 string. + In Tendermint, this type is `bytes`, but in the SDK, we convert it to a Bech32 string + for better UX. + + original proposer of the block + description: Header defines the structure of a Tendermint block header. + additionalProperties: false + cosmos.base.tendermint.v1beta1.Module: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + additionalProperties: false + cosmos.base.tendermint.v1beta1.ProofOp: + type: object + properties: + type: + type: string + key: + type: string + format: byte + nullable: true + data: + type: string + format: byte + nullable: true + description: |- + ProofOp defines an operation used for calculating Merkle root. The data could + be arbitrary format, providing necessary data for example neighbouring node + hash. + + Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. + additionalProperties: false + cosmos.base.tendermint.v1beta1.ProofOps: + type: object + properties: + ops: + type: array + items: + type: object + properties: + type: + type: string + key: + type: string + format: byte + data: + type: string + format: byte + description: |- + ProofOp defines an operation used for calculating Merkle root. The data could + be arbitrary format, providing necessary data for example neighbouring node + hash. + + Note: This type is a duplicate of the ProofOp proto type defined in Tendermint. + nullable: true + description: |- + ProofOps is Merkle proof defined by the list of ProofOps. + + Note: This type is a duplicate of the ProofOps proto type defined in Tendermint. + additionalProperties: false + cosmos.base.tendermint.v1beta1.Validator: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + nullable: true + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + cosmos.base.tendermint.v1beta1.VersionInfo: + type: object + properties: + name: + type: string + app_name: + type: string + version: + type: string + git_commit: + type: string + build_tags: + type: string + go_version: + type: string + build_deps: + type: array + items: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + nullable: true + cosmos_sdk_version: + type: string + description: VersionInfo is the type for the GetNodeInfoResponse message. + additionalProperties: false + tendermint.abci.Event: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + nullable: true + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + additionalProperties: false + tendermint.abci.EventAttribute: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + additionalProperties: false + tendermint.abci.ExecTxResult: + type: object + properties: + code: + type: integer + format: int64 + data: + type: string + format: byte + nullable: true + log: + type: string + title: nondeterministic + info: + type: string + title: nondeterministic + gas_wanted: + type: string + format: int64 + gas_used: + type: string + format: int64 + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + title: nondeterministic + nullable: true + codespace: + type: string + description: |- + ExecTxResult contains results of executing one individual transaction. + + * Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted + additionalProperties: false + tendermint.abci.ValidatorUpdate: + type: object + properties: + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + nullable: true + power: + type: string + format: int64 + additionalProperties: false + tendermint.crypto.PublicKey: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: PublicKey defines the keys available for use with Validators + additionalProperties: false + tendermint.p2p.DefaultNodeInfo: + type: object + properties: + protocol_version: + type: object + properties: + p2p: + type: string + format: uint64 + block: + type: string + format: uint64 + app: + type: string + format: uint64 + nullable: true + default_node_id: + type: string + listen_addr: + type: string + network: + type: string + version: + type: string + channels: + type: string + format: byte + nullable: true + moniker: + type: string + other: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + nullable: true + additionalProperties: false + tendermint.p2p.DefaultNodeInfoOther: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + additionalProperties: false + tendermint.p2p.ProtocolVersion: + type: object + properties: + p2p: + type: string + format: uint64 + block: + type: string + format: uint64 + app: + type: string + format: uint64 + additionalProperties: false + tendermint.types.ABCIParams: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: |- + vote_extensions_enable_height configures the first height during which + vote extensions will be enabled. During this specified height, and for all + subsequent heights, precommit messages that do not contain valid extension data + will be considered invalid. Prior to this height, vote extensions will not + be used or accepted by validators on the network. + + Once enabled, vote extensions will be created by the application in ExtendVote, + passed to the application for validation in VerifyVoteExtension and given + to the application to use when proposing a block during PrepareProposal. + description: ABCIParams configure functionality specific to the Application Blockchain Interface. + additionalProperties: false + tendermint.types.AuthorityParams: + type: object + properties: + authority: + type: string + additionalProperties: false + tendermint.types.Block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + nullable: true + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + nullable: true + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus for + the + + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus for + the + + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two conflicting + votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set + of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators attempting + to mislead a light client. + nullable: true + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + nullable: true + additionalProperties: false + tendermint.types.BlockID: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + nullable: true + title: BlockID + additionalProperties: false + tendermint.types.BlockIDFlag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + tendermint.types.BlockParams: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + additionalProperties: false + tendermint.types.Commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + nullable: true + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + nullable: true + description: Commit contains the evidence that a block was committed by a set of validators. + additionalProperties: false + tendermint.types.CommitSig: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: CommitSig is a part of the Vote included in a Commit. + additionalProperties: false + tendermint.types.ConsensusParams: + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + nullable: true + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: |- + Max age of evidence, in blocks. + + The basic formula for calculating this is: MaxAgeDuration / {average block + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be committed in a + single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + nullable: true + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + nullable: true + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + nullable: true + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: |- + vote_extensions_enable_height configures the first height during which + vote extensions will be enabled. During this specified height, and for all + subsequent heights, precommit messages that do not contain valid extension data + will be considered invalid. Prior to this height, vote extensions will not + be used or accepted by validators on the network. + + Once enabled, vote extensions will be created by the application in ExtendVote, + passed to the application for validation in VerifyVoteExtension and given + to the application to use when proposing a block during PrepareProposal. + description: ABCIParams configure functionality specific to the Application Blockchain Interface. + nullable: true + authority: + type: object + properties: + authority: + type: string + nullable: true + description: |- + ConsensusParams contains consensus critical parameters that determine the + validity of blocks. + additionalProperties: false + tendermint.types.Data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + nullable: true + title: Data contains the set of transactions included in the block + additionalProperties: false + tendermint.types.DuplicateVoteEvidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote signature by the validator if they participated in consensus for the + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + nullable: true + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote signature by the validator if they participated in consensus for the + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + nullable: true + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. + additionalProperties: false + tendermint.types.Evidence: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote signature by the validator if they participated in consensus for the + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote signature by the validator if they participated in consensus for the + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. + nullable: true + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators attempting to mislead + a light client. + nullable: true + additionalProperties: false + tendermint.types.EvidenceList: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote signature by the validator if they participated in consensus for the + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote signature by the validator if they participated in consensus for the + associated block. + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two conflicting + votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in + the blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators attempting to + mislead a light client. + nullable: true + additionalProperties: false + tendermint.types.EvidenceParams: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: |- + Max age of evidence, in blocks. + + The basic formula for calculating this is: MaxAgeDuration / {average block + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + nullable: true + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be committed in a single + block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + additionalProperties: false + tendermint.types.Header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + nullable: true + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + nullable: true + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + additionalProperties: false + tendermint.types.LightBlock: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + nullable: true + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + nullable: true + additionalProperties: false + tendermint.types.LightClientAttackEvidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + nullable: true + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a + light client. + additionalProperties: false + tendermint.types.PartSetHeader: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + additionalProperties: false + tendermint.types.SignedHeader: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + nullable: true + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: Commit contains the evidence that a block was committed by a set of validators. + nullable: true + additionalProperties: false + tendermint.types.SignedMsgType: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + tendermint.types.Validator: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + nullable: true + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + tendermint.types.ValidatorParams: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + additionalProperties: false + tendermint.types.ValidatorSet: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + total_voting_power: + type: string + format: int64 + additionalProperties: false + tendermint.types.VersionParams: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + additionalProperties: false + tendermint.types.Vote: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + description: zero if vote is nil. + nullable: true + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote signature by the validator if they participated in consensus for the + associated block. + nullable: true + extension: + type: string + format: byte + description: |- + Vote extension provided by the application. Only valid for precommit + messages. + nullable: true + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + nullable: true + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + additionalProperties: false + tendermint.version.Consensus: + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + additionalProperties: false + cosmos.consensus.v1.QueryParamsResponse: + type: object + properties: + params: + description: |- + params are the tendermint consensus params stored in the consensus module. + Please note that `params.version` is not populated in this response, it is + tracked separately in the x/upgrade module. + type: object + properties: + block: + type: object + properties: + max_bytes: + type: string + format: int64 + title: |- + Max block size, in bytes. + Note: must be greater than 0 + max_gas: + type: string + format: int64 + title: |- + Max gas per block. + Note: must be greater or equal to -1 + description: BlockParams contains limits on the block size. + evidence: + type: object + properties: + max_age_num_blocks: + type: string + format: int64 + description: |- + Max age of evidence, in blocks. + + The basic formula for calculating this is: MaxAgeDuration / {average block + time}. + max_age_duration: + type: string + description: >- + Max age of evidence, in time. + + + It should correspond with an app's "unbonding period" or other similar + + mechanism for handling [Nothing-At-Stake + + attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). + max_bytes: + type: string + format: int64 + title: >- + This sets the maximum size of total evidence in bytes that can be committed in a + single block. + + and should fall comfortably under the max block bytes. + + Default is 1048576 or 1MB + description: EvidenceParams determine how we handle evidence of malfeasance. + validator: + type: object + properties: + pub_key_types: + type: array + items: + type: string + description: |- + ValidatorParams restrict the public key types validators can use. + NOTE: uses ABCI pubkey naming, not Amino names. + version: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + abci: + type: object + properties: + vote_extensions_enable_height: + type: string + format: int64 + description: |- + vote_extensions_enable_height configures the first height during which + vote extensions will be enabled. During this specified height, and for all + subsequent heights, precommit messages that do not contain valid extension data + will be considered invalid. Prior to this height, vote extensions will not + be used or accepted by validators on the network. + + Once enabled, vote extensions will be created by the application in ExtendVote, + passed to the application for validation in VerifyVoteExtension and given + to the application to use when proposing a block during PrepareProposal. + description: ABCIParams configure functionality specific to the Application Blockchain Interface. + authority: + type: object + properties: + authority: + type: string + nullable: true + description: QueryParamsResponse defines the response type for querying x/consensus parameters. + additionalProperties: false + cosmos.base.v1beta1.DecCoin: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + additionalProperties: false + cosmos.distribution.v1beta1.DelegationDelegatorReward: + type: object + properties: + validator_address: + type: string + reward: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + nullable: true + description: |- + DelegationDelegatorReward represents the properties + of a delegator's delegation reward. + additionalProperties: false + cosmos.distribution.v1beta1.DelegatorStartingInfo: + type: object + properties: + previous_period: + type: string + format: uint64 + stake: + type: string + height: + type: string + format: uint64 + description: |- + DelegatorStartingInfo represents the starting info for a delegator reward + period. It tracks the previous validator period, the delegation's amount of + staking token, and the creation height (to check later on if any slashes have + occurred). NOTE: Even though validators are slashed to whole staking tokens, + the delegators within the validator may be left with less than a full token, + thus sdk.Dec is used. + additionalProperties: false + cosmos.distribution.v1beta1.Params: + type: object + properties: + community_tax: + type: string + base_proposer_reward: + type: string + description: |- + Deprecated: The base_proposer_reward field is deprecated and is no longer used + in the x/distribution module's reward mechanism. + bonus_proposer_reward: + type: string + description: |- + Deprecated: The bonus_proposer_reward field is deprecated and is no longer used + in the x/distribution module's reward mechanism. + withdraw_addr_enabled: + type: boolean + description: Params defines the set of params for the distribution module. + additionalProperties: false + cosmos.distribution.v1beta1.QueryCommunityPoolResponse: + type: object + properties: + pool: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + description: pool defines community pool's coins. + nullable: true + description: |- + QueryCommunityPoolResponse is the response type for the Query/CommunityPool + RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryDelegationRewardsResponse: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + description: rewards defines the rewards accrued by a delegation. + nullable: true + description: |- + QueryDelegationRewardsResponse is the response type for the + Query/DelegationRewards RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryDelegationTotalRewardsResponse: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + validator_address: + type: string + reward: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + description: |- + DelegationDelegatorReward represents the properties + of a delegator's delegation reward. + description: rewards defines all the rewards accrued by a delegator. + nullable: true + total: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + description: total defines the sum of all the rewards. + nullable: true + description: |- + QueryDelegationTotalRewardsResponse is the response type for the + Query/DelegationTotalRewards RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryDelegatorStartingInfoResponse: + type: object + properties: + starting_info: + description: starting_info defines the starting info of a delegator. + type: object + properties: + previous_period: + type: string + format: uint64 + stake: + type: string + height: + type: string + format: uint64 + nullable: true + description: |- + QueryDelegatorStartingInfoResponse is the response type for the + Query/DelegatorStartingInfo RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryDelegatorValidatorsResponse: + type: object + properties: + validators: + type: array + items: + type: string + description: validators defines the validators a delegator is delegating for. + description: |- + QueryDelegatorValidatorsResponse is the response type for the + Query/DelegatorValidators RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryDelegatorWithdrawAddressResponse: + type: object + properties: + withdraw_address: + type: string + description: withdraw_address defines the delegator address to query for. + description: |- + QueryDelegatorWithdrawAddressResponse is the response type for the + Query/DelegatorWithdrawAddress RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + community_tax: + type: string + base_proposer_reward: + type: string + description: |- + Deprecated: The base_proposer_reward field is deprecated and is no longer used + in the x/distribution module's reward mechanism. + bonus_proposer_reward: + type: string + description: |- + Deprecated: The bonus_proposer_reward field is deprecated and is no longer used + in the x/distribution module's reward mechanism. + withdraw_addr_enabled: + type: boolean + nullable: true + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryValidatorCommissionResponse: + type: object + properties: + commission: + description: commission defines the commission the validator received. + type: object + properties: + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + nullable: true + title: |- + QueryValidatorCommissionResponse is the response type for the + Query/ValidatorCommission RPC method + additionalProperties: false + cosmos.distribution.v1beta1.QueryValidatorCurrentRewardsResponse: + type: object + properties: + rewards: + description: rewards defines the current rewards of a validator. + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + period: + type: string + format: uint64 + nullable: true + description: |- + QueryValidatorCurrentRewardsResponse is the response type for the + Query/ValidatorCurrentRewards RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryValidatorDistributionInfoResponse: + type: object + properties: + operator_address: + type: string + description: operator_address defines the validator operator address. + self_bond_rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + description: self_bond_rewards defines the self delegations rewards. + nullable: true + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + description: commission defines the commission the validator received. + nullable: true + description: >- + QueryValidatorDistributionInfoResponse is the response type for the + Query/ValidatorDistributionInfo RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryValidatorHistoricalRewardsResponse: + type: object + properties: + rewards: + description: rewards defines the historical rewards of a validator. + type: object + properties: + cumulative_reward_ratio: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + reference_count: + type: integer + format: int64 + title: |- + ValidatorHistoricalRewards represents historical rewards for a validator. + Height is implicit within the store key. + Cumulative reward ratio is the sum from the zeroeth period + until this period of rewards / tokens, per the spec. + The reference count indicates the number of objects + which might need to reference this historical entry at any point. + ReferenceCount = + number of outstanding delegations which ended the associated period (and + might need to read that record) + + number of slashes which ended the associated period (and might need to + read that record) + + one per validator for the zeroeth period, set on initialization + nullable: true + description: |- + QueryValidatorHistoricalRewardsResponse is the response type for the + Query/ValidatorHistoricalRewards RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryValidatorOutstandingRewardsResponse: + type: object + properties: + rewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + description: |- + ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards + for a validator inexpensive to track, allows simple sanity checks. + nullable: true + description: |- + QueryValidatorOutstandingRewardsResponse is the response type for the + Query/ValidatorOutstandingRewards RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.QueryValidatorSlashesResponse: + type: object + properties: + slashes: + type: array + items: + type: object + properties: + validator_period: + type: string + format: uint64 + fraction: + type: string + description: |- + ValidatorSlashEvent represents a validator slash event. + Height is implicit within the store key. + This is needed to calculate appropriate amount of staking tokens + for delegations which are withdrawn after a slash has occurred. + description: slashes defines the slashes the validator received. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryValidatorSlashesResponse is the response type for the + Query/ValidatorSlashes RPC method. + additionalProperties: false + cosmos.distribution.v1beta1.ValidatorAccumulatedCommission: + type: object + properties: + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + nullable: true + description: |- + ValidatorAccumulatedCommission represents accumulated commission + for a validator kept as a running counter, can be withdrawn at any time. + additionalProperties: false + cosmos.distribution.v1beta1.ValidatorCurrentRewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + nullable: true + period: + type: string + format: uint64 + description: |- + ValidatorCurrentRewards represents current rewards and current + period for a validator kept as a running counter and incremented + each block as long as the validator's tokens remain constant. + additionalProperties: false + cosmos.distribution.v1beta1.ValidatorHistoricalRewards: + type: object + properties: + cumulative_reward_ratio: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + nullable: true + reference_count: + type: integer + format: int64 + title: |- + ValidatorHistoricalRewards represents historical rewards for a validator. + Height is implicit within the store key. + Cumulative reward ratio is the sum from the zeroeth period + until this period of rewards / tokens, per the spec. + The reference count indicates the number of objects + which might need to reference this historical entry at any point. + ReferenceCount = + number of outstanding delegations which ended the associated period (and + might need to read that record) + + number of slashes which ended the associated period (and might need to + read that record) + + one per validator for the zeroeth period, set on initialization + additionalProperties: false + cosmos.distribution.v1beta1.ValidatorOutstandingRewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is a Dec which implements the custom method + signatures required by gogoproto. + nullable: true + description: |- + ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards + for a validator inexpensive to track, allows simple sanity checks. + additionalProperties: false + cosmos.distribution.v1beta1.ValidatorSlashEvent: + type: object + properties: + validator_period: + type: string + format: uint64 + fraction: + type: string + description: |- + ValidatorSlashEvent represents a validator slash event. + Height is implicit within the store key. + This is needed to calculate appropriate amount of staking tokens + for delegations which are withdrawn after a slash has occurred. + additionalProperties: false + cosmos.epochs.v1beta1.EpochInfo: + type: object + properties: + identifier: + type: string + description: identifier is a unique reference to this particular timer. + start_time: + type: string + format: date-time + description: |- + start_time is the time at which the timer first ever ticks. + If start_time is in the future, the epoch will not begin until the start + time. + nullable: true + duration: + type: string + description: |- + duration is the time in between epoch ticks. + In order for intended behavior to be met, duration should + be greater than the chains expected block time. + Duration must be non-zero. + nullable: true + current_epoch: + type: string + format: int64 + description: |- + current_epoch is the current epoch number, or in other words, + how many times has the timer 'ticked'. + The first tick (current_epoch=1) is defined as + the first block whose blocktime is greater than the EpochInfo start_time. + current_epoch_start_time: + type: string + format: date-time + description: |- + current_epoch_start_time describes the start time of the current timer + interval. The interval is (current_epoch_start_time, + current_epoch_start_time + duration] When the timer ticks, this is set to + current_epoch_start_time = last_epoch_start_time + duration only one timer + tick for a given identifier can occur per block. + + NOTE! The current_epoch_start_time may diverge significantly from the + wall-clock time the epoch began at. Wall-clock time of epoch start may be + >> current_epoch_start_time. Suppose current_epoch_start_time = 10, + duration = 5. Suppose the chain goes offline at t=14, and comes back online + at t=30, and produces blocks at every successive time. (t=31, 32, etc.) + * The t=30 block will start the epoch for (10, 15] + * The t=31 block will start the epoch for (15, 20] + * The t=32 block will start the epoch for (20, 25] + * The t=33 block will start the epoch for (25, 30] + * The t=34 block will start the epoch for (30, 35] + * The **t=36** block will start the epoch for (35, 40] + nullable: true + epoch_counting_started: + type: boolean + description: |- + epoch_counting_started is a boolean, that indicates whether this + epoch timer has began yet. + current_epoch_start_height: + type: string + format: int64 + title: |- + current_epoch_start_height is the block height at which the current epoch + started. (The block height at which the timer last ticked) + description: |- + EpochInfo is a struct that describes the data going into + a timer defined by the x/epochs module. + additionalProperties: false + cosmos.epochs.v1beta1.QueryCurrentEpochResponse: + type: object + properties: + current_epoch: + type: string + format: int64 + description: |- + QueryCurrentEpochResponse defines the gRPC response structure for + querying an epoch by its identifier. + additionalProperties: false + cosmos.epochs.v1beta1.QueryEpochInfosResponse: + type: object + properties: + epochs: + type: array + items: + type: object + properties: + identifier: + type: string + description: identifier is a unique reference to this particular timer. + start_time: + type: string + format: date-time + description: |- + start_time is the time at which the timer first ever ticks. + If start_time is in the future, the epoch will not begin until the start + time. + duration: + type: string + description: |- + duration is the time in between epoch ticks. + In order for intended behavior to be met, duration should + be greater than the chains expected block time. + Duration must be non-zero. + current_epoch: + type: string + format: int64 + description: |- + current_epoch is the current epoch number, or in other words, + how many times has the timer 'ticked'. + The first tick (current_epoch=1) is defined as + the first block whose blocktime is greater than the EpochInfo start_time. + current_epoch_start_time: + type: string + format: date-time + description: |- + current_epoch_start_time describes the start time of the current timer + interval. The interval is (current_epoch_start_time, + current_epoch_start_time + duration] When the timer ticks, this is set to + current_epoch_start_time = last_epoch_start_time + duration only one timer + tick for a given identifier can occur per block. + + NOTE! The current_epoch_start_time may diverge significantly from the + wall-clock time the epoch began at. Wall-clock time of epoch start may be + >> current_epoch_start_time. Suppose current_epoch_start_time = 10, + duration = 5. Suppose the chain goes offline at t=14, and comes back online + at t=30, and produces blocks at every successive time. (t=31, 32, etc.) + * The t=30 block will start the epoch for (10, 15] + * The t=31 block will start the epoch for (15, 20] + * The t=32 block will start the epoch for (20, 25] + * The t=33 block will start the epoch for (25, 30] + * The t=34 block will start the epoch for (30, 35] + * The **t=36** block will start the epoch for (35, 40] + epoch_counting_started: + type: boolean + description: |- + epoch_counting_started is a boolean, that indicates whether this + epoch timer has began yet. + current_epoch_start_height: + type: string + format: int64 + title: |- + current_epoch_start_height is the block height at which the current epoch + started. (The block height at which the timer last ticked) + description: |- + EpochInfo is a struct that describes the data going into + a timer defined by the x/epochs module. + nullable: true + description: |- + QueryEpochInfosRequest defines the gRPC response structure for + querying all epoch info. + additionalProperties: false + cosmos.evidence.v1beta1.QueryAllEvidenceResponse: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: evidence returns all evidences. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC + method. + cosmos.evidence.v1beta1.QueryEvidenceResponse: + type: object + properties: + evidence: + description: evidence returns the requested evidence. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + description: QueryEvidenceResponse is the response type for the Query/Evidence RPC method. + cosmos.feegrant.v1beta1.Grant: + type: object + properties: + granter: + type: string + description: granter is the address of the user granting an allowance of their funds. + grantee: + type: string + description: grantee is the address of the user being granted an allowance of another user's funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + title: Grant is stored in the KVStore to record a grant with full context + cosmos.feegrant.v1beta1.QueryAllowanceResponse: + type: object + properties: + allowance: + description: allowance is an allowance granted for grantee by granter. + type: object + properties: + granter: + type: string + description: granter is the address of the user granting an allowance of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of another user's + funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + title: Grant is stored in the KVStore to record a grant with full context + nullable: true + description: QueryAllowanceResponse is the response type for the Query/Allowance RPC method. + cosmos.feegrant.v1beta1.QueryAllowancesByGranterResponse: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: granter is the address of the user granting an allowance of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of another user's + funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + title: Grant is stored in the KVStore to record a grant with full context + description: allowances that have been issued by the granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: >- + QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC + method. + cosmos.feegrant.v1beta1.QueryAllowancesResponse: + type: object + properties: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: granter is the address of the user granting an allowance of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an allowance of another user's + funds. + allowance: + description: allowance can be any of basic, periodic, allowed fee allowance. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + title: Grant is stored in the KVStore to record a grant with full context + description: allowances are allowance's granted for grantee by granter. + nullable: true + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryAllowancesResponse is the response type for the Query/Allowances RPC method. + cosmos.gov.v1.Deposit: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: amount to be deposited by depositor. + nullable: true + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + additionalProperties: false + cosmos.gov.v1.DepositParams: + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + nullable: true + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + description: DepositParams defines the params for deposits on governance proposals. + additionalProperties: false + cosmos.gov.v1.Params: + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + nullable: true + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + voting_period: + type: string + description: Duration of the voting period. + nullable: true + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + veto_threshold: + type: string + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + min_initial_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value that must be paid at proposal + submission. + proposal_cancel_ratio: + type: string + description: >- + The cancel ratio which will not be returned back to the depositors when a proposal is + cancelled. + proposal_cancel_dest: + type: string + description: |- + The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. + If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. + expedited_voting_period: + type: string + description: Duration of the voting period of an expedited proposal. + nullable: true + expedited_threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.67.' + expedited_min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum expedited deposit for a proposal to enter voting period. + nullable: true + burn_vote_quorum: + type: boolean + title: burn deposits if a proposal does not meet quorum + burn_proposal_deposit_prevote: + type: boolean + title: burn deposits if the proposal does not enter voting period + burn_vote_veto: + type: boolean + title: burn deposits if quorum with vote type no_veto is met + min_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value minimum that must be met when + making a deposit. + + Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit + of 1stake would be + + required. + description: Params defines the parameters for the x/gov module. + additionalProperties: false + cosmos.gov.v1.Proposal: + type: object + properties: + id: + type: string + format: uint64 + description: id defines the unique id of the proposal. + messages: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: messages are the arbitrary messages to be executed if the proposal passes. + nullable: true + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + nullable: true + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. + nullable: true + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + nullable: true + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + nullable: true + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + nullable: true + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + nullable: true + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + nullable: true + metadata: + type: string + title: |- + metadata is any arbitrary metadata attached to the proposal. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#proposal-3 + title: + type: string + title: title is the title of the proposal + summary: + type: string + title: summary is a short summary of the proposal + proposer: + type: string + title: proposer is the address of the proposal submitter + expedited: + type: boolean + title: expedited defines if the proposal is expedited + failed_reason: + type: string + title: failed_reason defines the reason why the proposal failed + description: Proposal defines the core field members of a governance proposal. + cosmos.gov.v1.ProposalStatus: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + cosmos.gov.v1.QueryConstitutionResponse: + type: object + properties: + constitution: + type: string + title: QueryConstitutionResponse is the response type for the Query/Constitution RPC method + additionalProperties: false + cosmos.gov.v1.QueryDepositResponse: + type: object + properties: + deposit: + description: deposit defines the requested deposit. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: amount to be deposited by depositor. + nullable: true + description: QueryDepositResponse is the response type for the Query/Deposit RPC method. + additionalProperties: false + cosmos.gov.v1.QueryDepositsResponse: + type: object + properties: + deposits: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: amount to be deposited by depositor. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + description: deposits defines the requested deposits. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryDepositsResponse is the response type for the Query/Deposits RPC method. + additionalProperties: false + cosmos.gov.v1.QueryParamsResponse: + type: object + properties: + voting_params: + description: |- + Deprecated: Prefer to use `params` instead. + voting_params defines the parameters related to voting. + type: object + properties: + voting_period: + type: string + description: Duration of the voting period. + nullable: true + deposit_params: + description: |- + Deprecated: Prefer to use `params` instead. + deposit_params defines the parameters related to deposit. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + tally_params: + description: |- + Deprecated: Prefer to use `params` instead. + tally_params defines the parameters related to tally. + type: object + properties: + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + veto_threshold: + type: string + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + nullable: true + params: + description: params defines all the parameters of x/gov module. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + voting_period: + type: string + description: Duration of the voting period. + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + veto_threshold: + type: string + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + min_initial_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value that must be paid at + proposal submission. + proposal_cancel_ratio: + type: string + description: >- + The cancel ratio which will not be returned back to the depositors when a proposal + is cancelled. + proposal_cancel_dest: + type: string + description: |- + The address which will receive (proposal_cancel_ratio * deposit) proposal deposits. + If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned. + expedited_voting_period: + type: string + description: Duration of the voting period of an expedited proposal. + expedited_threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.67.' + expedited_min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum expedited deposit for a proposal to enter voting period. + burn_vote_quorum: + type: boolean + title: burn deposits if a proposal does not meet quorum + burn_proposal_deposit_prevote: + type: boolean + title: burn deposits if the proposal does not enter voting period + burn_vote_veto: + type: boolean + title: burn deposits if quorum with vote type no_veto is met + min_deposit_ratio: + type: string + description: >- + The ratio representing the proportion of the deposit value minimum that must be met + when making a deposit. + + Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a + deposit of 1stake would be + + required. + nullable: true + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + cosmos.gov.v1.QueryProposalResponse: + type: object + properties: + proposal: + description: proposal is the requested governance proposal. + type: object + properties: + id: + type: string + format: uint64 + description: id defines the unique id of the proposal. + messages: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: messages are the arbitrary messages to be executed if the proposal passes. + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + metadata: + type: string + title: |- + metadata is any arbitrary metadata attached to the proposal. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#proposal-3 + title: + type: string + title: title is the title of the proposal + summary: + type: string + title: summary is a short summary of the proposal + proposer: + type: string + title: proposer is the address of the proposal submitter + expedited: + type: boolean + title: expedited defines if the proposal is expedited + failed_reason: + type: string + title: failed_reason defines the reason why the proposal failed + nullable: true + description: QueryProposalResponse is the response type for the Query/Proposal RPC method. + cosmos.gov.v1.QueryProposalsResponse: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id defines the unique id of the proposal. + messages: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: messages are the arbitrary messages to be executed if the proposal passes. + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + metadata: + type: string + title: |- + metadata is any arbitrary metadata attached to the proposal. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#proposal-3 + title: + type: string + title: title is the title of the proposal + summary: + type: string + title: summary is a short summary of the proposal + proposer: + type: string + title: proposer is the address of the proposal submitter + expedited: + type: boolean + title: expedited defines if the proposal is expedited + failed_reason: + type: string + title: failed_reason defines the reason why the proposal failed + description: Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryProposalsResponse is the response type for the Query/Proposals RPC + method. + cosmos.gov.v1.QueryTallyResultResponse: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. + nullable: true + description: QueryTallyResultResponse is the response type for the Query/Tally RPC method. + additionalProperties: false + cosmos.gov.v1.QueryVoteResponse: + type: object + properties: + vote: + description: vote defines the queried vote. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain duplicate vote + options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. + metadata: + type: string + title: >- + metadata is any arbitrary metadata attached to the vote. + + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#vote-5 + nullable: true + description: QueryVoteResponse is the response type for the Query/Vote RPC method. + additionalProperties: false + cosmos.gov.v1.QueryVotesResponse: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain duplicate vote + options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. + metadata: + type: string + title: >- + metadata is any arbitrary metadata attached to the vote. + + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#vote-5 + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + description: votes defines the queried votes. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryVotesResponse is the response type for the Query/Votes RPC method. + additionalProperties: false + cosmos.gov.v1.TallyParams: + type: object + properties: + quorum: + type: string + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + veto_threshold: + type: string + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + description: TallyParams defines the params for tallying votes on governance proposals. + additionalProperties: false + cosmos.gov.v1.TallyResult: + type: object + properties: + yes_count: + type: string + description: yes_count is the number of yes votes on a proposal. + abstain_count: + type: string + description: abstain_count is the number of abstain votes on a proposal. + no_count: + type: string + description: no_count is the number of no votes on a proposal. + no_with_veto_count: + type: string + description: no_with_veto_count is the number of no with veto votes on a proposal. + description: TallyResult defines a standard tally for a governance proposal. + additionalProperties: false + cosmos.gov.v1.Vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + options: + type: array + items: + type: object + properties: + option: + description: option defines the valid vote options, it must not contain duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. + nullable: true + metadata: + type: string + title: >- + metadata is any arbitrary metadata attached to the vote. + + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/gov#vote-5 + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + additionalProperties: false + cosmos.gov.v1.VoteOption: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: |- + VoteOption enumerates the valid vote options for a given governance proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + cosmos.gov.v1.VotingParams: + type: object + properties: + voting_period: + type: string + description: Duration of the voting period. + nullable: true + description: VotingParams defines the params for voting on governance proposals. + additionalProperties: false + cosmos.gov.v1.WeightedVoteOption: + type: object + properties: + option: + description: option defines the valid vote options, it must not contain duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + additionalProperties: false + cosmos.gov.v1beta1.Deposit: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: amount to be deposited by depositor. + nullable: true + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + additionalProperties: false + cosmos.gov.v1beta1.DepositParams: + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + nullable: true + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + description: DepositParams defines the params for deposits on governance proposals. + additionalProperties: false + cosmos.gov.v1beta1.Proposal: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + content: + description: content is the proposal's content. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + nullable: true + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + nullable: true + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + nullable: true + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + nullable: true + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + nullable: true + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + nullable: true + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + nullable: true + description: Proposal defines the core field members of a governance proposal. + cosmos.gov.v1beta1.ProposalStatus: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus enumerates the valid statuses of a proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default proposal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + cosmos.gov.v1beta1.QueryDepositResponse: + type: object + properties: + deposit: + description: deposit defines the requested deposit. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: amount to be deposited by depositor. + nullable: true + description: QueryDepositResponse is the response type for the Query/Deposit RPC method. + additionalProperties: false + cosmos.gov.v1beta1.QueryDepositsResponse: + type: object + properties: + deposits: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + depositor: + type: string + description: depositor defines the deposit addresses from the proposals. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: amount to be deposited by depositor. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + description: deposits defines the requested deposits. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryDepositsResponse is the response type for the Query/Deposits RPC method. + additionalProperties: false + cosmos.gov.v1beta1.QueryParamsResponse: + type: object + properties: + voting_params: + description: voting_params defines the parameters related to voting. + type: object + properties: + voting_period: + type: string + description: Duration of the voting period. + nullable: true + deposit_params: + description: deposit_params defines the parameters related to deposit. + type: object + properties: + min_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: |- + Maximum period for Atom holders to deposit on a proposal. Initial value: 2 + months. + nullable: true + tally_params: + description: tally_params defines the parameters related to tally. + type: object + properties: + quorum: + type: string + format: byte + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + threshold: + type: string + format: byte + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + veto_threshold: + type: string + format: byte + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + nullable: true + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + cosmos.gov.v1beta1.QueryProposalResponse: + type: object + properties: + proposal: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + content: + description: content is the proposal's content. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + description: Proposal defines the core field members of a governance proposal. + nullable: true + description: QueryProposalResponse is the response type for the Query/Proposal RPC method. + cosmos.gov.v1beta1.QueryProposalsResponse: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + content: + description: content is the proposal's content. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + status: + description: status defines the proposal status. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: |- + final_tally_result is the final tally result of the proposal. When + querying a proposal via gRPC, this field is not populated until the + proposal's voting period has ended. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + submit_time: + type: string + format: date-time + description: submit_time is the time of proposal submission. + deposit_end_time: + type: string + format: date-time + description: deposit_end_time is the end time for deposition. + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: total_deposit is the total deposit on the proposal. + voting_start_time: + type: string + format: date-time + description: voting_start_time is the starting time to vote on a proposal. + voting_end_time: + type: string + format: date-time + description: voting_end_time is the end time of voting on a proposal. + description: Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryProposalsResponse is the response type for the Query/Proposals RPC + method. + cosmos.gov.v1beta1.QueryTallyResultResponse: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + nullable: true + description: QueryTallyResultResponse is the response type for the Query/Tally RPC method. + additionalProperties: false + cosmos.gov.v1beta1.QueryVoteResponse: + type: object + properties: + vote: + description: vote defines the queried vote. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + option: + description: |- + Deprecated: Prefer to use `options` instead. This field is set in queries + if and only if `len(options) == 1` and that option has weight 1. In all + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain duplicate vote + options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. + nullable: true + description: QueryVoteResponse is the response type for the Query/Vote RPC method. + additionalProperties: false + cosmos.gov.v1beta1.QueryVotesResponse: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + option: + description: |- + Deprecated: Prefer to use `options` instead. This field is set in queries + if and only if `len(options) == 1` and that option has weight 1. In all + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + options: + type: array + items: + type: object + properties: + option: + description: >- + option defines the valid vote options, it must not contain duplicate vote + options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + description: votes defines the queried votes. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: QueryVotesResponse is the response type for the Query/Votes RPC method. + additionalProperties: false + cosmos.gov.v1beta1.TallyParams: + type: object + properties: + quorum: + type: string + format: byte + description: |- + Minimum percentage of total stake needed to vote for a result to be + considered valid. + nullable: true + threshold: + type: string + format: byte + description: 'Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.' + nullable: true + veto_threshold: + type: string + format: byte + description: |- + Minimum value of Veto votes to Total votes ratio for proposal to be + vetoed. Default value: 1/3. + nullable: true + description: TallyParams defines the params for tallying votes on governance proposals. + additionalProperties: false + cosmos.gov.v1beta1.TallyResult: + type: object + properties: + 'yes': + type: string + description: yes is the number of yes votes on a proposal. + abstain: + type: string + description: abstain is the number of abstain votes on a proposal. + 'no': + type: string + description: no is the number of no votes on a proposal. + no_with_veto: + type: string + description: no_with_veto is the number of no with veto votes on a proposal. + description: TallyResult defines a standard tally for a governance proposal. + additionalProperties: false + cosmos.gov.v1beta1.Vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + voter: + type: string + description: voter is the voter address of the proposal. + option: + description: |- + Deprecated: Prefer to use `options` instead. This field is set in queries + if and only if `len(options) == 1` and that option has weight 1. In all + other cases, this field will default to VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + options: + type: array + items: + type: object + properties: + option: + description: option defines the valid vote options, it must not contain duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + description: options is the weighted vote options. + nullable: true + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + additionalProperties: false + cosmos.gov.v1beta1.VoteOption: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: |- + VoteOption enumerates the valid vote options for a given governance proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + cosmos.gov.v1beta1.VotingParams: + type: object + properties: + voting_period: + type: string + description: Duration of the voting period. + nullable: true + description: VotingParams defines the params for voting on governance proposals. + additionalProperties: false + cosmos.gov.v1beta1.WeightedVoteOption: + type: object + properties: + option: + description: option defines the valid vote options, it must not contain duplicate vote options. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + nullable: true + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + additionalProperties: false + cosmos.mint.v1beta1.Params: + type: object + properties: + mint_denom: + type: string + title: type of coin to mint + inflation_rate_change: + type: string + title: maximum annual change in inflation rate + inflation_max: + type: string + title: maximum inflation rate + inflation_min: + type: string + title: minimum inflation rate + goal_bonded: + type: string + title: goal of percent bonded atoms + blocks_per_year: + type: string + format: uint64 + title: expected blocks per year + max_supply: + type: string + description: |- + maximum supply for the token. + + A value of "0" indicates an unlimited (infinite) maximum supply. + description: Params defines the parameters for the x/mint module. + additionalProperties: false + cosmos.mint.v1beta1.QueryAnnualProvisionsResponse: + type: object + properties: + annual_provisions: + type: string + format: byte + description: annual_provisions is the current minting annual provisions value. + nullable: true + description: |- + QueryAnnualProvisionsResponse is the response type for the + Query/AnnualProvisions RPC method. + additionalProperties: false + cosmos.mint.v1beta1.QueryInflationResponse: + type: object + properties: + inflation: + type: string + format: byte + description: inflation is the current minting inflation value. + nullable: true + description: |- + QueryInflationResponse is the response type for the Query/Inflation RPC + method. + additionalProperties: false + cosmos.mint.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + mint_denom: + type: string + title: type of coin to mint + inflation_rate_change: + type: string + title: maximum annual change in inflation rate + inflation_max: + type: string + title: maximum inflation rate + inflation_min: + type: string + title: minimum inflation rate + goal_bonded: + type: string + title: goal of percent bonded atoms + blocks_per_year: + type: string + format: uint64 + title: expected blocks per year + max_supply: + type: string + description: |- + maximum supply for the token. + + A value of "0" indicates an unlimited (infinite) maximum supply. + nullable: true + description: QueryParamsResponse is the response type for the Query/Params RPC method. + additionalProperties: false + cosmos.slashing.v1beta1.Params: + type: object + properties: + signed_blocks_window: + type: string + format: int64 + min_signed_per_window: + type: string + format: byte + nullable: true + downtime_jail_duration: + type: string + nullable: true + slash_fraction_double_sign: + type: string + format: byte + nullable: true + slash_fraction_downtime: + type: string + format: byte + nullable: true + description: Params represents the parameters used for by the slashing module. + additionalProperties: false + cosmos.slashing.v1beta1.QueryParamsResponse: + type: object + properties: + params: + type: object + properties: + signed_blocks_window: + type: string + format: int64 + min_signed_per_window: + type: string + format: byte + downtime_jail_duration: + type: string + slash_fraction_double_sign: + type: string + format: byte + slash_fraction_downtime: + type: string + format: byte + description: Params represents the parameters used for by the slashing module. + nullable: true + title: QueryParamsResponse is the response type for the Query/Params RPC method + additionalProperties: false + cosmos.slashing.v1beta1.QuerySigningInfoResponse: + type: object + properties: + val_signing_info: + title: val_signing_info is the signing info of requested val cons address + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: Height at which validator was first a candidate OR was un-jailed + index_offset: + type: string + format: int64 + description: |- + Index which is incremented every time a validator is bonded in a block and + _may_ have signed a pre-commit or not. This in conjunction with the + signed_blocks_window param determines the index in the missed block bitmap. + jailed_until: + type: string + format: date-time + description: Timestamp until which the validator is jailed due to liveness downtime. + tombstoned: + type: boolean + description: |- + Whether or not a validator has been tombstoned (killed out of validator + set). It is set once the validator commits an equivocation or for any other + configured misbehavior. + missed_blocks_counter: + type: string + format: int64 + description: |- + A counter of missed (unsigned) blocks. It is used to avoid unnecessary + reads in the missed block bitmap. + description: |- + ValidatorSigningInfo defines a validator's signing info for monitoring their + liveness activity. + nullable: true + title: |- + QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC + method + additionalProperties: false + cosmos.slashing.v1beta1.QuerySigningInfosResponse: + type: object + properties: + info: + type: array + items: + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: Height at which validator was first a candidate OR was un-jailed + index_offset: + type: string + format: int64 + description: |- + Index which is incremented every time a validator is bonded in a block and + _may_ have signed a pre-commit or not. This in conjunction with the + signed_blocks_window param determines the index in the missed block bitmap. + jailed_until: + type: string + format: date-time + description: Timestamp until which the validator is jailed due to liveness downtime. + tombstoned: + type: boolean + description: |- + Whether or not a validator has been tombstoned (killed out of validator + set). It is set once the validator commits an equivocation or for any other + configured misbehavior. + missed_blocks_counter: + type: string + format: int64 + description: |- + A counter of missed (unsigned) blocks. It is used to avoid unnecessary + reads in the missed block bitmap. + description: |- + ValidatorSigningInfo defines a validator's signing info for monitoring their + liveness activity. + title: info is the signing info of all validators + nullable: true + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + nullable: true + title: |- + QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC + method + additionalProperties: false + cosmos.slashing.v1beta1.ValidatorSigningInfo: + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: Height at which validator was first a candidate OR was un-jailed + index_offset: + type: string + format: int64 + description: |- + Index which is incremented every time a validator is bonded in a block and + _may_ have signed a pre-commit or not. This in conjunction with the + signed_blocks_window param determines the index in the missed block bitmap. + jailed_until: + type: string + format: date-time + description: Timestamp until which the validator is jailed due to liveness downtime. + nullable: true + tombstoned: + type: boolean + description: |- + Whether or not a validator has been tombstoned (killed out of validator + set). It is set once the validator commits an equivocation or for any other + configured misbehavior. + missed_blocks_counter: + type: string + format: int64 + description: |- + A counter of missed (unsigned) blocks. It is used to avoid unnecessary + reads in the missed block bitmap. + description: |- + ValidatorSigningInfo defines a validator's signing info for monitoring their + liveness activity. + additionalProperties: false + cosmos.staking.v1beta1.BondStatus: + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + description: |- + BondStatus is the status of a validator. + + - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. + - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. + - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. + - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. + cosmos.staking.v1beta1.Commission: + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for creating a + validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever charge, as a + fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator commission, as a + fraction. + nullable: true + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + nullable: true + description: Commission defines commission parameters for a given validator. + additionalProperties: false + cosmos.staking.v1beta1.CommissionRates: + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever charge, as a + fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator commission, as a + fraction. + description: |- + CommissionRates defines the initial commission rates to be used for creating + a validator. + additionalProperties: false + cosmos.staking.v1beta1.Delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + additionalProperties: false + cosmos.staking.v1beta1.DelegationResponse: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + nullable: true + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + nullable: true + description: |- + DelegationResponse is equivalent to Delegation except that it contains a + balance in addition to shares which is more suitable for client responses. + additionalProperties: false + cosmos.staking.v1beta1.Description: + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + description: Description defines a validator description. + additionalProperties: false + cosmos.staking.v1beta1.HistoricalInfo: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + title: prev block info + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + nullable: true + valset: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech encoded in + JSON. + consensus_pubkey: + description: consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: jailed defined whether the validator has been jailed from bonded status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator has + begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to complete + unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for creating + a validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: min_self_delegation is the validator's self declared minimum self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by external + modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: list of unbonding ids, each uniquely identifying an unbonding of this validator + description: |- + Validator defines a validator, together with the total amount of the + Validator's bond shares and their exchange rate to coins. Slashing results in + a decrease in the exchange rate, allowing correct calculation of future + undelegations without iterating over delegators. When coins are delegated to + this validator, the validator is credited with a delegation whose number of + bond shares is based on the amount of coins delegated divided by the current + exchange rate. Voting power can be calculated as total bonded shares + multiplied by exchange rate. + nullable: true + description: |- + HistoricalInfo contains header and validator information for a given block. + It is stored as part of staking module's state, which persists the `n` most + recent HistoricalInfo + (`n` is set by the staking module's `historical_entries` parameter). + cosmos.staking.v1beta1.Params: + type: object + properties: + unbonding_time: + type: string + description: unbonding_time is the time duration of unbonding. + nullable: true + max_validators: + type: integer + format: int64 + description: max_validators is the maximum number of validators. + max_entries: + type: integer + format: int64 + description: >- + max_entries is the max entries for either unbonding delegation or redelegation (per + pair/trio). + historical_entries: + type: integer + format: int64 + description: historical_entries is the number of historical entries to persist. + bond_denom: + type: string + description: bond_denom defines the bondable coin denomination. + min_commission_rate: + type: string + title: >- + min_commission_rate is the chain-wide minimum commission rate that a validator can + charge their delegators + description: Params defines the parameters for the x/staking module. + additionalProperties: false + cosmos.staking.v1beta1.Pool: + type: object + properties: + not_bonded_tokens: + type: string + bonded_tokens: + type: string + description: |- + Pool is used for tracking bonded and not-bonded token supply of the bond + denomination. + additionalProperties: false + cosmos.staking.v1beta1.QueryDelegationResponse: + type: object + properties: + delegation_response: + description: delegation_responses defines the delegation info of a delegation. + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + nullable: true + description: QueryDelegationResponse is response type for the Query/Delegation RPC method. + additionalProperties: false + cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse: + type: object + properties: + delegation_responses: + type: array + items: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: |- + DelegationResponse is equivalent to Delegation except that it contains a + balance in addition to shares which is more suitable for client responses. + description: delegation_responses defines all the delegations' info of a delegator. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryDelegatorDelegationsResponse is response type for the + Query/DelegatorDelegations RPC method. + additionalProperties: false + cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to receive at + completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by external + modules + description: UnbondingDelegationEntry defines an unbonding object with relevant metadata. + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryUnbondingDelegatorDelegationsResponse is response type for the + Query/UnbondingDelegatorDelegations RPC method. + additionalProperties: false + cosmos.staking.v1beta1.QueryDelegatorValidatorResponse: + type: object + properties: + validator: + description: validator defines the validator info. + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech encoded in + JSON. + consensus_pubkey: + description: consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: jailed defined whether the validator has been jailed from bonded status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator has begun + unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to complete + unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for creating a + validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: min_self_delegation is the validator's self declared minimum self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: strictly positive if this validator's unbonding has been stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: list of unbonding ids, each uniquely identifying an unbonding of this validator + nullable: true + description: |- + QueryDelegatorValidatorResponse response type for the + Query/DelegatorValidator RPC method. + cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse: + type: object + properties: + validators: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech encoded in + JSON. + consensus_pubkey: + description: consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: jailed defined whether the validator has been jailed from bonded status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator has + begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to complete + unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for creating + a validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: min_self_delegation is the validator's self declared minimum self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by external + modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: list of unbonding ids, each uniquely identifying an unbonding of this validator + description: |- + Validator defines a validator, together with the total amount of the + Validator's bond shares and their exchange rate to coins. Slashing results in + a decrease in the exchange rate, allowing correct calculation of future + undelegations without iterating over delegators. When coins are delegated to + this validator, the validator is credited with a delegation whose number of + bond shares is based on the amount of coins delegated divided by the current + exchange rate. Voting power can be calculated as total bonded shares + multiplied by exchange rate. + description: validators defines the validators' info of a delegator. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryDelegatorValidatorsResponse is response type for the + Query/DelegatorValidators RPC method. + cosmos.staking.v1beta1.QueryHistoricalInfoResponse: + type: object + properties: + hist: + description: hist defines the historical info at the given height. + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + title: prev block info + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + data_hash: + type: string + format: byte + title: transactions + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + title: validators for the next block + consensus_hash: + type: string + format: byte + title: consensus params for current block + app_hash: + type: string + format: byte + title: state after txs from the previous block + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + proposer_address: + type: string + format: byte + title: original proposer of the block + description: Header defines the structure of a block header. + valset: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech encoded + in JSON. + consensus_pubkey: + description: >- + consensus_pubkey is the consensus public key of the validator, as a Protobuf + Any. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: >- + jailed defined whether the validator has been jailed from bonded status or + not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator has + begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to + complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for + creating a validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: min_self_delegation is the validator's self declared minimum self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by external + modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: >- + list of unbonding ids, each uniquely identifying an unbonding of this + validator + description: |- + Validator defines a validator, together with the total amount of the + Validator's bond shares and their exchange rate to coins. Slashing results in + a decrease in the exchange rate, allowing correct calculation of future + undelegations without iterating over delegators. When coins are delegated to + this validator, the validator is credited with a delegation whose number of + bond shares is based on the amount of coins delegated divided by the current + exchange rate. Voting power can be calculated as total bonded shares + multiplied by exchange rate. + nullable: true + description: |- + QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC + method. + cosmos.staking.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + unbonding_time: + type: string + description: unbonding_time is the time duration of unbonding. + max_validators: + type: integer + format: int64 + description: max_validators is the maximum number of validators. + max_entries: + type: integer + format: int64 + description: >- + max_entries is the max entries for either unbonding delegation or redelegation (per + pair/trio). + historical_entries: + type: integer + format: int64 + description: historical_entries is the number of historical entries to persist. + bond_denom: + type: string + description: bond_denom defines the bondable coin denomination. + min_commission_rate: + type: string + title: >- + min_commission_rate is the chain-wide minimum commission rate that a validator can + charge their delegators + nullable: true + description: QueryParamsResponse is response type for the Query/Params RPC method. + additionalProperties: false + cosmos.staking.v1beta1.QueryPoolResponse: + type: object + properties: + pool: + description: pool defines the pool info. + type: object + properties: + not_bonded_tokens: + type: string + bonded_tokens: + type: string + nullable: true + description: QueryPoolResponse is response type for the Query/Pool RPC method. + additionalProperties: false + cosmos.staking.v1beta1.QueryRedelegationsResponse: + type: object + properties: + redelegation_responses: + type: array + items: + type: object + properties: + redelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_src_address: + type: string + description: validator_src_address is the validator redelegation source operator address. + validator_dst_address: + type: string + description: >- + validator_dst_address is the validator redelegation destination operator + address. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created by + redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by external + modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + description: |- + entries are the redelegation entries. + + redelegation entries + description: |- + Redelegation contains the list of a particular delegator's redelegating bonds + from a particular source validator to a particular destination validator. + entries: + type: array + items: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created by + redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by external + modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + balance: + type: string + description: |- + RedelegationEntryResponse is equivalent to a RedelegationEntry except that it + contains a balance in addition to shares which is more suitable for client + responses. + description: |- + RedelegationResponse is equivalent to a Redelegation except that its entries + contain a balance in addition to shares which is more suitable for client + responses. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryRedelegationsResponse is response type for the Query/Redelegations RPC + method. + additionalProperties: false + cosmos.staking.v1beta1.QueryUnbondingDelegationResponse: + type: object + properties: + unbond: + description: unbond defines the unbonding information of a delegation. + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to receive at + completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by external + modules + description: UnbondingDelegationEntry defines an unbonding object with relevant metadata. + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + nullable: true + description: |- + QueryDelegationResponse is response type for the Query/UnbondingDelegation + RPC method. + additionalProperties: false + cosmos.staking.v1beta1.QueryValidatorDelegationsResponse: + type: object + properties: + delegation_responses: + type: array + items: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + shares: + type: string + description: shares define the delegation shares received. + description: |- + Delegation represents the bond with tokens held by an account. It is + owned by one delegator, and is associated with the voting power of one + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: |- + DelegationResponse is equivalent to Delegation except that it contains a + balance in addition to shares which is more suitable for client responses. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + title: |- + QueryValidatorDelegationsResponse is response type for the + Query/ValidatorDelegations RPC method + additionalProperties: false + cosmos.staking.v1beta1.QueryValidatorResponse: + type: object + properties: + validator: + description: validator defines the validator info. + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech encoded in + JSON. + consensus_pubkey: + description: consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: jailed defined whether the validator has been jailed from bonded status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator has begun + unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to complete + unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for creating a + validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: min_self_delegation is the validator's self declared minimum self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: strictly positive if this validator's unbonding has been stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: list of unbonding ids, each uniquely identifying an unbonding of this validator + nullable: true + title: QueryValidatorResponse is response type for the Query/Validator RPC method + cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially scheduled to receive at + completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by external + modules + description: UnbondingDelegationEntry defines an unbonding object with relevant metadata. + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + description: |- + QueryValidatorUnbondingDelegationsResponse is response type for the + Query/ValidatorUnbondingDelegations RPC method. + additionalProperties: false + cosmos.staking.v1beta1.QueryValidatorsResponse: + type: object + properties: + validators: + type: array + items: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's operator; bech encoded in + JSON. + consensus_pubkey: + description: consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + jailed: + type: boolean + description: jailed defined whether the validator has been jailed from bonded status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator has + begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to complete + unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for creating + a validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever + charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator + commission, as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + min_self_delegation: + type: string + description: min_self_delegation is the validator's self declared minimum self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + strictly positive if this validator's unbonding has been stopped by external + modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: list of unbonding ids, each uniquely identifying an unbonding of this validator + description: |- + Validator defines a validator, together with the total amount of the + Validator's bond shares and their exchange rate to coins. Slashing results in + a decrease in the exchange rate, allowing correct calculation of future + undelegations without iterating over delegators. When coins are delegated to + this validator, the validator is credited with a delegation whose number of + bond shares is based on the amount of coins delegated divided by the current + exchange rate. Voting power can be calculated as total bonded shares + multiplied by exchange rate. + description: validators contains all the queried validators. + nullable: true + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + title: QueryValidatorsResponse is response type for the Query/Validators RPC method + cosmos.staking.v1beta1.Redelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_src_address: + type: string + description: validator_src_address is the validator redelegation source operator address. + validator_dst_address: + type: string + description: validator_dst_address is the validator redelegation destination operator address. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: shares_dst is the amount of destination-validator shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: Strictly positive if this entry's unbonding has been stopped by external modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + description: |- + entries are the redelegation entries. + + redelegation entries + nullable: true + description: |- + Redelegation contains the list of a particular delegator's redelegating bonds + from a particular source validator to a particular destination validator. + additionalProperties: false + cosmos.staking.v1beta1.RedelegationEntry: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + nullable: true + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: shares_dst is the amount of destination-validator shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: Strictly positive if this entry's unbonding has been stopped by external modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + additionalProperties: false + cosmos.staking.v1beta1.RedelegationEntryResponse: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: shares_dst is the amount of destination-validator shares created by redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: Strictly positive if this entry's unbonding has been stopped by external modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + nullable: true + balance: + type: string + description: |- + RedelegationEntryResponse is equivalent to a RedelegationEntry except that it + contains a balance in addition to shares which is more suitable for client + responses. + additionalProperties: false + cosmos.staking.v1beta1.RedelegationResponse: + type: object + properties: + redelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_src_address: + type: string + description: validator_src_address is the validator redelegation source operator address. + validator_dst_address: + type: string + description: validator_dst_address is the validator redelegation destination operator address. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created by + redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by external + modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + description: |- + entries are the redelegation entries. + + redelegation entries + description: |- + Redelegation contains the list of a particular delegator's redelegating bonds + from a particular source validator to a particular destination validator. + nullable: true + entries: + type: array + items: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height defines the height which the redelegation took place. + completion_time: + type: string + format: date-time + description: completion_time defines the unix time for redelegation completion. + initial_balance: + type: string + description: initial_balance defines the initial balance when redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of destination-validator shares created by + redelegation. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: >- + Strictly positive if this entry's unbonding has been stopped by external + modules + description: RedelegationEntry defines a redelegation object with relevant metadata. + balance: + type: string + description: |- + RedelegationEntryResponse is equivalent to a RedelegationEntry except that it + contains a balance in addition to shares which is more suitable for client + responses. + nullable: true + description: |- + RedelegationResponse is equivalent to a Redelegation except that its entries + contain a balance in addition to shares which is more suitable for client + responses. + additionalProperties: false + cosmos.staking.v1beta1.UnbondingDelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the encoded address of the delegator. + validator_address: + type: string + description: validator_address is the encoded address of the validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + initial_balance: + type: string + description: initial_balance defines the tokens initially scheduled to receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: Strictly positive if this entry's unbonding has been stopped by external modules + description: UnbondingDelegationEntry defines an unbonding object with relevant metadata. + description: |- + entries are the unbonding delegation entries. + + unbonding delegation entries + nullable: true + description: |- + UnbondingDelegation stores all of a single delegator's unbonding bonds + for a single validator in an time-ordered list. + additionalProperties: false + cosmos.staking.v1beta1.UnbondingDelegationEntry: + type: object + properties: + creation_height: + type: string + format: int64 + description: creation_height is the height which the unbonding took place. + completion_time: + type: string + format: date-time + description: completion_time is the unix time for unbonding completion. + nullable: true + initial_balance: + type: string + description: initial_balance defines the tokens initially scheduled to receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + unbonding_id: + type: string + format: uint64 + title: Incrementing id that uniquely identifies this entry + unbonding_on_hold_ref_count: + type: string + format: int64 + title: Strictly positive if this entry's unbonding has been stopped by external modules + description: UnbondingDelegationEntry defines an unbonding object with relevant metadata. + additionalProperties: false + cosmos.staking.v1beta1.Validator: + type: object + properties: + operator_address: + type: string + description: operator_address defines the address of the validator's operator; bech encoded in JSON. + consensus_pubkey: + description: consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + jailed: + type: boolean + description: jailed defined whether the validator has been jailed from bonded status or not. + status: + description: status is the validator status (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + nullable: true + tokens: + type: string + description: tokens define the delegated tokens (incl. self-delegation). + delegator_shares: + type: string + description: delegator_shares defines total shares issued to a validator's delegators. + description: + description: description defines the description terms for the validator. + type: object + properties: + moniker: + type: string + description: moniker defines a human-readable name for the validator. + identity: + type: string + description: identity defines an optional identity signature (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: security_contact defines an optional email for security contact. + details: + type: string + description: details define other optional details. + nullable: true + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at which this validator has begun + unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the validator to complete + unbonding. + nullable: true + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates to be used for creating a + validator. + type: object + properties: + rate: + type: string + description: rate is the commission rate charged to delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which validator can ever charge, as + a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase of the validator commission, + as a fraction. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + nullable: true + min_self_delegation: + type: string + description: min_self_delegation is the validator's self declared minimum self delegation. + unbonding_on_hold_ref_count: + type: string + format: int64 + title: strictly positive if this validator's unbonding has been stopped by external modules + unbonding_ids: + type: array + items: + type: string + format: uint64 + title: list of unbonding ids, each uniquely identifying an unbonding of this validator + description: |- + Validator defines a validator, together with the total amount of the + Validator's bond shares and their exchange rate to coins. Slashing results in + a decrease in the exchange rate, allowing correct calculation of future + undelegations without iterating over delegators. When coins are delegated to + this validator, the validator is credited with a delegation whose number of + bond shares is based on the amount of coins delegated divided by the current + exchange rate. Voting power can be calculated as total bonded shares + multiplied by exchange rate. + cosmos.base.abci.v1beta1.ABCIMessageLog: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + description: |- + Events contains a slice of Event objects that were emitted during some + execution. + nullable: true + description: ABCIMessageLog defines a structure containing an indexed tx ABCI message log. + additionalProperties: false + cosmos.base.abci.v1beta1.Attribute: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + additionalProperties: false + cosmos.base.abci.v1beta1.GasInfo: + type: object + properties: + gas_wanted: + type: string + format: uint64 + description: GasWanted is the maximum units of work we allow this tx to perform. + gas_used: + type: string + format: uint64 + description: GasUsed is the amount of gas actually consumed. + description: GasInfo defines tx execution gas context. + additionalProperties: false + cosmos.base.abci.v1beta1.Result: + type: object + properties: + data: + type: string + format: byte + description: |- + Data is any data returned from message or handler execution. It MUST be + length prefixed in order to separate data from multiple message executions. + Deprecated. This field is still populated, but prefer msg_response instead + because it also contains the Msg response typeURL. + nullable: true + log: + type: string + description: Log contains the log information from message or handler execution. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + description: |- + Events contains a slice of Event objects that were emitted during message + or handler execution. + nullable: true + msg_responses: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: msg_responses contains the Msg handler responses type packed in Anys. + nullable: true + description: Result is the union of ResponseFormat and ResponseCheckTx. + cosmos.base.abci.v1beta1.StringEvent: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + nullable: true + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + additionalProperties: false + cosmos.base.abci.v1beta1.TxResponse: + type: object + properties: + height: + type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: Result bytes, if any. + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + description: |- + Events contains a slice of Event objects that were emitted during some + execution. + description: ABCIMessageLog defines a structure containing an indexed tx ABCI message log. + description: The output of the application's logger (typed). May be non-deterministic. + nullable: true + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + description: The request transaction bytes. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + timestamp: + type: string + description: |- + Time of the previous block. For heights > 1, it's the weighted median of + the timestamps of the valid votes in the block.LastCommit. For height == 1, + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + description: |- + Events defines all the events emitted by processing a transaction. Note, + these events include those emitted by processing all the messages and those + emitted from the ante. Whereas Logs contains the events, with + additional metadata, emitted only by processing the messages. + nullable: true + description: |- + TxResponse defines a structure containing relevant tx data and metadata. The + tags are stringified and the log is JSON decoded. + cosmos.crypto.multisig.v1beta1.CompactBitArray: + type: object + properties: + extra_bits_stored: + type: integer + format: int64 + elems: + type: string + format: byte + nullable: true + description: |- + CompactBitArray is an implementation of a space efficient bit array. + This is used to ensure that the encoded data takes up a minimal amount of + space after proto encoding. + This is not thread safe, and is not intended for concurrent usage. + additionalProperties: false + cosmos.tx.signing.v1beta1.SignMode: + type: string + enum: + - SIGN_MODE_UNSPECIFIED + - SIGN_MODE_DIRECT + - SIGN_MODE_TEXTUAL + - SIGN_MODE_DIRECT_AUX + - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 + default: SIGN_MODE_UNSPECIFIED + description: |- + SignMode represents a signing mode with its own security guarantees. + + This enum should be considered a registry of all known sign modes + in the Cosmos ecosystem. Apps are not expected to support all known + sign modes. Apps that would like to support custom sign modes are + encouraged to open a small PR against this file to add a new case + to this SignMode enum describing their sign mode so that different + apps have a consistent version of this enum. + + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected. + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx. + - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some + human-readable textual representation on top of the binary representation + from SIGN_MODE_DIRECT. + + Since: cosmos-sdk 0.50 + - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not + require signers signing over other signers' `signer_info`. + + Since: cosmos-sdk 0.46 + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future. + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + but is not implemented on the SDK by default. To enable EIP-191, you need + to pass a custom `TxConfig` that has an implementation of + `SignModeHandler` for EIP-191. The SDK may decide to fully support + EIP-191 in the future. + + Since: cosmos-sdk 0.45.2 + cosmos.tx.v1beta1.AuthInfo: + type: object + properties: + signer_infos: + type: array + items: + type: object + $ref: '#/components/schemas/cosmos.tx.v1beta1.SignerInfo' + description: |- + signer_infos defines the signing modes for the required signers. The number + and order of elements must match the required signers from TxBody's + messages. The first element is the primary signer and the one which pays + the fee. + nullable: true + fee: + description: |- + Fee is the fee and gas limit for the transaction. The first signer is the + primary signer and the one which pays the fee. The fee can be calculated + based on the cost of evaluating the body and doing signature verification + of the signers. This can be estimated via simulation. + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + title: amount is the amount of coins to be paid as a fee + nullable: true + gas_limit: + type: string + format: uint64 + title: |- + gas_limit is the maximum gas that can be used in transaction processing + before an out of gas error occurs + payer: + type: string + description: |- + if unset, the first signer is responsible for paying the fees. If set, the + specified account must pay the fees. the payer must be a tx signer (and + thus have signed this field in AuthInfo). setting this field does *not* + change the ordering of required signers for the transaction. + granter: + type: string + title: |- + if set, the fee payer (either the first signer or the value of the payer + field) requests that a fee grant be used to pay fees instead of the fee + payer's own balance. If an appropriate fee grant does not exist or the + chain does not support fee grants, this will fail + nullable: true + additionalProperties: false + tip: + description: |- + Tip is the optional tip used for transactions fees paid in another denom. + + This field is ignored if the chain didn't enable tips, i.e. didn't add the + `TipDecorator` in its posthandler. + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + additionalProperties: false + title: amount is the amount of the tip + nullable: true + tipper: + type: string + title: tipper is the address of the account paying for the tip + nullable: true + additionalProperties: false + description: |- + AuthInfo describes the fee and signer modes that are used to sign a + transaction. + additionalProperties: false + cosmos.tx.v1beta1.BroadcastMode: + type: string + enum: + - BROADCAST_MODE_UNSPECIFIED + - BROADCAST_MODE_BLOCK + - BROADCAST_MODE_SYNC + - BROADCAST_MODE_ASYNC + default: BROADCAST_MODE_UNSPECIFIED + description: |- + BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC + method. + + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, + BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. + - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits + for a CheckTx execution response only. + - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client + returns immediately. + cosmos.tx.v1beta1.BroadcastTxRequest: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + nullable: true + mode: + type: string + enum: + - BROADCAST_MODE_UNSPECIFIED + - BROADCAST_MODE_BLOCK + - BROADCAST_MODE_SYNC + - BROADCAST_MODE_ASYNC + default: BROADCAST_MODE_UNSPECIFIED + description: |- + BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC + method. + + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, + BROADCAST_MODE_BLOCK is not supported by the SDK from v0.47.x onwards. + - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits + for a CheckTx execution response only. + - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client + returns immediately. + nullable: true + description: |- + BroadcastTxRequest is the request type for the Service.BroadcastTxRequest + RPC method. + additionalProperties: false + cosmos.tx.v1beta1.BroadcastTxResponse: + type: object + properties: + tx_response: + description: tx_response is the queried TxResponses. + type: object + properties: + height: + type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: Result bytes, if any. + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + description: |- + Events contains a slice of Event objects that were emitted during some + execution. + description: ABCIMessageLog defines a structure containing an indexed tx ABCI message log. + description: The output of the application's logger (typed). May be non-deterministic. + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + description: The request transaction bytes. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + timestamp: + type: string + description: |- + Time of the previous block. For heights > 1, it's the weighted median of + the timestamps of the valid votes in the block.LastCommit. For height == 1, + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + description: |- + Events defines all the events emitted by processing a transaction. Note, + these events include those emitted by processing all the messages and those + emitted from the ante. Whereas Logs contains the events, with + additional metadata, emitted only by processing the messages. + nullable: true + description: |- + BroadcastTxResponse is the response type for the + Service.BroadcastTx method. + cosmos.tx.v1beta1.Fee: + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: amount is the amount of coins to be paid as a fee + nullable: true + gas_limit: + type: string + format: uint64 + title: |- + gas_limit is the maximum gas that can be used in transaction processing + before an out of gas error occurs + payer: + type: string + description: |- + if unset, the first signer is responsible for paying the fees. If set, the + specified account must pay the fees. the payer must be a tx signer (and + thus have signed this field in AuthInfo). setting this field does *not* + change the ordering of required signers for the transaction. + granter: + type: string + title: |- + if set, the fee payer (either the first signer or the value of the payer + field) requests that a fee grant be used to pay fees instead of the fee + payer's own balance. If an appropriate fee grant does not exist or the + chain does not support fee grants, this will fail + description: |- + Fee includes the amount of coins paid in fees and the maximum + gas to be used by the transaction. The ratio yields an effective "gasprice", + which must be above some minimum to be accepted into the mempool. + additionalProperties: false + cosmos.tx.v1beta1.GetBlockWithTxsResponse: + type: object + properties: + txs: + type: array + items: + type: object + $ref: '#/components/schemas/cosmos.tx.v1beta1.Tx' + description: txs are the transactions in the block. + nullable: true + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: |- + Consensus captures the consensus rules for processing a block in the blockchain, + including all blockchain data structures and the rules of the application's + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: root hash of all results from the txs from the previous block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: |- + Txs that will be applied by state @ block.Height+1. + NOTE: not all txs here are valid. We're just agreeing on the order first. + This means that block.AppHash does not include these txs. + nullable: true + title: Data contains the set of transactions included in the block + nullable: true + additionalProperties: false + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + nullable: true + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + nullable: true + additionalProperties: false + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + nullable: true + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + description: zero if vote is nil. + nullable: true + additionalProperties: false + timestamp: + type: string + format: date-time + nullable: true + validator_address: + type: string + format: byte + nullable: true + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote signature by the validator if they participated in consensus + for the + + associated block. + nullable: true + extension: + type: string + format: byte + description: >- + Vote extension provided by the application. Only valid for + precommit + + messages. + nullable: true + extension_signature: + type: string + format: byte + description: |- + Vote extension signature by the validator if they participated in + consensus for the associated block. + Only valid for precommit messages. + nullable: true + description: |- + Vote represents a prevote or precommit vote from validators for + consensus. + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + nullable: true + additionalProperties: false + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a + block in the blockchain, + + including all blockchain data structures and the rules of + the application's + + state transition machine. + nullable: true + additionalProperties: false + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + nullable: true + last_block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + last_commit_hash: + type: string + format: byte + description: commit from validators from the last block + title: hashes of block data + nullable: true + data_hash: + type: string + format: byte + title: transactions + nullable: true + validators_hash: + type: string + format: byte + description: validators for the current block + title: hashes from the app output from the prev block + nullable: true + next_validators_hash: + type: string + format: byte + title: validators for the next block + nullable: true + consensus_hash: + type: string + format: byte + title: consensus params for current block + nullable: true + app_hash: + type: string + format: byte + title: state after txs from the previous block + nullable: true + last_results_hash: + type: string + format: byte + title: >- + root hash of all results from the txs from the previous + block + nullable: true + evidence_hash: + type: string + format: byte + description: evidence included in the block + title: consensus info + nullable: true + proposer_address: + type: string + format: byte + title: original proposer of the block + nullable: true + description: Header defines the structure of a block header. + nullable: true + additionalProperties: false + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: >- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error + condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: >- + BlockIdFlag indicates which BlockID the signature is + for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: CommitSig is a part of the Vote included in a Commit. + additionalProperties: false + nullable: true + description: >- + Commit contains the evidence that a block was committed by a + set of validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use with + Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + proposer: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: >- + PublicKey defines the keys available for use with + Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + nullable: true + additionalProperties: false + total_voting_power: + type: string + format: int64 + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + nullable: true + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + nullable: true + secp256k1: + type: string + format: byte + nullable: true + title: PublicKey defines the keys available for use with Validators + nullable: true + additionalProperties: false + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + additionalProperties: false + nullable: true + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + nullable: true + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + nullable: true + additionalProperties: false + additionalProperties: false + nullable: true + nullable: true + additionalProperties: false + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + nullable: true + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + nullable: true + title: PartsetHeader + nullable: true + additionalProperties: false + title: BlockID + nullable: true + additionalProperties: false + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + description: |- + - BLOCK_ID_FLAG_UNKNOWN: indicates an error condition + - BLOCK_ID_FLAG_ABSENT: the vote was not received + - BLOCK_ID_FLAG_COMMIT: voted for the block that received the majority + - BLOCK_ID_FLAG_NIL: voted for nil + title: BlockIdFlag indicates which BlockID the signature is for + nullable: true + validator_address: + type: string + format: byte + nullable: true + timestamp: + type: string + format: date-time + nullable: true + signature: + type: string + format: byte + nullable: true + description: CommitSig is a part of the Vote included in a Commit. + additionalProperties: false + nullable: true + description: Commit contains the evidence that a block was committed by a set of validators. + nullable: true + additionalProperties: false + nullable: true + additionalProperties: false + pagination: + description: pagination defines a pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + description: |- + GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs + method. + additionalProperties: false + cosmos.tx.v1beta1.GetTxResponse: + type: object + properties: + tx: + $ref: '#/components/schemas/cosmos.tx.v1beta1.Tx' + description: tx is the queried transaction. + nullable: true + tx_response: + description: tx_response is the queried TxResponses. + type: object + properties: + height: + type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: Result bytes, if any. + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + additionalProperties: false + nullable: true + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + additionalProperties: false + description: |- + Events contains a slice of Event objects that were emitted during some + execution. + nullable: true + description: ABCIMessageLog defines a structure containing an indexed tx ABCI message log. + additionalProperties: false + description: The output of the application's logger (typed). May be non-deterministic. + nullable: true + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + description: The request transaction bytes. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + timestamp: + type: string + description: |- + Time of the previous block. For heights > 1, it's the weighted median of + the timestamps of the valid votes in the block.LastCommit. For height == 1, + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + additionalProperties: false + nullable: true + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + additionalProperties: false + description: |- + Events defines all the events emitted by processing a transaction. Note, + these events include those emitted by processing all the messages and those + emitted from the ante. Whereas Logs contains the events, with + additional metadata, emitted only by processing the messages. + nullable: true + nullable: true + description: GetTxResponse is the response type for the Service.GetTx method. + additionalProperties: false + cosmos.tx.v1beta1.GetTxsEventResponse: + type: object + properties: + txs: + type: array + items: + type: object + $ref: '#/components/schemas/cosmos.tx.v1beta1.Tx' + description: txs is the list of queried transactions. + nullable: true + tx_responses: + type: array + items: + type: object + properties: + height: + type: string + format: int64 + title: The block height + txhash: + type: string + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: Result bytes, if any. + raw_log: + type: string + description: |- + The output of the application's logger (raw string). May be + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: |- + Attribute defines an attribute wrapper where the key and value are + strings instead of raw bytes. + additionalProperties: false + nullable: true + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + additionalProperties: false + description: |- + Events contains a slice of Event objects that were emitted during some + execution. + nullable: true + description: ABCIMessageLog defines a structure containing an indexed tx ABCI message log. + additionalProperties: false + description: The output of the application's logger (typed). May be non-deterministic. + nullable: true + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + description: The request transaction bytes. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + timestamp: + type: string + description: |- + Time of the previous block. For heights > 1, it's the weighted median of + the timestamps of the valid votes in the block.LastCommit. For height == 1, + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + additionalProperties: false + nullable: true + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + additionalProperties: false + description: |- + Events defines all the events emitted by processing a transaction. Note, + these events include those emitted by processing all the messages and those + emitted from the ante. Whereas Logs contains the events, with + additional metadata, emitted only by processing the messages. + nullable: true + description: |- + TxResponse defines a structure containing relevant tx data and metadata. The + tags are stringified and the log is JSON decoded. + description: tx_responses is the list of queried TxResponses. + nullable: true + pagination: + description: |- + pagination defines a pagination for the response. + Deprecated post v0.46.x: use total instead. + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + nullable: true + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + nullable: true + additionalProperties: false + total: + type: string + format: uint64 + title: total is total number of results available + description: |- + GetTxsEventResponse is the response type for the Service.TxsByEvents + RPC method. + additionalProperties: false + cosmos.tx.v1beta1.ModeInfo: + type: object + properties: + single: + title: single represents a single signer + type: object + properties: + mode: + title: mode is the signing mode of the single signer + type: string + enum: + - SIGN_MODE_UNSPECIFIED + - SIGN_MODE_DIRECT + - SIGN_MODE_TEXTUAL + - SIGN_MODE_DIRECT_AUX + - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 + default: SIGN_MODE_UNSPECIFIED + description: |- + SignMode represents a signing mode with its own security guarantees. + + This enum should be considered a registry of all known sign modes + in the Cosmos ecosystem. Apps are not expected to support all known + sign modes. Apps that would like to support custom sign modes are + encouraged to open a small PR against this file to add a new case + to this SignMode enum describing their sign mode so that different + apps have a consistent version of this enum. + + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected. + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx. + - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some + human-readable textual representation on top of the binary representation + from SIGN_MODE_DIRECT. + + Since: cosmos-sdk 0.50 + - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not + require signers signing over other signers' `signer_info`. + + Since: cosmos-sdk 0.46 + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future. + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + but is not implemented on the SDK by default. To enable EIP-191, you need + to pass a custom `TxConfig` that has an implementation of + `SignModeHandler` for EIP-191. The SDK may decide to fully support + EIP-191 in the future. + + Since: cosmos-sdk 0.45.2 + nullable: true + nullable: true + additionalProperties: false + multi: + $ref: '#/components/schemas/cosmos.tx.v1beta1.ModeInfo.Multi' + title: multi represents a nested multisig signer + nullable: true + description: ModeInfo describes the signing mode of a single or nested multisig signer. + additionalProperties: false + cosmos.tx.v1beta1.ModeInfo.Multi: + type: object + properties: + bitarray: + title: bitarray specifies which keys within the multisig are signing + type: object + properties: + extra_bits_stored: + type: integer + format: int64 + elems: + type: string + format: byte + nullable: true + description: |- + CompactBitArray is an implementation of a space efficient bit array. + This is used to ensure that the encoded data takes up a minimal amount of + space after proto encoding. + This is not thread safe, and is not intended for concurrent usage. + nullable: true + additionalProperties: false + mode_infos: + type: array + items: + type: object + $ref: '#/components/schemas/cosmos.tx.v1beta1.ModeInfo' + title: |- + mode_infos is the corresponding modes of the signers of the multisig + which could include nested multisig public keys + nullable: true + title: Multi is the mode info for a multisig public key + additionalProperties: false + cosmos.tx.v1beta1.ModeInfo.Single: + type: object + properties: + mode: + title: mode is the signing mode of the single signer + type: string + enum: + - SIGN_MODE_UNSPECIFIED + - SIGN_MODE_DIRECT + - SIGN_MODE_TEXTUAL + - SIGN_MODE_DIRECT_AUX + - SIGN_MODE_LEGACY_AMINO_JSON + - SIGN_MODE_EIP_191 + default: SIGN_MODE_UNSPECIFIED + description: |- + SignMode represents a signing mode with its own security guarantees. + + This enum should be considered a registry of all known sign modes + in the Cosmos ecosystem. Apps are not expected to support all known + sign modes. Apps that would like to support custom sign modes are + encouraged to open a small PR against this file to add a new case + to this SignMode enum describing their sign mode so that different + apps have a consistent version of this enum. + + - SIGN_MODE_UNSPECIFIED: SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be + rejected. + - SIGN_MODE_DIRECT: SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is + verified with raw bytes from Tx. + - SIGN_MODE_TEXTUAL: SIGN_MODE_TEXTUAL is a future signing mode that will verify some + human-readable textual representation on top of the binary representation + from SIGN_MODE_DIRECT. + + Since: cosmos-sdk 0.50 + - SIGN_MODE_DIRECT_AUX: SIGN_MODE_DIRECT_AUX specifies a signing mode which uses + SignDocDirectAux. As opposed to SIGN_MODE_DIRECT, this sign mode does not + require signers signing over other signers' `signer_info`. + + Since: cosmos-sdk 0.46 + - SIGN_MODE_LEGACY_AMINO_JSON: SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses + Amino JSON and will be removed in the future. + - SIGN_MODE_EIP_191: SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos + SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 + + Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, + but is not implemented on the SDK by default. To enable EIP-191, you need + to pass a custom `TxConfig` that has an implementation of + `SignModeHandler` for EIP-191. The SDK may decide to fully support + EIP-191 in the future. + + Since: cosmos-sdk 0.45.2 + nullable: true + title: |- + Single is the mode info for a single signer. It is structured as a message + to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the + future + additionalProperties: false + cosmos.tx.v1beta1.OrderBy: + type: string + enum: + - ORDER_BY_UNSPECIFIED + - ORDER_BY_ASC + - ORDER_BY_DESC + default: ORDER_BY_UNSPECIFIED + description: >- + - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy + defaults + + to ASC in this case. + - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order + - ORDER_BY_DESC: ORDER_BY_DESC defines descending order + title: OrderBy defines the sorting order + cosmos.tx.v1beta1.SignerInfo: + type: object + properties: + public_key: + description: |- + public_key is the public key of the signer. It is optional for accounts + that already exist in state. If unset, the verifier can use the required \ + signer address for this position and lookup the public key. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + mode_info: + $ref: '#/components/schemas/cosmos.tx.v1beta1.ModeInfo' + title: |- + mode_info describes the signing mode of the signer and is a nested + structure to support nested multisig pubkey's + nullable: true + sequence: + type: string + format: uint64 + description: |- + sequence is the sequence of the account, which describes the + number of committed transactions signed by a given address. It is used to + prevent replay attacks. + description: |- + SignerInfo describes the public key and signing mode of a single top-level + signer. + cosmos.tx.v1beta1.SimulateRequest: + type: object + properties: + tx: + $ref: '#/components/schemas/cosmos.tx.v1beta1.Tx' + description: |- + tx is the transaction to simulate. + Deprecated. Send raw tx bytes instead. + nullable: true + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + nullable: true + description: |- + SimulateRequest is the request type for the Service.Simulate + RPC method. + cosmos.tx.v1beta1.SimulateResponse: + type: object + properties: + gas_info: + description: gas_info is the information about gas used in the simulation. + type: object + properties: + gas_wanted: + type: string + format: uint64 + description: GasWanted is the maximum units of work we allow this tx to perform. + gas_used: + type: string + format: uint64 + description: GasUsed is the amount of gas actually consumed. + nullable: true + result: + description: result is the result of the simulation. + type: object + properties: + data: + type: string + format: byte + description: |- + Data is any data returned from message or handler execution. It MUST be + length prefixed in order to separate data from multiple message executions. + Deprecated. This field is still populated, but prefer msg_response instead + because it also contains the Msg response typeURL. + log: + type: string + description: Log contains the log information from message or handler execution. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + index: + type: boolean + title: nondeterministic + description: EventAttribute is a single key-value pair, associated with an event. + description: |- + Event allows application developers to attach additional information to + ResponseFinalizeBlock and ResponseCheckTx. + Later, transactions may be queried using these events. + description: |- + Events contains a slice of Event objects that were emitted during message + or handler execution. + msg_responses: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: msg_responses contains the Msg handler responses type packed in Anys. + nullable: true + description: |- + SimulateResponse is the response type for the + Service.SimulateRPC method. + cosmos.tx.v1beta1.Tip: + type: object + properties: + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: amount is the amount of the tip + nullable: true + tipper: + type: string + title: tipper is the address of the account paying for the tip + description: Tip is the tip used for meta-transactions. + additionalProperties: false + cosmos.tx.v1beta1.Tx: + type: object + properties: + body: + title: body is the processable content of the transaction + type: object + properties: + messages: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: |- + messages is a list of messages to be executed. The required signers of + those messages define the number and order of elements in AuthInfo's + signer_infos and Tx's signatures. Each required signer address is added to + the list only the first time it occurs. + By convention, the first required signer (usually from the first message) + is referred to as the primary signer and pays the fee for the whole + transaction. + nullable: true + memo: + type: string + description: |- + memo is any arbitrary note/comment to be added to the transaction. + WARNING: in clients, any publicly exposed text should not be called memo, + but should be called `note` instead (see + https://github.com/cosmos/cosmos-sdk/issues/9122). + timeout_height: + type: string + format: uint64 + description: |- + timeout_height is the block height after which this transaction will not + be processed by the chain. + unordered: + type: boolean + description: >- + unordered, when set to true, indicates that the transaction signer(s) + + intend for the transaction to be evaluated and executed in an un-ordered + + fashion. Specifically, the account's nonce will NOT be checked or + + incremented, which allows for fire-and-forget as well as concurrent + + transaction execution. + + + Note, when set to true, the existing 'timeout_timestamp' value must + + be set and will be used to correspond to a timestamp in which the transaction is + deemed + + valid. + + + When true, the sequence value MUST be 0, and any transaction with unordered=true and + a non-zero sequence value will + + be rejected. + + External services that make assumptions about sequence values may need to be updated + because of this. + timeout_timestamp: + type: string + format: date-time + description: |- + timeout_timestamp is the block time after which this transaction will not + be processed by the chain. + + Note, if unordered=true this value MUST be set + and will act as a short-lived TTL in which the transaction is deemed valid + and kept in memory to prevent duplicates. + nullable: true + extension_options: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: |- + extension_options are arbitrary options that can be added by chains + when the default options are not sufficient. If any of these are present + and can't be handled, the transaction will be rejected + nullable: true + non_critical_extension_options: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: |- + extension_options are arbitrary options that can be added by chains + when the default options are not sufficient. If any of these are present + and can't be handled, they will be ignored + nullable: true + description: TxBody is the body of a transaction that all signers sign over. + nullable: true + auth_info: + $ref: '#/components/schemas/cosmos.tx.v1beta1.AuthInfo' + title: |- + auth_info is the authorization related content of the transaction, + specifically signers, signer modes and fee + nullable: true + signatures: + type: array + items: + type: string + format: byte + description: |- + signatures is a list of signatures that matches the length and order of + AuthInfo's signer_infos to allow connecting signature meta information like + public key and signing mode by position. + nullable: true + description: Tx is the standard type used for broadcasting transactions. + additionalProperties: false + cosmos.tx.v1beta1.TxBody: + type: object + properties: + messages: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: |- + messages is a list of messages to be executed. The required signers of + those messages define the number and order of elements in AuthInfo's + signer_infos and Tx's signatures. Each required signer address is added to + the list only the first time it occurs. + By convention, the first required signer (usually from the first message) + is referred to as the primary signer and pays the fee for the whole + transaction. + nullable: true + memo: + type: string + description: |- + memo is any arbitrary note/comment to be added to the transaction. + WARNING: in clients, any publicly exposed text should not be called memo, + but should be called `note` instead (see + https://github.com/cosmos/cosmos-sdk/issues/9122). + timeout_height: + type: string + format: uint64 + description: |- + timeout_height is the block height after which this transaction will not + be processed by the chain. + unordered: + type: boolean + description: >- + unordered, when set to true, indicates that the transaction signer(s) + + intend for the transaction to be evaluated and executed in an un-ordered + + fashion. Specifically, the account's nonce will NOT be checked or + + incremented, which allows for fire-and-forget as well as concurrent + + transaction execution. + + + Note, when set to true, the existing 'timeout_timestamp' value must + + be set and will be used to correspond to a timestamp in which the transaction is deemed + + valid. + + + When true, the sequence value MUST be 0, and any transaction with unordered=true and a + non-zero sequence value will + + be rejected. + + External services that make assumptions about sequence values may need to be updated + because of this. + timeout_timestamp: + type: string + format: date-time + description: |- + timeout_timestamp is the block time after which this transaction will not + be processed by the chain. + + Note, if unordered=true this value MUST be set + and will act as a short-lived TTL in which the transaction is deemed valid + and kept in memory to prevent duplicates. + nullable: true + extension_options: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: |- + extension_options are arbitrary options that can be added by chains + when the default options are not sufficient. If any of these are present + and can't be handled, the transaction will be rejected + nullable: true + non_critical_extension_options: + type: array + items: + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + description: |- + `Any` contains an arbitrary serialized protocol buffer message along with a + URL that describes the type of the serialized message. + + Protobuf library provides support to pack/unpack Any values in the form + of utility functions or additional generated methods of the Any type. + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + // or ... + if (any.isSameTypeAs(Foo.getDefaultInstance())) { + foo = any.unpack(Foo.getDefaultInstance()); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + 'type.googleapis.com/full.type.name' as the type URL and the unpack + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type + name "y.z". + + JSON + ==== + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": <string>, + "lastName": <string> + } + + If the embedded message type is well-known and has a custom JSON + representation, that representation will be embedded adding a field + `value` which holds the custom JSON in addition to the `@type` + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: |- + extension_options are arbitrary options that can be added by chains + when the default options are not sufficient. If any of these are present + and can't be handled, they will be ignored + nullable: true + description: TxBody is the body of a transaction that all signers sign over. + cosmos.tx.v1beta1.TxDecodeAminoRequest: + type: object + properties: + amino_binary: + type: string + format: byte + nullable: true + description: |- + TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino + RPC method. + additionalProperties: false + cosmos.tx.v1beta1.TxDecodeAminoResponse: + type: object + properties: + amino_json: + type: string + description: |- + TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino + RPC method. + additionalProperties: false + cosmos.tx.v1beta1.TxDecodeRequest: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + nullable: true + description: |- + TxDecodeRequest is the request type for the Service.TxDecode + RPC method. + additionalProperties: false + cosmos.tx.v1beta1.TxDecodeResponse: + type: object + properties: + tx: + $ref: '#/components/schemas/cosmos.tx.v1beta1.Tx' + description: tx is the decoded transaction. + nullable: true + description: |- + TxDecodeResponse is the response type for the + Service.TxDecode method. + additionalProperties: false + cosmos.tx.v1beta1.TxEncodeAminoRequest: + type: object + properties: + amino_json: + type: string + description: |- + TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino + RPC method. + additionalProperties: false + cosmos.tx.v1beta1.TxEncodeAminoResponse: + type: object + properties: + amino_binary: + type: string + format: byte + nullable: true + description: |- + TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino + RPC method. + additionalProperties: false + cosmos.tx.v1beta1.TxEncodeRequest: + type: object + properties: + tx: + $ref: '#/components/schemas/cosmos.tx.v1beta1.Tx' + description: tx is the transaction to encode. + nullable: true + description: |- + TxEncodeRequest is the request type for the Service.TxEncode + RPC method. + cosmos.tx.v1beta1.TxEncodeResponse: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the encoded transaction bytes. + nullable: true + description: |- + TxEncodeResponse is the response type for the + Service.TxEncode method. + additionalProperties: false + cosmos.upgrade.v1beta1.ModuleVersion: + type: object + properties: + name: + type: string + title: name of the app module + version: + type: string + format: uint64 + title: consensus version of the app module + description: ModuleVersion specifies a module and its consensus version. + additionalProperties: false + cosmos.upgrade.v1beta1.Plan: + type: object + properties: + name: + type: string + description: |- + Sets the name for the upgrade. This name will be used by the upgraded + version of the software to apply any special "on-upgrade" commands during + the first BeginBlock method after the upgrade is applied. It is also used + to detect whether a software version can handle a given upgrade. If no + upgrade handler with this name has been set in the software, it will be + assumed that the software is out-of-date when the upgrade Time or Height is + reached and the software will exit. + time: + type: string + format: date-time + description: |- + Deprecated: Time based upgrades have been deprecated. Time based upgrade logic + has been removed from the SDK. + If this field is not empty, an error will be thrown. + nullable: true + height: + type: string + format: int64 + description: The height at which the upgrade must be performed. + info: + type: string + title: |- + Any application specific upgrade info to be included on-chain + such as a git commit that validators could automatically upgrade to + upgraded_client_state: + description: |- + Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been + moved to the IBC module in the sub module 02-client. + If this field is not empty, an error will be thrown. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + description: Plan specifies information about a planned upgrade and when it should occur. + cosmos.upgrade.v1beta1.QueryAppliedPlanResponse: + type: object + properties: + height: + type: string + format: int64 + description: height is the block height at which the plan was applied. + description: |- + QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC + method. + additionalProperties: false + cosmos.upgrade.v1beta1.QueryAuthorityResponse: + type: object + properties: + address: + type: string + title: QueryAuthorityResponse is the response type for Query/Authority + additionalProperties: false + cosmos.upgrade.v1beta1.QueryCurrentPlanResponse: + type: object + properties: + plan: + description: plan is the current upgrade plan. + type: object + properties: + name: + type: string + description: |- + Sets the name for the upgrade. This name will be used by the upgraded + version of the software to apply any special "on-upgrade" commands during + the first BeginBlock method after the upgrade is applied. It is also used + to detect whether a software version can handle a given upgrade. If no + upgrade handler with this name has been set in the software, it will be + assumed that the software is out-of-date when the upgrade Time or Height is + reached and the software will exit. + time: + type: string + format: date-time + description: |- + Deprecated: Time based upgrades have been deprecated. Time based upgrade logic + has been removed from the SDK. + If this field is not empty, an error will be thrown. + height: + type: string + format: int64 + description: The height at which the upgrade must be performed. + info: + type: string + title: |- + Any application specific upgrade info to be included on-chain + such as a git commit that validators could automatically upgrade to + upgraded_client_state: + description: >- + Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has + been + + moved to the IBC module in the sub module 02-client. + + If this field is not empty, an error will be thrown. + type: object + properties: + '@type': + type: string + description: |- + A URL/resource name that uniquely identifies the type of the serialized + protocol buffer message. This string must contain at least + one "/" character. The last segment of the URL's path must represent + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in a canonical form + (e.g., leading "." is not accepted). + + In practice, teams usually precompile into the binary all types that they + expect it to use in the context of Any. However, for URLs which use the + scheme `http`, `https`, or no scheme, one can optionally set up a type + server that maps type URLs to message definitions as follows: + + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + protobuf release, and it is not used for type URLs beginning with + type.googleapis.com. As of May 2023, there are no widely used type server + implementations and no plans to implement one. + + Schemes other than `http`, `https` (or the empty scheme) might be + used with implementation specific semantics. + additionalProperties: {} + nullable: true + description: |- + QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC + method. + cosmos.upgrade.v1beta1.QueryModuleVersionsResponse: + type: object + properties: + module_versions: + type: array + items: + type: object + properties: + name: + type: string + title: name of the app module + version: + type: string + format: uint64 + title: consensus version of the app module + description: ModuleVersion specifies a module and its consensus version. + description: module_versions is a list of module names with their consensus versions. + nullable: true + description: |- + QueryModuleVersionsResponse is the response type for the Query/ModuleVersions + RPC method. + additionalProperties: false + cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse: + type: object + properties: + upgraded_consensus_state: + type: string + format: byte + nullable: true + description: >- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState + + RPC method. + additionalProperties: false +tags: + - name: auth + - name: authz + - name: bank + - name: base + - name: consensus + - name: distribution + - name: epochs + - name: evidence + - name: feegrant + - name: gov + - name: mint + - name: slashing + - name: staking + - name: tx + - name: upgrade +servers: + - url: https://cosmos-rest.publicnode.com + description: >- + Community-run public endpoint serving Cosmos Hub. Not operated by the Cosmos SDK team, and + running a different SDK version than these pages document. Endpoints for modules the chain + does not include return 501. + - url: http://localhost:1317 + description: Your own node. Requires api.enable in app.toml. diff --git a/sdk/next/api-reference/transactions.mdx b/sdk/next/api-reference/transactions.mdx new file mode 100644 index 00000000..801773ac --- /dev/null +++ b/sdk/next/api-reference/transactions.mdx @@ -0,0 +1,97 @@ +--- +title: "Sending Transactions" +description: "The envelope around a transaction message, and the three steps that put it on chain." +--- + +The [gRPC Services](/sdk/next/api-reference/grpc/index) module pages give each transaction message its fields, its signer, and its JSON body. This page covers the envelope those bodies go into. For the model behind messages and transactions, see [Transactions, Messages, and Queries](/sdk/next/learn/concepts/transactions). + +## The envelope + +A transaction is a wrapper around one or more messages and includes the information needed to authorize and pay for them: + +```json +{ + "body": { + "messages": [ + { + "@type": "/cosmos.bank.v1beta1.MsgSend", + "from_address": "cosmos1...", + "to_address": "cosmos1...", + "amount": [{ "denom": "uatom", "amount": "1000000" }] + } + ], + "memo": "", + "timeout_height": "0", + "unordered": false, + "timeout_timestamp": null, + "extension_options": [], + "non_critical_extension_options": [] + }, + "auth_info": { + "signer_infos": [], + "fee": { + "amount": [{ "denom": "uatom", "amount": "5000" }], + "gas_limit": "200000", + "payer": "", + "granter": "" + }, + "tip": null + }, + "signatures": [] +} +``` + +The `messages` array holds exactly what a module page shows under In a transaction. The `@type` field is the type URL, and it selects the handler. Everything else is envelope, and defaults are correct unless stated otherwise: `payer` and `granter` apply to fee grants, `unordered` and `timeout_timestamp` to unordered transactions. + +Several messages can go in one transaction. They execute in order and atomically. + +## The three steps + +Building, signing, and broadcasting are separate operations. Separating them is what allows offline signing. The commands below are the shortest path; [Generating, Signing and Broadcasting Transactions](/sdk/next/node/txs) covers multisig, offline signing, and the same flow in Go, gRPC, REST, and CosmJS. + +```bash +# 1. Build +simd tx bank send mykey cosmos1recipient... 1000000uatom \ + --chain-id cosmoshub-4 --node https://your-rpc-endpoint:443 \ + --gas auto --gas-adjustment 1.5 --gas-prices 0.005uatom \ + --generate-only > unsigned.json + +# 2. Sign +simd tx sign unsigned.json --from mykey \ + --chain-id cosmoshub-4 --node https://your-rpc-endpoint:443 \ + --output-document signed.json + +# 3. Broadcast +simd tx broadcast signed.json --broadcast-mode sync +``` + +Signing covers the chain ID, account number, and sequence, which is what binds a signature to one chain and one use. Given a node, `sign` fetches the account number and sequence itself; offline signing supplies them with `--offline --account-number --sequence`. + +The key must control the address in the message's signer field. The module pages name that field for every message. See [Setting up the keyring](/sdk/next/node/keyring) for managing the keys these commands sign with. + +Broadcasting returns a transaction hash, not a result. Query for it: + +```bash +simd query tx <hash> +``` + +A `code` of 0 is success. + +For what gas measures and how the limit and price above are applied, see [Execution Context, Gas, and Events](/sdk/next/learn/concepts/context-gas-events). + +The API surfaces broadcast directly through `cosmos.tx.v1beta1.Service/BroadcastTx` on gRPC or `POST /cosmos/tx/v1beta1/txs` on REST. Both take the signed transaction as bytes, so building and signing still happen first. + +## Governance-gated messages + +Some messages take `authority` as their signer, meaning the governance module account, which no one holds a key for. They execute only through a passed governance proposal, wrapped in `MsgSubmitProposal`. See [Proposal submission](/sdk/next/modules/gov/README#proposal-submission) for the deposit and voting periods a proposal has to clear. The module pages flag every one. `MsgUpdateParams` on each module is the common case. + +The address the message needs: + +```bash +grpcurl -plaintext -d '{"name":"gov"}' localhost:9090 \ + cosmos.auth.v1beta1.Query/ModuleAccountByName +``` + +## Related + +The module pages under [gRPC Services](/sdk/next/api-reference/grpc/index) carry the message list, field tables, signer, and JSON body for every transaction message. diff --git a/sdk/next/guides/tooling/autocli.mdx b/sdk/next/guides/tooling/autocli.mdx index 18de69e0..5d14d868 100644 --- a/sdk/next/guides/tooling/autocli.mdx +++ b/sdk/next/guides/tooling/autocli.mdx @@ -11,6 +11,8 @@ title: Writing CLI Commands `autocli` generates CLI commands and flags for each method defined in your gRPC service. By default, it generates a command for each gRPC service method. The commands are named based on the name of the service method. +The [API reference](/sdk/next/api-reference/index) documents the services the standard modules define, which is what their generated commands call. + For example, given the following protobuf definition for a service: ```protobuf diff --git a/sdk/next/learn/concepts/cli-grpc-rest.mdx b/sdk/next/learn/concepts/cli-grpc-rest.mdx index 9a9508b0..58ab5577 100644 --- a/sdk/next/learn/concepts/cli-grpc-rest.mdx +++ b/sdk/next/learn/concepts/cli-grpc-rest.mdx @@ -139,6 +139,8 @@ This collects module options and address codecs and hands them to `AutoCLI`, whi gRPC is the primary programmatic interface for interacting with a Cosmos chain. It uses Protocol Buffers to define strongly typed request and response structures and supports generated clients for many programming languages. +Every query method and transaction message of the standard modules is documented in the [API reference](/sdk/next/api-reference/index), with a field table and a runnable example for each. + Each module exposes its functionality through two protobuf services: - A `Query` service for read-only access to module state @@ -192,6 +194,8 @@ For more usage examples, see [Interact with the Node](/sdk/next/node/interact-no The Cosmos SDK also exposes a REST API. REST endpoints are not written by hand; they are generated automatically from the same protobuf definitions used by gRPC, using **gRPC-gateway**. +The generated routes for the standard modules, with a request playground for each, are in the [REST reference](/sdk/next/api-reference/index). + gRPC-gateway reads HTTP annotations in the `.proto` files and generates a reverse proxy that translates REST requests into gRPC calls: ```protobuf diff --git a/sdk/next/learn/concepts/encoding.mdx b/sdk/next/learn/concepts/encoding.mdx index 6f87846c..4dc56e90 100644 --- a/sdk/next/learn/concepts/encoding.mdx +++ b/sdk/next/learn/concepts/encoding.mdx @@ -43,7 +43,7 @@ The Cosmos SDK uses protobuf in two encoding modes: **Binary encoding** is the default for everything that participates in consensus: transactions written to blocks, state stored in KV stores, and genesis data. Binary encoding is compact and deterministic. When a transaction is broadcast to the network, it travels as protobuf binary. When a module writes state, it serializes values to protobuf binary before calling `Set` on the store. -**JSON encoding** is used for human-readable output: the [CLI, gRPC-gateway REST endpoints](/sdk/next/learn/concepts/cli-grpc-rest), and off-chain tooling. The Cosmos SDK uses protobuf's JSON encoding (`ProtoMarshalJSON`) rather than standard Go JSON, which preserves field names from the `.proto` schema and handles special types like `Any` correctly. +**JSON encoding** is used for human-readable output: the [CLI, gRPC-gateway REST endpoints](/sdk/next/learn/concepts/cli-grpc-rest), and off-chain tooling. The Cosmos SDK uses protobuf's JSON encoding (`ProtoMarshalJSON`) rather than standard Go JSON, which preserves field names from the `.proto` schema and handles special types like `Any` correctly. For the concrete forms these produce on the wire, including the conventions the SDK layers on `string` and `bytes`, see [gRPC services](/sdk/next/api-reference/grpc/index). It is important to keep in mind that **binary encoding is consensus-critical**. Two validators must produce identical binary bytes for identical data. JSON is only used where humans or external clients need to read the data; it never influences the AppHash. diff --git a/sdk/next/node/interact-node.mdx b/sdk/next/node/interact-node.mdx index 27f54daf..3d553e77 100644 --- a/sdk/next/node/interact-node.mdx +++ b/sdk/next/node/interact-node.mdx @@ -65,6 +65,8 @@ You should see two delegations, the first one made from the `gentx`, and the sec The Protobuf ecosystem developed tools for different use cases, including code-generation from `*.proto` files into various languages. These tools allow the building of clients easily. Often, the client connection (i.e. the transport) can be plugged and replaced very easily. This section explores one of the most popular transports: [gRPC](/sdk/next/learn/concepts/cli-grpc-rest). +The methods available to call, with a `grpcurl` example for each, are in the [API reference](/sdk/next/api-reference/index). + Since the code generation library largely depends on your own tech stack, three alternatives are presented: * `grpcurl` for generic debugging and testing, @@ -269,6 +271,8 @@ CosmJS documentation can be found at [Link](https://cosmos.github.io/cosmjs). {/ As described in the [gRPC guide](/sdk/next/learn/concepts/cli-grpc-rest), all gRPC services on the Cosmos SDK are made available for more convenient REST-based queries through gRPC-gateway. The format of the URL path is based on the Protobuf service method's full-qualified name, but may contain small customizations so that final URLs look more idiomatic. For example, the REST endpoint for the `cosmos.bank.v1beta1.Query/AllBalances` method is `GET /cosmos/bank/v1beta1/balances/{address}`. Request arguments are passed as query parameters. +Rather than deriving each path, the [API reference](/sdk/next/api-reference/index) lists every generated route for the standard modules. + Note that the REST endpoints are not enabled by default. To enable them, edit the `api` section of your `~/.simapp/config/app.toml` file: ```toml diff --git a/sdk/next/node/run-node.mdx b/sdk/next/node/run-node.mdx index 1ee9b2b8..113db8d3 100644 --- a/sdk/next/node/run-node.mdx +++ b/sdk/next/node/run-node.mdx @@ -271,6 +271,7 @@ Your node is now running and producing blocks. You have successfully initialized ## Next steps - [Interact with the node](/sdk/next/node/interact-node) to send transactions and query state +- [API reference](/sdk/next/api-reference/index) for every query method and transaction message the standard modules expose - [Generate and sign transactions](/sdk/next/node/txs) to learn advanced transaction workflows - [Key rotation](/sdk/next/keys/key-rotation) to understand the consensus key in `priv_validator_key.json` and how a validator replaces it - [Cosmos-KMS and remote signing](/sdk/next/kms/remote-signing) to move that key off the node entirely \ No newline at end of file diff --git a/sdk/next/node/txs.mdx b/sdk/next/node/txs.mdx index ba6a5d80..48055407 100644 --- a/sdk/next/node/txs.mdx +++ b/sdk/next/node/txs.mdx @@ -36,6 +36,8 @@ simd tx bank send $MY_VALIDATOR_ADDRESS $RECIPIENT 1000stake --chain-id my-test- This will output the unsigned transaction as JSON in the console. The unsigned transaction can also be saved to a file (to be passed around between signers more easily) by appending `> unsigned_tx.json` to the above command. +For what each field in that JSON means, see [Sending Transactions](/sdk/next/api-reference/transactions#the-envelope) in the API reference. + ### Signing a Transaction Signing a transaction using the CLI requires the unsigned transaction to be saved in a file. For this example, assume the unsigned transaction is in a file called `unsigned_tx.json` in the current directory (see previous paragraph on how to do that). Then, simply run the following command: diff --git a/sdk/next/tutorials/example/05-run-and-test.mdx b/sdk/next/tutorials/example/05-run-and-test.mdx index 102e3f31..bc175d90 100644 --- a/sdk/next/tutorials/example/05-run-and-test.mdx +++ b/sdk/next/tutorials/example/05-run-and-test.mdx @@ -91,7 +91,7 @@ docker exec node2 exampled query counter count --home /data/node2 ## CLI reference -Once the chain is running, these are the core [CLI](/sdk/next/learn/concepts/cli-grpc-rest#cli) commands you'll use to inspect state and submit transactions. +Once the chain is running, these are the core [CLI](/sdk/next/learn/concepts/cli-grpc-rest#cli) commands you'll use to inspect state and submit transactions. For the gRPC and REST equivalents of every query and transaction the standard modules define, see the [API reference](/sdk/next/api-reference/index). ### Query commands diff --git a/work-log/sdk-api-reference.md b/work-log/sdk-api-reference.md new file mode 100644 index 00000000..ab64a490 --- /dev/null +++ b/work-log/sdk-api-reference.md @@ -0,0 +1,212 @@ +# sdk-api-reference + +A generated API reference for the Cosmos SDK: gRPC query services, transaction messages, and the REST gateway routes. Generated from `cosmos-sdk` protos and upstream's gateway spec at a pinned commit, for both `latest` and `next`. + +Branch was originally named `rpc-endpoints`. Renamed, because it does not ship a CometBFT RPC method reference and the old name promised one. + +## 2026-09-02 (new section: generator, pages, and live verification) + +### What exists now + +`scripts/api-reference/sync-sdk-api-reference.js` plus `lib/{descriptor,render,openapi,checks}.js`, roughly 1,000 lines. One run produces, per version: + +- `sdk/<version>/api-reference/grpc/<module>.mdx`, 21 pages, from a `buf build` descriptor +- `sdk/<version>/api-reference/rest/openapi.yaml`, from upstream's gateway Swagger converted to OpenAPI 3.0 +- the `API Reference` tab in `docs.json`, rewritten in place + +Three pages are hand-written: `api-reference/index.mdx` (interaction surfaces, ports, `app.toml` flags), `api-reference/grpc/index.mdx` (reflection recipes, scalar encodings), and `api-reference/transactions.mdx` (build, sign, broadcast). + +Nothing is a hand-maintained list. The repository and released version come from `versions.json`; the module set, service set, ordering, headings, anchors, sidebar labels and nav entries all fall out of the descriptor. Generation is deterministic: two runs at one SHA produce byte-identical output, which is what makes a weekly diff meaningful. + +### Queries and transaction messages are presented differently, on purpose + +`baseapp/grpcrouter.go` registers `Query` services into the router that port 9090 serves. `baseapp/msg_service_router.go` registers `Msg` services into a router consulted only during transaction delivery. A `Msg` method is not reachable on 9090, so it gets a type URL, a signer, an Amino name and a transaction JSON body, and deliberately no `grpcurl` example. + +### Live testing found twelve defects that reading could not + +Four agents exercised the pages against Cosmos Hub and against a local simapp built at the documented commit, restricted to reading only the rendered pages. Before: 5 of 25 gRPC methods callable from the page alone. After: 15 of 19, and 27 of 30 REST operations. + +Seven defects were in generated content, so each was wrong on every page at once: + +| Defect | Effect | +| --- | --- | +| enums rendered `{}` | vote transactions rejected; `VOTE_OPTION_YES` appeared nowhere in the reference | +| `Any` rendered `{typeUrl, value}` | every governance proposal rejected | +| `Duration` rendered `{seconds, nanos}` | `MsgUpdateParams` rejected | +| `bytes` rendered `<bytes>` | `illegal base64 data`, on `AllBalances`, in 13 of 22 pages | +| camelCase response schemas | 2,008 properties disagreed with every real response | +| `uint64` as a number, and `0` for ids and heights | examples that error on paste | +| deprecated field beside its replacement | silently queried account 0 | + +Five were prose. `cosmos.Dec` was undefined, so `DelegationRewards` returning `5915273237378841699511248` reads as 5.9 quintillion rather than 5.9 ATOM. `bytes` encoding was unstated, and passing hex does not error, it base64-decodes and yields a valid-looking wrong address. The transactions page named the chain ID, account number and sequence as required without saying where to get them; used a bech32 address where `--gas auto` needs a keyring key; and recommended `--gas-adjustment 1.3`, which produces `code: 11` out of gas on a plain `MsgSend`. + +`cosmos.Dec` took three attempts. It has three wire forms on gRPC, distinguished per field by `gogoproto.customtype` and the proto type, and the REST gateway renders all three as a plain decimal string. The same field returns `"50000000000000000"` over gRPC and `"0.050000000000000000"` over REST. + +### Upstream defects worked around + +Upstream's generated `swagger.yaml` is not tested by anything in `cosmos-sdk`: no test file references it. Consequently: + +- two `gov` routes share the `operationId` `GovV1Proposal`, which would silently collapse two Mintlify pages into one. Operation IDs are now derived from the descriptor +- two `auth` routes differ only by path parameter name, which OpenAPI forbids in one document. One is dropped, loudly +- `summary` fields carry entire multi-paragraph proto comments, and Mintlify builds filenames from them. The longest overran the filesystem limit and crashed the build with `ENAMETOOLONG` +- annotations write `{account_id}` where the generated spec writes `{accountId}`, so the join normalizes to the JSON name + +These are worth reporting upstream. The duplicate `operationId` breaks anyone generating a client from that spec. + +### Guards over the parts that cannot be derived + +Some facts live outside the protos: what `cosmos.Dec` means, how a well-known type is represented in JSON, what a transaction envelope carries. Those stay hand-written, and their completeness is enforced. Generation fails, naming the missing item, when a scalar annotation appears with no definition on the gRPC page, when a specification-defined JSON type has no representation in the renderer, or when a `cosmos.tx.v1beta1` envelope field goes unmentioned on the transactions page. + +Each guard was added because the corresponding list had already gone stale. `cosmos.ConsensusAddressString` was undefined an hour after the scalar table was written, and v0.55 added `unordered`, `timeout_timestamp` and `tip` to the envelope without the page noticing. + +Generated pages are also pruned: a module removed upstream has its page deleted, so output can shrink as well as grow. + +### Tests + +`scripts/api-reference/test/`, 39 tests, no network, 77ms. Synthetic descriptors rather than captured fixtures, so a test can describe upstream changes that have not happened: a module removed, a method added, a proto version appearing beside an old one. Every encoding defect above is a regression test. + +### Known gaps + +- REST schemas now set `additionalProperties: false` (182 strict, 50 exempt for carrying an `Any`), which makes conformance testing meaningful. `required` cannot be derived, because proto3 omits defaults +- 9 of 48 transaction examples carry an `Any` placeholder that is not a real message +- `staking`'s `status` request field is a plain `string` upstream, so it does not auto-link to the `BondStatus` enum documented on the same page +- `AccountAddressByID` documents a parameter that returns a wrong address with a 200; the parameter that works, `account_id`, is undocumented upstream +- no path parameter carries an `example`, so the REST playground cannot be fired without the reader supplying a value + +## 2026-09-02 (verification: three runners, and the defects they found) + +### What now checks the reference + +| Command | Proves | Needs | +| --- | --- | --- | +| `npm test` | 40 unit tests, every defect class plus module add and remove | nothing | +| `npm run verify-examples` | 274 payloads parse; 43 of 48 through the SDK's own codec | buf, optionally simd | +| `npm run conformance` | 106 of 108 REST responses match the published schemas | a chain | +| `npm run smoke` | 15 representative commands actually run | a chain | + +Verification runs against a local simapp built at the documented commit, so a failure is a real defect rather than version skew. The public Hub runs v0.53.4 against pages documenting v0.55, which produced false failures worth discounting in earlier rounds. + +### cosmos.Dec took four attempts and is the lesson of the project + +The annotation names one convention and the wire carries four, split across two axes. Proven on simapp at the documented version: + +| Path | `"0.05"` | `"50000000000000000"` | +| --- | --- | --- | +| `simd tx encode` | is 0.05 | rejected as over 100% | +| `POST /cosmos/tx/v1beta1/encode` | decodes to `0.050000000000000000` | decodes to `50000000000000000.0…` | +| gRPC `TxEncode` | rejected | round-trips, means 0.05 | + +The same string means different numbers depending on which codec reads it, so no per-field sentence can be correct. Field notes now carry the read form, which varies by field, and the write form is stated where the reader acts: the transaction-messages preamble names transaction JSON, the query preamble names protobuf JSON. + +Each earlier attempt was wrong in a different direction, and each was caught only by executing against a chain. Reading the protos could not have found any of them. + +### Further generator defects, all found by execution + +`oneof` fields rendered every member set at once, which the parser rejects outright. An epoch-zero `Timestamp` placeholder looked like a real value and produced `expiration must be after the current block time`. Deprecated enum values were offered as examples, so `BroadcastTx` suggested the removed `BROADCAST_MODE_BLOCK`. Eight messages were unbuildable because `Any` fields showed a fake type URL and the concrete options appeared nowhere; those are now derived from `accepts_interface` and `implements_interface`. A claim that two messages could not be Amino-signed was disproved on chain and removed. + +### Schema corrections were landing in the wrong place + +`additionalProperties: false` had been applied to the 242 component schemas, but upstream inlines response schemas per operation and almost nothing references components, so a validator never saw the constraint. Walking each operation's own response against its message raised conformance from 78 passing to 106. Four operations use a `$ref` and were skipped silently until the corrections learned to follow references. + +The gateway also emits `null` where proto3 has no null, for unset message fields and empty `bytes`, so 948 properties are marked nullable per field rather than blanket. + +### Upstream drift is now caught without a chain + +Generation compares each response schema against its own message and reports fields the protos define and the spec omits. Two are outstanding, both v0.55 additions upstream never picked up: + +``` +/cosmos/staking/v1beta1/params.params.key_rotation_fee +/cosmos/auth/v1beta1/params.params.sig_verify_cost_mldsa65 +``` + +Both confirmed present in real responses. Reported as a warning, since upstream lagging its own protos is normal and should not block a docs build. Worth reporting upstream: anyone generating a client from that spec is missing the same two fields. + +### Automation, and its ceiling + +A weekly workflow regenerates both versions, verifies, and opens a PR summarising added and removed methods. A guard failure opens an issue rather than reddening a cron nobody watches. + +What no check can do is distinguish a wrong documented value from missing chain state. The `cosmos.Dec` defect returned a business error, indistinguishable from a chain with no validator configured. That judgment needs a person, and is worth repeating when the SDK version changes. + +## 2026-09-03 + +Committed as `be4aaf74`: 76 files, the generator and its checks, 21 gRPC pages and an OpenAPI spec for each of `latest` and `next`, plus the API Reference tab in `docs.json`. + +- Added two page-driven on-chain runners, `query-onchain.py` (123 queries) and `tx-onchain.py` (48 messages), sharing `pagefill.py`. They supersede the earlier approach: placeholders are filled from what the page states, following its field tables and type links, never from the proto descriptor. A filler that reads the descriptor can pass while the page tells a reader to write a value the chain rejects, which is what happened with `cosmos.Dec`. +- Added `query-coverage.toml` and `tx-coverage.toml`, holding only what cannot be derived: preconditions, which key signs, and the gaps where a page genuinely cannot help. Diffed against the pages every run, so a removed method surfaces as an orphan, and `skip` entries are still probed so a stale entry cannot understate what works. That mechanism caught five entries being too pessimistic. +- Corrected `cosmos.Dec` a fifth time, reversing the previous fix. In transaction JSON every `Dec` is a decimal string whatever its proto type; base64 is only a read form over gRPC. Proven directly: `bytes`-Dec as decimal accepted, as base64 rejected with `failed to set decimal string with base 10`. The generated example was also emitting `""` for those fields, which a reader copying verbatim would hit as `decimal string cannot be empty`. +- Fixed `staking.Validators.status`, where the `BondStatus` values sat on the page unconnected to the field. Exactly one field in the SDK matches the rule, so it names a real relationship rather than a guess. +- Amino name now shown on all 48 transaction messages rather than only where it deviates, described in terms of hardware wallets rather than a specific vendor. +- Added the weekly workflow, `.claude/launch.json`, and a step 2b in the root `CLAUDE.md` regenerating the API reference before a freeze. Both the schedule and that step's contents are revised by the design below. +- Three Schemathesis crash-cache files under `scripts/api-reference/.schemathesis/` were committed by accident. They are run artifacts and should be removed and gitignored. +- Added `scripts/api-reference/DESIGN.md`, recording the invariant the tooling follows and the eight agreed hardening changes. Chief among them: `sync` has no `--ref` override, so a freeze publishes `main`-generated content under the new release's version number, and the on-chain runners derive their own denominator from the page parse, so a render change can silently drop a method from the test set and still exit 0. +- Design decision recorded: no scheduled regeneration. Docs versions freeze at release, `latest` must not change between releases, and the release process itself is the gate. + +### The release gate is one command + +`release-check.py` runs the whole thing: regenerate, unit tests in both languages, example encoding, then conformance, every documented query and every documented message against a chain built from the commit the pages themselves record. `chain.py` does the building, in a working directory of its own, and tears the node down on failure as well as success. + +The chain deliberately avoids every default port (RPC 26667, REST 1318, gRPC 9091, P2P 26666, pprof 6061). The obvious reason is that a developer chain on the same machine would block it from binding. The reason that matters is the other one: if the harness fails to start and the runners still find a chain on the defaults, the gate reports somebody else's chain state as the documentation's and passes. + +Two portability defects in the transaction runner only became visible once the gate owned the chain: + +- The fee denom was hardcoded to `ustake` while the runner already discovers the chain's bond denom for message amounts. On a chain whose stake token is named anything else, all 37 messages failed the ante handler with `insufficient funds`, which reads as 37 documentation defects and is none. +- Two coverage entries named `dave`, a key out of one machine's keyring, as the validator operator's signer. They now name the role, `validator`, which `tx-onchain.py` resolves from `--validator-key`. + +With both fixed the transaction runner reports 37 success, 9 known gaps, 1 skip and one finding. + +The workflow lost its schedule. It keeps `workflow_dispatch`, and now defaults to `next` alone, because `latest` is frozen between releases and regenerating it outside one rewrites published pages. + +### The two drifted response fields are now repaired, not reported + +`findSchemaDrift` already knew that `sig_verify_cost_mldsa65` and `key_rotation_fee` are defined in the protos and absent from upstream's swagger. The generator reported them and then published a schema it knew was incomplete, marked it `additionalProperties: false`, and conformance duly failed on a real response. Two-sided: the gate could never go green, and anyone generating a client from the spec was missing both fields. + +`correctResponseSchemas` now adds a descriptor-known field that upstream omits, in the same pass that marks schemas strict and nullable, building the schema from the field's proto type. It only ever runs where upstream declared no property at all, so it cannot change how an operation upstream did describe is represented. The drift report stays, because upstream lagging its own protos is still worth knowing and still worth raising there, but it now names what was repaired. A second drift pass after the repair throws if anything is left, so the two can never disagree again. + +Both versions regenerated. The whole change to `latest` is those two fields. + +### The gate goes green + +`release-check` now ends with `All checks passed. Safe to freeze.` Conformance passes 3023 of 3023 generated cases, `query-onchain` reports 84 pass and no findings, `tx-onchain` 38 success and no findings. + +`signer = "validator"` is verified rather than assumed: the runner compares the validator key's `--bech val` address against the operator address the chain reports and refuses to broadcast on a mismatch. The earlier fallback to `--from` would have signed the two validator-only entries with an arbitrary account and recorded a page defect that is not one, which is the same class of noise as the fee denom. + +`MsgUnjail` no longer claims `state-error`. Under `--broadcast-mode sync` the runner reads CheckTx's code, so a message that clears the ante handler and then fails in execution reports 0, and the whole `state-error` class is unassertable until the runner reads the delivered code back by transaction hash. The vocabulary comment now says so, and the entry asserts the outcome the runner can actually see. + +### The repair is pinned by tests, and a map is an object + +The synthesizer had no unit coverage: nothing under `test/` imported `correctResponseSchemas` or `findSchemaDrift`, so the suite passing said nothing about it and its only verification was one conformance run. `test/schema-repair.test.js` now covers each scalar class, an enum and its default, a nested message, repetition, maps, the well-known types, an Any, and every path where the synthesizer declines to describe something, plus the repair end to end on a miniature spec. + +Writing them found the bug they were asked for. A `map<k,v>` is `LABEL_REPEATED` in the descriptor, so a map field was being wrapped in an array of the synthetic `{key, value}` entries that JSON renders as a plain object. It synthesizes as `{type: "object", additionalProperties: <value>}` now. Latent, since no map field drifts today. + +A field the synthesizer cannot fully describe, a message absent from the descriptor or an unrecognised scalar, becomes an open object or a string. Conformance then accepts that subtree unconditionally and the post-repair drift check reports nothing, because the property does exist. It cannot mis-describe a response but it can under-describe one, so the repair now names what it declined and the generator warns. There are none today. + +`tx-onchain.py` no longer crashes when an entry recorded `unfillable` becomes fillable, which is upstream supplying the example a page was missing and precisely the drift the manifest exists to surface. It was reaching `counts[expect] += ok` with a key the counter never had. It is reported as a stale manifest entry now, and not broadcast: what is wrong is the recorded expectation, not the page. + +### Hardening, and moving the release procedure into a skill + +- Added `--ref` to the generator, so a pre-freeze regeneration can be pointed at the release branch instead of always resolving `next` to `main`; without it, a freeze publishes development content under the new release's version number, which is the bug this closes. +- Added a names-only `inventory.json` beside the generated pages and a completeness guard in both on-chain runners, so a rendering change can no longer silently drop a method from the test set. +- Unified `query-coverage.toml` and `tx-coverage.toml` onto one manifest schema, `[cases."name"]`, with a per-runner `expect` vocabulary; `tx-coverage.toml`'s separate `[unfillable]` table folded into `expect = "unfillable"`. +- Moved error classification out of `query-onchain.py`'s code and into the manifest's `[errors]` table; an error the manifest does not recognize is now reported as `unclassified` rather than guessed. +- Added a findings file per run, with the terminal summary rendered from it. It is a run artifact and is never committed. +- Deleted `smoke.py`, folding its two negative assertions and two REST reads into `query-onchain.py`. +- Added `chain.py` and `release-check.py`: the release gate builds `simd` at the commit the pages record and runs everything against it, on non-default ports (RPC 26667, REST 1318, gRPC 9091) so it cannot collide with, or be mistaken for, a developer's own chain. +- The generator now repairs response schemas for fields the protos define and upstream's swagger omits, rather than warning and publishing a schema it knows is incomplete. +- Moved the release procedure out of the root `CLAUDE.md` (a third of a file loaded into every session, for something done three or four times a year) into `.claude/skills/release-version/SKILL.md`, which loads only when someone is doing a release. Corrected `scripts/api-reference/CLAUDE.md`'s command list and test counts (77 JS, 32 Python) and its testing-philosophy section, which had claimed exhaustive live execution was deliberately not attempted; it is now exactly what `query-onchain` and `tx-onchain` do. The weekly regeneration workflow lost its `schedule:` block, since docs versions freeze at release and a cron that can only report drift carries no decision. + + + +## 2026-09-03 (review follow-ups) + +- Transactions are now asserted on the delivered result rather than CheckTx. `--broadcast-mode sync` reports only the ante handler's verdict, so a message that paid its fee and carried a valid signature counted as a pass even when its module handler rejected it. The runner now reads the result back by transaction hash, which is the difference between the chain accepting an example and the example working. This supersedes the note above about `state-error` being unassertable: it is observable now, and `MsgUnjail` asserts it again. +- `skip` entries are probed. Both this file's manifest header and `DESIGN.md` promised that a skip is still attempted and an unexpected success reported, and the code returned before broadcasting. A documented mechanism that does not exist is worse than an absent one, because the manifest's value is that its claims are true. +- Pinned `peter-evans/create-pull-request` to a commit in the API reference workflow. That job holds contents and pull-request write, so a retargeted tag would run third-party code with them. +- Trimmed `api-reference/index.mdx` and `transactions.mdx` to interface facts and examples: 698 to 374 words and 1372 to 561. The troubleshooting layer was removed, including the gas-adjustment, account-number-zero, and protobuf-JSON-naming notes. They are recoverable from `cbcd8e63` if a troubleshooting page is ever wanted. +- Reviewed and rejected one automated finding: em dashes were reported in five added files, and there are none in any of them. The matches were CLI flags such as `--dry-run`. +- Reading the delivered result reclassified 27 of 48 transaction messages. Under CheckTx they reported success; on the delivered result, 12 are governance gated and rejected with `invalid authority`, and 15 fail in execution for want of chain state a fresh single-validator chain does not have. The gate now reports 11 success, 12 unauthorized, 15 state-error, 1 skip, 9 known gap. +- The governance classification is derived from the page, not enumerated. Each affected page already carries a generated note saying the signer is the governance module account, so the runner reads that and expects `unauthorized`. A message that becomes governance gated upstream classifies itself with no manifest edit. +- Four failures are documentation gaps rather than chain state, all upstream proto comment omissions worth raising against `cosmos-sdk`: `MsgVoteWeighted` in both gov versions requires option weights summing to 1.00, and `MsgGrantAllowance` and `MsgRevokeAllowance` require granter and grantee to differ. No field description states either constraint. +- Cut the per-page boilerplate from 402 words to 218, on 42 pages. The header carries provenance only; what a node actually serves is stated once beside the reflection command that answers it, rather than twice on every page. Two sentences were removed as wrong rather than long: the queries boilerplate asserted that a `cosmos.Dec` in a payload is the scaled integer string, which is the form it reads back in, not the form a reader writes, and contradicted both the field tables and `grpc/index.mdx`. +- Two phrases in the transactions boilerplate are load-bearing and carry comments in `lib/render.js` saying so. `pagefill.py` tests for the literal `decimal string such as "0.05"` to confirm the page states the Dec form, so rewording it makes every Dec field unfillable. The `bytes` clause covers the case that shipped wrong four times, where the write form and the read form differ. +- Dropped `app.mdx`. A module whose every method is deprecated is now excluded by the generator, which removed the page, its `docs.json` entry, and its inventory line without a blacklist. `upgrade.UpgradedConsensusState` stays with its warning: a deprecated method among live ones is worth identifying, a page that is nothing else is not. The filter requires at least one method, so a types-only module is not dropped on a vacuous truth. +- Simplified `grpc/index.mdx`, 126 lines to 97, and fixed a structural problem alongside it. Base64 rules, `pagination.next_key` encoding, denominations, `Any` discriminators and proto3 defaults were all sitting under a `cosmos.Dec` heading, where a reader looking for any of them would not find them. They now have their own section. Cut the protobuf primer, two of four reflection commands, the TLS example now carried by every module page's boilerplate, and one of two paragraphs making the same point about scaled decimals. The scalar table is unchanged: `checkScalarAnnotationsDocumented` fails the build if any of those five annotations lacks a definition on this page.