diff --git a/.github/workflows/auto-pr.yml b/.github/workflows/auto-pr.yml deleted file mode 100644 index 49c551a5c..000000000 --- a/.github/workflows/auto-pr.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Auto-PR Body - -on: - pull_request: - -permissions: - contents: read - repository-projects: write - pull-requests: write - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: jbrocher/auto-pr-body-generator@v0.2.2 - with: - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef8de66f9..af9bb793b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,13 +16,9 @@ on: pull_request: branches: - "**" - push: - branches: - - "v[0-9]**" - workflow_dispatch: merge_group: -env: - GO_VERSION: "1.20.5" + workflow_dispatch: + workflow_call: concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -30,9 +26,8 @@ concurrency: jobs: build-default: - name: Build sonrd-${{ matrix.targetos }}-${{ matrix.arch }} - runs-on: ubuntu-latest - + name: Build sonrd-${{ matrix.targetos }}-${{ matrix.arch }} for ${{ github.ref }} + runs-on: self-hosted strategy: matrix: arch: [amd64, arm64] @@ -40,46 +35,19 @@ jobs: include: - targetos: darwin arch: arm64 - steps: - name: Check out repository code uses: actions/checkout@v3 - - name: Get git diff - uses: technote-space/get-diff-action@v6.1.2 - with: - PATTERNS: | - **/**.wasm - **/**.go - go.mod - go.sum - Makefile - .github/workflows/build.yml + - uses: actions/setup-go@v4 - if: env.GIT_DIFF - with: - go-version: ${{env.GO_VERSION}} env: GOOS: ${{ matrix.targetos }} GOARCH: ${{ matrix.arch }} + - name: Download Dependencies - if: env.GIT_DIFF run: go mod download - - name: Build sonrd - if: env.GIT_DIFF - run: | - GOWRK=off go build cmd/sonrd/main.go - - name: Upload sonrd artifact - if: env.GIT_DIFF - uses: actions/upload-artifact@v3 + - run: make build + - uses: actions/upload-artifact@v3 with: name: sonrd-${{ matrix.targetos }}-${{ matrix.arch }} - path: cmd/sonrd/sonrd - - build-make: - name: Build using makefile - runs-on: ubuntu-latest - steps: - - name: Check out repository code - uses: actions/checkout@v3 - - name: Run make build - run: make build + path: bin/sonrd diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 9dd9fa455..2eda62830 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -10,7 +10,7 @@ permissions: jobs: generate-changelog: - runs-on: ubuntu-latest + runs-on: ubuntu-ultra-instinct steps: - uses: actions/checkout@v2 with: diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml deleted file mode 100644 index 23170b57e..000000000 --- a/.github/workflows/cleanup.yml +++ /dev/null @@ -1,72 +0,0 @@ -# This workflow deletes old workflow runs in a repository. -# It runs on a schedule and allows manual triggering with customizable options. - -name: Cleanup Repository -on: - schedule: - - cron: "59 23 * * *" - - workflow_dispatch: - inputs: - days: - description: "Number of days." - required: true - minimum_runs: - description: "The minimum runs to keep for each workflow." - required: true - delete_workflow_pattern: - description: "The name or filename of the workflow. if not set then it will target all workflows." - required: false - default: "all" - delete_workflow_by_state_pattern: - description: "Remove workflow by state: active, deleted, disabled_fork, disabled_inactivity, disabled_manually" - required: false - default: "all" - type: choice - options: - - all - - active - - deleted - - disabled_inactivity - - disabled_manually - delete_run_by_conclusion_pattern: - description: "Remove workflow by conclusion: action_required, cancelled, failure, skipped, success" - required: false - default: "all" - type: choice - options: - - all - - action_required - - cancelled - - failure - - skipped - - success - dry_run: - description: "Only log actions, do not perform any delete operations." - required: false - default: false - -jobs: - del_runs: - runs-on: ubuntu-latest - permissions: - actions: write - steps: - - run: | - echo "::set-input name=days::7" - echo "::set-input name=minimum_runs::1" - - uses: Mattraks/delete-workflow-runs@v2 - with: - token: ${{ secrets.GH_ACTIONS_PAT }} - repository: ${{ github.repository }} - retain_days: ${{ github.event.inputs.days }} - keep_minimum_runs: ${{ github.event.inputs.minimum_runs }} - delete_workflow_pattern: ${{ github.event.inputs.delete_workflow_pattern }} - delete_workflow_by_state_pattern: ${{ github.event.inputs.delete_workflow_by_state_pattern }} - delete_run_by_conclusion_pattern: ${{ github.event.inputs.delete_run_by_conclusion_pattern }} - dry_run: ${{ github.event.inputs.dry_run }} - - uses: hugo19941994/delete-draft-releases@v1.0.0 - with: - threshold: 5d - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 865a57d64..5b0ad88d5 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,9 +1,10 @@ name: "๐Ÿงช CodeQL Analysis" on: + pull_request: + branches: [ master ] schedule: - cron: "43 3 * * 2" - jobs: codeql-analysis: name: Run CodeQL Analysis @@ -12,44 +13,37 @@ jobs: actions: read contents: read security-events: write - strategy: fail-fast: false matrix: language: ["go", "typescript"] queries: ['crypto-com/cosmos-sdk-codeql@v0.0.7'] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://git.io/codeql-language-support - steps: - name: Checkout repository uses: actions/checkout@v3 - - # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v1 with: languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild uses: github/codeql-action/autobuild@v1 - - # โ„น๏ธ Command-line programs to run using the OS shell. - # ๐Ÿ“š https://git.io/JvXDl - - # โœ๏ธ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v1 + + coverage: + name: Scan/Upload Coverage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + - name: SonarCloud Scan + uses: sonarsource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_PAT }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.yml deleted file mode 100644 index 0a4010d33..000000000 --- a/.github/workflows/hadolint.yml +++ /dev/null @@ -1,47 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# hadoint is a Dockerfile linter written in Haskell -# that helps you build best practice Docker images. -# More details at https://github.com/hadolint/hadolint - -name: Hadolint - -on: - push: - branches: [ "master", "_stale/*" ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ "master" ] - schedule: - - cron: '32 8 * * 6' - -permissions: - contents: read - -jobs: - hadolint: - name: Run hadolint scanning - runs-on: ubuntu-latest - permissions: - contents: read # for actions/checkout to fetch code - security-events: write # for github/codeql-action/upload-sarif to upload SARIF results - actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Run hadolint - uses: hadolint/hadolint-action@f988afea3da57ee48710a9795b6bb677cc901183 - with: - dockerfile: ./Dockerfile - format: sarif - output-file: hadolint-results.sarif - no-fail: true - - - name: Upload analysis results to GitHub - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: hadolint-results.sarif - wait-for-processing: true diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index e194de8ef..d14cbc8ff 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -10,7 +10,7 @@ on: [pull_request] jobs: label: - runs-on: ubuntu-latest + runs-on: self-hosted permissions: contents: read pull-requests: write diff --git a/.github/workflows/proto.yml b/.github/workflows/proto.yml index 4de0ee1e1..d7fa347c6 100644 --- a/.github/workflows/proto.yml +++ b/.github/workflows/proto.yml @@ -11,7 +11,7 @@ permissions: jobs: lint: - runs-on: ubuntu-latest + runs-on: self-hosted timeout-minutes: 5 steps: - uses: actions/checkout@v4 @@ -21,7 +21,7 @@ jobs: input: "proto" break-check: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v4 - uses: bufbuild/buf-setup-action@v1.27.1 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index cb2afc9d0..000000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Publish Releases - -on: - schedule: - - cron: "0 17 * * *" # 9 AM PST is 17:00 UTC - -jobs: - publish-drafts: - runs-on: ubuntu-latest - steps: - - name: Publish Drafts - run: | - yesterday=$(date -u -d "yesterday" +"%Y-%m-%d") - drafts=$(gh release list --json createdAt,draft -q "map(select(.draft==true and .createdAt >= '$yesterday')) | .[].name") - for draft in $drafts; do - gh release update $draft --draft false - done diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 521418983..722bae65f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,7 @@ permissions: jobs: release: name: Run goreleaser - runs-on: ubuntu-latest + runs-on: self-hosted steps: - uses: actions/checkout@v3 with: @@ -26,9 +26,11 @@ jobs: - run: make release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + publish-buf: name: Publish buf.build proto - runs-on: ubuntu-latest + runs-on: self-hosted + needs: release steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a54a9958b..f0ad717bc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,6 +19,7 @@ on: push: branches: - "master" + - "**" workflow_dispatch: merge_group: env: @@ -29,115 +30,14 @@ concurrency: cancel-in-progress: true jobs: - build: - name: sonrd-${{ matrix.targetos }}-${{ matrix.arch }} - runs-on: ubuntu-latest - - strategy: - matrix: - arch: [amd64, arm64] - targetos: [darwin, linux] - include: - - targetos: darwin - arch: arm64 - - steps: - - name: Check out repository code - uses: actions/checkout@v3 - - name: Get git diff - uses: technote-space/get-diff-action@v6.1.2 - with: - PATTERNS: | - **/**.wasm - **/**.go - go.mod - go.sum - Makefile - .github/workflows/build.yml - - uses: appleboy/telegram-action@master - with: - to: ${{ secrets.TELEGRAM_TO }} - token: ${{ secrets.TELEGRAM_TOKEN }} - - - uses: actions/setup-go@v4 - if: env.GIT_DIFF - with: - go-version: ${{env.GO_VERSION}} - env: - GOOS: ${{ matrix.targetos }} - GOARCH: ${{ matrix.arch }} - - - name: Download Dependencies - if: env.GIT_DIFF - run: go mod download - - name: Test Sonr - if: env.GIT_DIFF - run: | - go test -v ./... - - coverage: - name: Scan/Upload Coverage - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - - name: SonarCloud Scan - uses: sonarsource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_PAT }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - docker: - name: Test Docker Build - runs-on: ubuntu-latest - env: - GO_VERSION: "1.19.12" # Replace with your Go version - GIT_VERSION: ${{ github.sha }} - GIT_COMMIT: ${{ github.sha }} - - steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Cache Go dependencies - uses: actions/cache@v2 - with: - path: /root/.cache/go-build - key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-build- - - - name: Cache Go modules - uses: actions/cache@v2 - with: - path: /root/go/pkg/mod - key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-mod- - - - name: Build Sonr Docker Image - run: | - docker build --build-arg GIT_VERSION=${GIT_VERSION} --build-arg GIT_COMMIT=${GIT_COMMIT} -f Dockerfile -t sonr . - lint-protos: name: Lint Protos and Check for Breaking Changes runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: bufbuild/buf-setup-action@v1 - - uses: bufbuild/buf-lint-action@v1 - with: - input: "proto" - uses: bufbuild/buf-breaking-action@v1 + continue-on-error: true with: input: "proto" against: "https://github.com/sonr-io/sonr.git#branch=master" diff --git a/.vscode/settings.json b/.vscode/settings.json index e9f0427e1..3bb433d38 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -51,7 +51,12 @@ "**/.hg": true, "**/CVS": true, "**/.DS_Store": true, - ".vscode/": true + ".vscode/": true, + "sonar-project.properties": true, + "LICENSE": true, + "codecov.yml": true, + "CODE_OF_CONDUCT.md": true, + "CHANGELOG.md": true }, "svg.preview.background": "custom", "typescript.preferences.importModuleSpecifier": "non-relative", diff --git a/CHANGELOG.md b/CHANGELOG.md index 554f95f7d..e5df5f9a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,7 +73,7 @@ This release has no changes ## [v0.7.3-beta.1](https://github.com/sonr-io/core/releases/tag/v0.7.3-beta.1) - 2023-07-28 01:32:34 * 9b2d7e8 * fix(authr.go): fix method call to serialize credential -* 8926128 *feat(crypto/keys.go): add EncryptionKey interface* refactor(account.go): update NewAccountV1 function signature to return v1types.KeyshareSet instead of *v1types.Keyshare* refactor(account.go): remove unused import of github.com/sonr-io/core/pkg/did/types *refactor(account.go): remove unused variable privKs in NewAccountV1 function* refactor(account.go): update return statement in NewAccountV1 function to return v1types.EmptyKeyshareSet() instead of nil *refactor(account.go): update return statement in NewAccountV1 function to return kss instead of privKs* refactor(account.go): remove DIDIdentifier method from AccountV1 struct *refactor(account.go): remove DIDMethod method from AccountV1 struct* refactor(account.go): remove DIDUrl method from AccountV1 struct * refactor(account.go): remove comment explaining PublicKey method, as it is incomplete +* 8926128 *feat(crypto/keys.go): add EncryptionKey interface* refactor(account.go): update NewAccountV1 function signature to return v1types.KeyshareSet instead of *v1types.Keyshare* refactor(account.go): remove unused import of github.com/sonr-io/core/services/did/types *refactor(account.go): remove unused variable privKs in NewAccountV1 function* refactor(account.go): update return statement in NewAccountV1 function to return v1types.EmptyKeyshareSet() instead of nil *refactor(account.go): update return statement in NewAccountV1 function to return kss instead of privKs* refactor(account.go): remove DIDIdentifier method from AccountV1 struct *refactor(account.go): remove DIDMethod method from AccountV1 struct* refactor(account.go): remove DIDUrl method from AccountV1 struct * refactor(account.go): remove comment explaining PublicKey method, as it is incomplete * ca6183b *refactor(keyshare.go): remove unnecessary role check in GetAliceDKGResult() method* refactor(keyshare.go): remove unnecessary role check in GetBobDKGResult() method * d61b5b3 * chore(application-services.mdx): delete application-services.mdx file from docs/static/whitepaper directory * a6f2a7c *chore(account.go): remove unused code in Marshal method* chore(account.go): remove unused code in Unmarshal method * feat(keyshare.go): add UnmarshalAlice method to unmarshal keyshare for Alice diff --git a/Dockerfile.dev b/Dockerfile.dev deleted file mode 100644 index 2d581b2ee..000000000 --- a/Dockerfile.dev +++ /dev/null @@ -1,69 +0,0 @@ -ARG GO_VERSION="1.19" -ARG RUNNER_IMAGE="alpine:3.16" - -# ! ||--------------------------------------------------------------------------------|| -# ! || Sonrd Builder || -# ! ||--------------------------------------------------------------------------------|| -FROM golang:${GO_VERSION}-alpine as sonr-builder - -ARG arch=x86_64 - -RUN apk add --no-cache \ - ca-certificates \ - build-base \ - linux-headers - -# Download go dependencies -WORKDIR /root -COPY go.mod go.sum ./ -RUN --mount=type=cache,target=/root/.cache/go-build \ - --mount=type=cache,target=/root/go/pkg/mod \ - go mod download - -# Cosmwasm - Download correct libwasmvm version -RUN set -eux; \ - export ARCH=$(uname -m); \ - WASM_VERSION=$(go list -m all | grep github.com/CosmWasm/wasmvm | awk '{print $2}'); \ - if [ ! -z "${WASM_VERSION}" ]; then \ - wget -O /lib/libwasmvm_muslc.a https://github.com/CosmWasm/wasmvm/releases/download/${WASM_VERSION}/libwasmvm_muslc.${ARCH}.a; \ - fi; \ - go mod download; - -# Copy the remaining files -COPY . . -RUN --mount=type=cache,target=/root/.cache/go-build \ - --mount=type=cache,target=/root/go/pkg/mod \ - GOWORK=off go build \ - -mod=readonly \ - -tags "netgo,ledger,muslc" \ - -ldflags \ - "-X github.com/cosmos/cosmos-sdk/version.Name="sonr" \ - -X github.com/cosmos/cosmos-sdk/version.AppName="sonrd" \ - -X github.com/cosmos/cosmos-sdk/version.Version=${GIT_VERSION} \ - -X github.com/cosmos/cosmos-sdk/version.Commit=${GIT_COMMIT} \ - -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,muslc \ - -w -s -linkmode=external -extldflags '-Wl,-z,muldefs -static'" \ - -trimpath \ - -o /root/sonr/build/sonrd ./cmd/sonrd/main.go - - -# ! ||----------------------------------------------------------------------------------|| -# ! || Sonr Standalone Node || -# ! ||----------------------------------------------------------------------------------|| -FROM --platform=linux alpine - -LABEL org.opencontainers.image.source https://github.com/sonr-io/core -LABEL org.opencontainers.image.description "Base sonr daemon image" -# Copy sonrd binary and config -COPY --from=sonr-builder /root/sonr/build/sonrd /usr/local/bin/sonrd -COPY sonr.yml sonr.yml -COPY scripts scripts -ENV SONR_LAUNCH_CONFIG=/sonr.yml - -# Expose ports -EXPOSE 26657 -EXPOSE 1317 -EXPOSE 26656 -EXPOSE 8080 -EXPOSE 9090 - diff --git a/Makefile b/Makefile index 9ad0a1995..49e356241 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,25 @@ BRANCH := $(shell git rev-parse --abbrev-ref HEAD) COMMIT := $(shell git log -1 --format='%H') +VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//') +COMMIT := $(shell git log -1 --format='%H') +PATH := $(PATH):/usr/local/go/bin +LEDGER_ENABLED ?= false +DOCKER := $(shell which docker) +E2E_UPGRADE_VERSION := "v17" +#SHELL := /bin/bash + +GH_IMAGE=ghcr.io/sonr-io/sonrd +DO_IMAGE=registry.digitalocean.com/sonrhq/sonrd + +GO_VERSION := $(shell cat go.mod | grep -E 'go [0-9].[0-9]+' | cut -d ' ' -f 2) +GO_MODULE := $(shell cat go.mod | grep "module " | cut -d ' ' -f 2) +GO_MAJOR_VERSION = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1) +GO_MINOR_VERSION = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2) +protoVer=0.11.2 +protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) +protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) + ifeq (,$(VERSION)) VERSION := $(shell git describe --tags) # if VERSION is empty, then populate it with branch's name and raw commit hash @@ -91,8 +110,9 @@ install: go.sum build: go build $(BUILD_FLAGS) -o bin/sonrd ./cmd/sonrd -docker-build-debug: - @DOCKER_BUILDKIT=1 docker build -t sonr:debug -f Dockerfile . +docker-build: + docker build -t $(GH_IMAGE) -t $(DO_IMAGE) -f Dockerfile . + docker push $(GH_IMAGE) --all-tags lint: @find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -name '*.pb.go' -not -name '*.gw.go' | xargs go run mvdan.cc/gofumpt -w . @@ -128,6 +148,8 @@ proto-check-breaking: @$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main .PHONY: proto-all proto-gen proto-format proto-lint proto-check-breaking + +############################################################################### ### Interchain test ### ############################################################################### @@ -158,3 +180,97 @@ ictest-push-wasm: cd tests/interchaintest && go test -race -v -run TestPushWasmClientCode . .PHONY: ictest-start-cosmos ictest-start-polkadot ictest-ibc ictest-push-wasm ictest-all + +############################################################################### +### Release ### +############################################################################### +GORELEASER_IMAGE := ghcr.io/goreleaser/goreleaser-cross:v$(GO_VERSION) +COSMWASM_VERSION := $(shell go list -m github.com/CosmWasm/wasmvm | sed 's/.* //') + +release: + docker run \ + --rm \ + -e GITHUB_TOKEN=$(GITHUB_TOKEN) \ + -e COSMWASM_VERSION=$(COSMWASM_VERSION) \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v `pwd`:/go/src/sonrd \ + -w /go/src/sonrd \ + $(GORELEASER_IMAGE) \ + release \ + --clean + +release-docker: + task release + +release-dry-run: + docker run \ + --rm \ + -e COSMWASM_VERSION=$(COSMWASM_VERSION) \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v `pwd`:/go/src/sonrd \ + -w /go/src/sonrd \ + $(GORELEASER_IMAGE) \ + release \ + --clean \ + --skip-publish + +release-snapshot: + docker run \ + --rm \ + -e COSMWASM_VERSION=$(COSMWASM_VERSION) \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v `pwd`:/go/src/sonrd \ + -w /go/src/sonrd \ + $(GORELEASER_IMAGE) \ + release \ + --clean \ + --snapshot \ + --skip-validate \ + --skip-publish + + +############################################################################### +### Linting ### +############################################################################### + +lint: + @echo "--> Running linter" + @go run github.com/golangci/golangci-lint/cmd/golangci-lint run --timeout=10m + @docker run -v $(PWD):/workdir ghcr.io/igorshubovych/markdownlint-cli:latest "**/*.md" + +format: + @go run github.com/golangci/golangci-lint/cmd/golangci-lint run ./... --fix + @go run mvdan.cc/gofumpt -l -w x/ app/ ante/ tests/ + @docker run -v $(PWD):/workdir ghcr.io/igorshubovych/markdownlint-cli:latest "**/*.md" --fix + +mdlint: + @echo "--> Running markdown linter" + @docker run -v $(PWD):/workdir ghcr.io/igorshubovych/markdownlint-cli:latest "**/*.md" + +markdown: + @docker run -v $(PWD):/workdir ghcr.io/igorshubovych/markdownlint-cli:latest "**/*.md" --fix + + + +############################################################################### +### Protobuf ### +############################################################################### + +proto-all: proto-format proto-lint proto-gen + +proto-gen: + @echo "Generating Protobuf files" + @$(protoImage) sh ./scripts/protocgen.sh + +proto-swagger-gen: + @echo "Generating Protobuf Swagger" + @$(protoImage) sh ./scripts/protoc-swagger-gen.sh + +proto-format: + @$(protoImage) find ./ -name "*.proto" -exec clang-format -i {} \; + +proto-lint: + @$(protoImage) buf lint --error-format=json + +proto-check-breaking: + @$(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main diff --git a/README.md b/README.md index 862b36198..1aefa30fa 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ Sonr is a [blockchain node](https://sonr.io/dashboard) which you can run locally ![Architecture](.github/images/architecture.svg) See [additional details](https://sonr.io/docs) on these components. - + - + --> --- diff --git a/Taskfile.yml b/Taskfile.yml index cdfeca98b..ac192ed25 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,9 +1,14 @@ version: "3" dotenv: [".env", "{{.ENV}}/.env.", "{{.HOME}}/.env"] - +includes: + docker: + taskfile: ./docker/Taskfile.yml + dir: . + proto: + taskfile: ./proto/Taskfile.yml + dir: ./proto vars: CGO_ENABLED: 1 - REGISTRY: "ghcr.io/sonr-io" WASMVM_URL: https://github.com/CosmWasm/wasmvm/releases/download VERSION: sh: echo $(git describe --tags --abbrev=0) @@ -24,10 +29,10 @@ vars: sh: echo $GITHUB_TOKEN default: "" GORELEASER_IMAGE: ghcr.io/goreleaser/goreleaser-cross:v{{.GO_VERSION}} -tasks: # ---------------------------------------------------------------------------- # -- Run Tasks --------------------------------------------------------------- # ---------------------------------------------------------------------------- +tasks: default: desc: Print the version silent: true @@ -35,59 +40,19 @@ tasks: - task -l build: - desc: Build the binary for all platforms + aliases: + - b + desc: Build the binary for current platform cmds: - make build - release-docker: - desc: Build the binary for docker - cmds: - - task: docker-build-push - vars: - IMAGE: sonrd - - - docker-build-push: - silent: true - internal: true - desc: Build, tag and push the docker image - cmds: - - docker build -f ./Dockerfile . -t {{.IMAGE}} - - docker tag {{.IMAGE}} {{.IMAGE}}:latest - - docker tag {{.IMAGE}} {{.REGISTRY}}/{{.IMAGE}}:latest - - docker tag {{.IMAGE}} {{.REGISTRY}}/{{.IMAGE}}:{{.VERSION}} - - docker tag {{.IMAGE}} {{.REGISTRY}}/{{.IMAGE}}:{{.COMMIT}} - requires: - vars: [IMAGE] - - # ---------------------------------------------------------------------------- - # -- Protobuf Tasks ------------------------------------------------------------- - # ---------------------------------------------------------------------------- - buf-mod: - dir: proto - internal: true - silent: true - desc: Update the buf.lock file - cmds: - - buf mod update - - buf-build: - dir: proto - internal: true - silent: true - desc: Build the protobuf files - deps: [buf-mod] - cmds: - - buf build - - buf-push: - dir: proto - internal: true - silent: true - desc: Push the protobuf files to the registry - deps: [buf-build] + build-all: + aliases: + - ba + desc: Build the binary for all platforms and docker cmds: - - buf push + - make build + - task: docker:build generate: aliases: @@ -96,23 +61,4 @@ tasks: cmds: - | make proto-all - git add . - git commit -m "chore: update proto files" - - go-cross-build: - desc: Build the binary for all platforms - cmds: - - | - docker run \ - --rm \ - -e COSMWASM_VERSION={{.COSMWASM_VERSION}} \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -v `pwd`:/go/src/sonrd \ - -w /go/src/sonrd \ - {{.GORELEASER_IMAGE}} \ - build \ - --clean \ - --skip=validate \ - --id={{.ID}} \ - requires: - vars: [ID] + cd proto && buf generate --template buf.gen.pulsar.yaml diff --git a/app/app.go b/app/app.go index 239379ce8..176ab9e99 100644 --- a/app/app.go +++ b/app/app.go @@ -569,9 +569,6 @@ icahosttypes.StoreKey, app.BankKeeper, ) identityModule := identitymodule.NewAppModule(appCodec, app.IdentityKeeper, app.AccountKeeper, app.BankKeeper) - - identityIBCModule := identitymodule.NewIBCModule(app.IdentityKeeper) - app.ServiceKeeper = *servicemodulekeeper.NewKeeper( appCodec, keys[servicemoduletypes.StoreKey], @@ -602,7 +599,6 @@ icahosttypes.StoreKey, ibcRouter := ibcporttypes.NewRouter() ibcRouter.AddRoute(icahosttypes.SubModuleName, icaHostIBCModule). AddRoute(ibctransfertypes.ModuleName, transferIBCModule) - ibcRouter.AddRoute(identitymoduletypes.ModuleName, identityIBCModule) // this line is used by starport scaffolding # ibc/app/router app.IBCKeeper.SetRouter(ibcRouter) diff --git a/bob.yaml b/bob.yaml index 65612cfb5..b7330572b 100644 --- a/bob.yaml +++ b/bob.yaml @@ -1,5 +1,7 @@ # Pin nixpkgs to get reproducable behaviour. nixpkgs: https://github.com/NixOS/nixpkgs/archive/refs/tags/23.05.tar.gz +dependencies: [go-task, go_1_19, git, wget, docker, gcc] +project: bob.build/sonr/core # Declare tasks below the build keyword. build: @@ -7,7 +9,6 @@ build: build: dependson: - binary - - docker # generate - is the default task execute when executing code generation. generate: @@ -19,17 +20,14 @@ build: cmd: task build target: ./bin/sonrd + # release - is the default task execute when building release. + release: + cmd: make release + # docker - is the default task execute when building docker image. docker: - cmd: task release-docker + cmd: task docker:build dependson: - binary target: image: ghcr.io/sonr-io/sonrd:latest -dependencies: - - go-task - - go_1_19 - - git - - wget - - docker - - gcc diff --git a/cmd/sonrd/cmd/geninit.go b/cmd/sonrd/cmd/geninit.go index 67c6835e8..6ff324f09 100644 --- a/cmd/sonrd/cmd/geninit.go +++ b/cmd/sonrd/cmd/geninit.go @@ -20,7 +20,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil" "github.com/cosmos/go-bip39" "github.com/pkg/errors" - "github.com/sonr-io/core/cmd/sonrd/config" + "github.com/sonr-io/core/config" "github.com/spf13/cobra" ) diff --git a/cmd/sonrd/cmd/launch.go b/cmd/sonrd/cmd/launch.go index 45d15b76c..c99d2f16d 100644 --- a/cmd/sonrd/cmd/launch.go +++ b/cmd/sonrd/cmd/launch.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/x/genutil/types" - "github.com/sonr-io/core/cmd/sonrd/config" + "github.com/sonr-io/core/config" "github.com/spf13/cobra" ) diff --git a/cmd/sonrd/cmd/plugin.go b/cmd/sonrd/cmd/plugin.go new file mode 100644 index 000000000..548b5564b --- /dev/null +++ b/cmd/sonrd/cmd/plugin.go @@ -0,0 +1,583 @@ +package cmd + +import ( + "context" + "fmt" + "os" + "strings" + "time" + + "github.com/pkg/errors" + "github.com/spf13/cobra" + flag "github.com/spf13/pflag" + + pluginsconfig "github.com/sonr-io/core/config/plugins" + "github.com/sonr-io/core/pkg/clictx" + "github.com/sonr-io/core/pkg/cliui" + "github.com/sonr-io/core/pkg/cliui/icons" + "github.com/sonr-io/core/services/plugin" +) + +const ( + flagPluginsGlobal = "global" +) + +// plugins hold the list of plugin declared in the config. +// A global variable is used so the list is accessible to the plugin commands. +var plugins []*plugin.Plugin + +// LoadPlugins tries to load all the plugins found in configurations. +// If no configurations found, it returns w/o error. +func LoadPlugins(ctx context.Context, cmd *cobra.Command) error { + var ( + rootCmd = cmd.Root() + pluginsConfigs []pluginsconfig.Plugin + ) + localCfg, err := parseLocalPlugins(rootCmd) + if err != nil { + return err + } else if err == nil { + pluginsConfigs = append(pluginsConfigs, localCfg.Plugins...) + } + + globalCfg, err := parseGlobalPlugins() + if err == nil { + pluginsConfigs = append(pluginsConfigs, globalCfg.Plugins...) + } + ensureDefaultPlugins(cmd, globalCfg) + + if len(pluginsConfigs) == 0 { + return nil + } + + session := cliui.New(cliui.WithStdout(os.Stdout)) + defer session.End() + + uniquePlugins := pluginsconfig.RemoveDuplicates(pluginsConfigs) + plugins, err = plugin.Load(ctx, uniquePlugins, plugin.CollectEvents(session.EventBus())) + if err != nil { + return err + } + if len(plugins) == 0 { + return nil + } + + return linkPlugins(rootCmd, plugins) +} + +func parseLocalPlugins(cmd *cobra.Command) (*pluginsconfig.Config, error) { + // FIXME(tb): like other commands that works on a chain directory, + // parseLocalPlugins should rely on `-p` flag to guess that chain directory. + // Unfortunately parseLocalPlugins is invoked before flags are parsed, so + // we cannot rely on `-p` flag. As a workaround, we use the working dir. + // The drawback is we cannot load chain's plugin when using `-p`. + _ = cmd + wd, err := os.Getwd() + if err != nil { + return nil, fmt.Errorf("parse local plugins: %w", err) + } + return pluginsconfig.ParseDir(wd) +} + +func parseGlobalPlugins() (cfg *pluginsconfig.Config, err error) { + globalDir, err := plugin.PluginsPath() + if err != nil { + return cfg, err + } + + cfg, err = pluginsconfig.ParseDir(globalDir) + // if there is error parsing, return empty config and continue execution to load + // local plugins if they exist. + if err != nil { + return &pluginsconfig.Config{}, nil + } + + for i := range cfg.Plugins { + cfg.Plugins[i].Global = true + } + return +} + +func linkPlugins(rootCmd *cobra.Command, plugins []*plugin.Plugin) error { + // Link plugins to related commands + var linkErrors []*plugin.Plugin + for _, p := range plugins { + if p.Error != nil { + linkErrors = append(linkErrors, p) + continue + } + manifest, err := p.Interface.Manifest() + if err != nil { + p.Error = fmt.Errorf("Manifest() error: %w", err) + continue + } + linkPluginHooks(rootCmd, p, manifest.Hooks) + if p.Error != nil { + linkErrors = append(linkErrors, p) + continue + } + linkPluginCmds(rootCmd, p, manifest.Commands) + if p.Error != nil { + linkErrors = append(linkErrors, p) + continue + } + } + if len(linkErrors) > 0 { + // unload any plugin that could have been loaded + defer UnloadPlugins() + if err := printPlugins(cliui.New(cliui.WithStdout(os.Stdout))); err != nil { + // content of loadErrors is more important than a print error, so we don't + // return here, just print the error. + fmt.Printf("fail to print: %v\n", err) + } + var s strings.Builder + for _, p := range linkErrors { + fmt.Fprintf(&s, "%s: %v", p.Path, p.Error) + } + return errors.Errorf("fail to link: %v", s.String()) + } + return nil +} + +// UnloadPlugins releases any loaded plugins, which is basically killing the +// plugin server instance. +func UnloadPlugins() { + for _, p := range plugins { + p.KillClient() + } +} + +func linkPluginHooks(rootCmd *cobra.Command, p *plugin.Plugin, hooks []plugin.Hook) { + if p.Error != nil { + return + } + for _, hook := range hooks { + linkPluginHook(rootCmd, p, hook) + } +} + +func linkPluginHook(rootCmd *cobra.Command, p *plugin.Plugin, hook plugin.Hook) { + cmdPath := hook.PlaceHookOnFull() + cmd := findCommandByPath(rootCmd, cmdPath) + if cmd == nil { + p.Error = errors.Errorf("unable to find commandPath %q for plugin hook %q", cmdPath, hook.Name) + return + } + if !cmd.Runnable() { + p.Error = errors.Errorf("can't attach plugin hook %q to non executable command %q", hook.Name, hook.PlaceHookOn) + return + } + + newExecutedHook := func(hook plugin.Hook, cmd *cobra.Command, args []string) plugin.ExecutedHook { + execHook := plugin.ExecutedHook{ + Hook: hook, + ExecutedCommand: plugin.ExecutedCommand{ + Use: cmd.Use, + Path: cmd.CommandPath(), + Args: args, + OSArgs: os.Args, + With: p.With, + }, + } + execHook.ExecutedCommand.SetFlags(cmd) + return execHook + } + + preRun := cmd.PreRunE + cmd.PreRunE = func(cmd *cobra.Command, args []string) error { + if preRun != nil { + err := preRun(cmd, args) + if err != nil { + return err + } + } + err := p.Interface.ExecuteHookPre(newExecutedHook(hook, cmd, args)) + if err != nil { + return fmt.Errorf("plugin %q ExecuteHookPre() error: %w", p.Path, err) + } + return nil + } + + runCmd := cmd.RunE + + cmd.RunE = func(cmd *cobra.Command, args []string) error { + if runCmd != nil { + err := runCmd(cmd, args) + // if the command has failed the `PostRun` will not execute. here we execute the cleanup step before returnning. + if err != nil { + err := p.Interface.ExecuteHookCleanUp(newExecutedHook(hook, cmd, args)) + if err != nil { + fmt.Printf("plugin %q ExecuteHookCleanUp() error: %v", p.Path, err) + } + } + return err + } + + time.Sleep(100 * time.Millisecond) + return nil + } + + postCmd := cmd.PostRunE + cmd.PostRunE = func(cmd *cobra.Command, args []string) error { + execHook := newExecutedHook(hook, cmd, args) + + defer func() { + err := p.Interface.ExecuteHookCleanUp(execHook) + if err != nil { + fmt.Printf("plugin %q ExecuteHookCleanUp() error: %v", p.Path, err) + } + }() + + if preRun != nil { + err := postCmd(cmd, args) + if err != nil { + // dont return the error, log it and let execution continue to `Run` + return err + } + } + + err := p.Interface.ExecuteHookPost(execHook) + if err != nil { + return fmt.Errorf("plugin %q ExecuteHookPost() error : %w", p.Path, err) + } + return nil + } +} + +// linkPluginCmds tries to add the plugin commands to the legacy ignite +// commands. +func linkPluginCmds(rootCmd *cobra.Command, p *plugin.Plugin, pluginCmds []plugin.Command) { + if p.Error != nil { + return + } + for _, pluginCmd := range pluginCmds { + linkPluginCmd(rootCmd, p, pluginCmd) + if p.Error != nil { + return + } + } +} + +func linkPluginCmd(rootCmd *cobra.Command, p *plugin.Plugin, pluginCmd plugin.Command) { + cmdPath := pluginCmd.PlaceCommandUnderFull() + cmd := findCommandByPath(rootCmd, cmdPath) + if cmd == nil { + p.Error = errors.Errorf("unable to find commandPath %q for plugin %q", cmdPath, p.Path) + return + } + if cmd.Runnable() { + p.Error = errors.Errorf("can't attach plugin command %q to runnable command %q", pluginCmd.Use, cmd.CommandPath()) + return + } + + // Check for existing commands + // pluginCmd.Use can be like `command [args]` so we need to remove those + // extra args if any. + pluginCmdName := strings.Split(pluginCmd.Use, " ")[0] + for _, cmd := range cmd.Commands() { + if cmd.Name() == pluginCmdName { + p.Error = errors.Errorf("plugin command %q already exists in ignite's commands", pluginCmdName) + return + } + } + + newCmd, err := pluginCmd.ToCobraCommand() + if err != nil { + p.Error = err + return + } + cmd.AddCommand(newCmd) + + // NOTE(tb) we could probably simplify by removing this condition and call the + // plugin even if the invoked command isn't runnable. If we do so, the plugin + // will be responsible for outputing the standard cobra output, which implies + // it must use cobra too. This is how cli-plugin-network works, but to make + // it for all, we need to change the `plugin scaffold` output (so it outputs + // something similar than the cli-plugin-network) and update the docs. + if len(pluginCmd.Commands) == 0 { + // pluginCmd has no sub commands, so it's runnable + newCmd.RunE = func(cmd *cobra.Command, args []string) error { + return clictx.Do(cmd.Context(), func() error { + execCmd := plugin.ExecutedCommand{ + Use: cmd.Use, + Path: cmd.CommandPath(), + Args: args, + OSArgs: os.Args, + With: p.With, + } + execCmd.SetFlags(cmd) + // Call the plugin Execute + err := p.Interface.Execute(execCmd) + // NOTE(tb): This pause gives enough time for go-plugin to sync the + // output from stdout/stderr of the plugin. Without that pause, this + // output can be discarded and not printed in the user console. + time.Sleep(100 * time.Millisecond) + return err + }) + } + } else { + for _, pluginCmd := range pluginCmd.Commands { + pluginCmd.PlaceCommandUnder = newCmd.CommandPath() + linkPluginCmd(newCmd, p, pluginCmd) + if p.Error != nil { + return + } + } + } +} + +func findCommandByPath(cmd *cobra.Command, cmdPath string) *cobra.Command { + if cmd.CommandPath() == cmdPath { + return cmd + } + for _, cmd := range cmd.Commands() { + if cmd := findCommandByPath(cmd, cmdPath); cmd != nil { + return cmd + } + } + return nil +} + +// NewPlugin returns a command that groups plugin related sub commands. +func NewPlugin() *cobra.Command { + c := &cobra.Command{ + Use: "plugin [command]", + Short: "Handle plugins", + } + + c.AddCommand(NewPluginList()) + c.AddCommand(NewPluginUpdate()) + c.AddCommand(NewPluginAdd()) + c.AddCommand(NewPluginRemove()) + + return c +} + +func NewPluginList() *cobra.Command { + lstCmd := &cobra.Command{ + Use: "list", + Short: "List declared plugins and status", + Long: "Prints status and information of declared plugins", + RunE: func(_ *cobra.Command, _ []string) error { + s := cliui.New(cliui.WithStdout(os.Stdout)) + return printPlugins(s) + }, + } + return lstCmd +} + +func NewPluginUpdate() *cobra.Command { + return &cobra.Command{ + Use: "update [path]", + Short: "Update plugins", + Long: "Updates a plugin specified by path. If no path is specified all declared plugins are updated", + Args: cobra.MaximumNArgs(1), + RunE: func(_ *cobra.Command, args []string) error { + if len(args) == 0 { + // update all plugins + err := plugin.Update(plugins...) + if err != nil { + return err + } + fmt.Printf("All plugins updated.\n") + return nil + } + // find the plugin to update + for _, p := range plugins { + if p.Path == args[0] { + err := plugin.Update(p) + if err != nil { + return err + } + fmt.Printf("Plugin %q updated.\n", p.Path) + return nil + } + } + return errors.Errorf("Plugin %q not found", args[0]) + }, + } +} + +func NewPluginAdd() *cobra.Command { + cmdPluginAdd := &cobra.Command{ + Use: "add [path] [key=value]...", + Short: "Adds a plugin declaration to a plugin configuration", + Long: `Adds a plugin declaration to a plugin configuration. +Respects key value pairs declared after the plugin path to be added to the +generated configuration definition. +Example: + ignite plugin add github.com/org/my-plugin/ foo=bar baz=qux`, + Args: cobra.MinimumNArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + session := cliui.New(cliui.WithStdout(os.Stdout)) + defer session.End() + + var ( + conf *pluginsconfig.Config + err error + ) + + global := flagGetPluginsGlobal(cmd) + if global { + conf, err = parseGlobalPlugins() + } else { + conf, err = parseLocalPlugins(cmd) + } + if err != nil { + return err + } + + for _, p := range conf.Plugins { + if p.Path == args[0] { + return fmt.Errorf("cannot add duplicate plugin %s", args[0]) + } + } + + p := pluginsconfig.Plugin{ + Path: args[0], + With: make(map[string]string), + Global: global, + } + + pluginsOptions := []plugin.Option{ + plugin.CollectEvents(session.EventBus()), + } + + var pluginArgs []string + if len(args) > 1 { + pluginArgs = args[1:] + } + + for _, pa := range pluginArgs { + kv := strings.Split(pa, "=") + if len(kv) != 2 { + return fmt.Errorf("malformed key=value arg: %s", pa) + } + p.With[kv[0]] = kv[1] + } + + session.StartSpinner("Loading plugin") + plugins, err := plugin.Load(cmd.Context(), []pluginsconfig.Plugin{p}, pluginsOptions...) + if err != nil { + return err + } + defer plugins[0].KillClient() + + if plugins[0].Error != nil { + return fmt.Errorf("error while loading plugin %q: %w", args[0], plugins[0].Error) + } + session.Println("Done loading plugin") + conf.Plugins = append(conf.Plugins, p) + + if err := conf.Save(); err != nil { + return err + } + + session.Printf("๐ŸŽ‰ %s added \n", args[0]) + return nil + }, + } + + cmdPluginAdd.Flags().AddFlagSet(flagSetPluginsGlobal()) + + return cmdPluginAdd +} + +func NewPluginRemove() *cobra.Command { + cmdPluginRemove := &cobra.Command{ + Use: "remove [path]", + Aliases: []string{"rm"}, + Short: "Removes a plugin declaration from a chain's plugin configuration", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + s := cliui.New(cliui.WithStdout(os.Stdout)) + + var ( + conf *pluginsconfig.Config + err error + ) + + global := flagGetPluginsGlobal(cmd) + if global { + conf, err = parseGlobalPlugins() + } else { + conf, err = parseLocalPlugins(cmd) + } + if err != nil { + return err + } + + removed := false + for i, cp := range conf.Plugins { + if cp.Path == args[0] { + conf.Plugins = append(conf.Plugins[:i], conf.Plugins[i+1:]...) + removed = true + break + } + } + + if !removed { + // return if no matching plugin path found + return fmt.Errorf("plugin %s not found", args[0]) + } + + if err := conf.Save(); err != nil { + return err + } + + s.Printf("%s %s removed\n", icons.OK, args[0]) + s.Printf("\t%s updated\n", conf.Path()) + + return nil + }, + } + + cmdPluginRemove.Flags().AddFlagSet(flagSetPluginsGlobal()) + + return cmdPluginRemove +} + +func printPlugins(session *cliui.Session) error { + var ( + entries [][]string + buildStatus = func(p *plugin.Plugin) string { + if p.Error != nil { + return fmt.Sprintf("%s Error: %v", icons.NotOK, p.Error) + } + manifest, err := p.Interface.Manifest() + if err != nil { + return fmt.Sprintf("%s Error: Manifest() returned %v", icons.NotOK, err) + } + var ( + hookCount = len(manifest.Hooks) + cmdCount = len(manifest.Commands) + ) + return fmt.Sprintf("%s Loaded: %s %d %s%d ", icons.OK, icons.Command, cmdCount, icons.Hook, hookCount) + } + installedStatus = func(p *plugin.Plugin) string { + if p.IsGlobal() { + return "global" + } + return "local" + } + ) + for _, p := range plugins { + entries = append(entries, []string{p.Path, buildStatus(p), installedStatus(p)}) + } + if err := session.PrintTable([]string{"Path", "Status", "Config"}, entries...); err != nil { + return fmt.Errorf("error while printing plugins: %w", err) + } + return nil +} + +func flagSetPluginsGlobal() *flag.FlagSet { + fs := flag.NewFlagSet("", flag.ContinueOnError) + fs.BoolP(flagPluginsGlobal, "g", false, "use global plugins configuration"+ + " ($HOME/.sonr/plugins/plugins.yml)") + return fs +} + +func flagGetPluginsGlobal(cmd *cobra.Command) bool { + global, _ := cmd.Flags().GetBool(flagPluginsGlobal) + return global +} diff --git a/cmd/sonrd/cmd/plugin_default.go b/cmd/sonrd/cmd/plugin_default.go new file mode 100644 index 000000000..950d2cdbd --- /dev/null +++ b/cmd/sonrd/cmd/plugin_default.go @@ -0,0 +1,111 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" + + pluginsconfig "github.com/sonr-io/core/config/plugins" + "github.com/sonr-io/core/pkg/cliui" + "github.com/sonr-io/core/services/plugin" +) + +type defaultPlugin struct { + use string + short string + aliases []string + path string +} + +func defaultNetworkPlugin() string { + const ( + PluginNetworkVersion = "v0.2.0" + PluginNetworkPath = "github.com/sonr-eco/cli-plugin-network@" + PluginNetworkVersion + ) + return PluginNetworkPath +} + +// defaultPlugins holds the plugin that are considered trustable and for which +// a command will added if the plugin is not already installed. +// When the user executes that command, the plugin is automatically installed. +var defaultPlugins = []defaultPlugin{ + { + use: "network", + short: "Launch a blockchain in production", + aliases: []string{"n"}, + path: defaultNetworkPlugin(), + }, +} + +// ensureDefaultPlugins ensures that all defaultPlugins are wether registered +// in cfg OR have an install command added to rootCmd. +func ensureDefaultPlugins(rootCmd *cobra.Command, cfg *pluginsconfig.Config) { + for _, dp := range defaultPlugins { + // Check if plugin is declared in global config + if cfg.HasPlugin(dp.path) { + // plugin found nothing to do + continue + } + // plugin not found in config, add a proxy install command + rootCmd.AddCommand(newPluginInstallCmd(dp)) + } +} + +// newPluginInstallCmd mimics the plugin command but acts as proxy to first: +// - register the config in the global config +// - load the plugin +// - execute the command thanks to the loaded plugin. +func newPluginInstallCmd(dp defaultPlugin) *cobra.Command { + return &cobra.Command{ + Use: dp.use, + Short: dp.short, + Aliases: dp.aliases, + DisableFlagParsing: true, // Avoid -h to skip command run + RunE: func(cmd *cobra.Command, _ []string) error { + cfg, err := parseGlobalPlugins() + if err != nil { + return err + } + if cfg.HasPlugin(dp.path) { + // plugin already declared in global plugins, this shouldn't happen + // because this is actually why this command has been added, so let's + // break violently + panic(fmt.Sprintf("plugin %q unexpected in global config", dp.path)) + } + + // add plugin to config + pluginCfg := pluginsconfig.Plugin{ + Path: dp.path, + } + cfg.Plugins = append(cfg.Plugins, pluginCfg) + if err := cfg.Save(); err != nil { + return err + } + + session := cliui.New() + defer session.End() + + // load and link the plugin + plugins, err := plugin.Load( + cmd.Context(), + []pluginsconfig.Plugin{pluginCfg}, + plugin.CollectEvents(session.EventBus()), + ) + if err != nil { + return err + } + defer plugins[0].KillClient() + + // Keep reference of the root command before removal + rootCmd := cmd.Root() + // Remove this command before call to linkPlugins because a plugin is + // usually not allowed to override an existing command. + rootCmd.RemoveCommand(cmd) + if err := linkPlugins(rootCmd, plugins); err != nil { + return err + } + // Execute the command + return rootCmd.Execute() + }, + } +} diff --git a/cmd/sonrd/cmd/root.go b/cmd/sonrd/cmd/root.go index a1063509e..b40613f93 100644 --- a/cmd/sonrd/cmd/root.go +++ b/cmd/sonrd/cmd/root.go @@ -1,6 +1,7 @@ package cmd import ( + "context" "errors" "fmt" "io" @@ -9,6 +10,7 @@ import ( "strings" // this line is used by starport scaffolding # root/moduleImport + "github.com/CosmWasm/wasmd/x/wasm" dbm "github.com/cometbft/cometbft-db" tmcfg "github.com/cometbft/cometbft/config" @@ -36,8 +38,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - sonrdconfig "github.com/sonr-io/core/cmd/sonrd/config" - "github.com/sonr-io/core/internal/highway" "github.com/spf13/cast" "github.com/spf13/cobra" "github.com/spf13/pflag" @@ -45,6 +45,8 @@ import ( "github.com/sonr-io/core/app" appparams "github.com/sonr-io/core/app/params" + sonrdconfig "github.com/sonr-io/core/config" + "github.com/sonr-io/core/internal/highway" ) var ( @@ -149,6 +151,7 @@ func initRootCmd( banktypes.GenesisBalancesIterator{}, app.DefaultNodeHome, ), + NewPlugin(), genutilcli.ValidateGenesisCmd(app.ModuleBasics), AddGenesisAccountCmd(app.DefaultNodeHome), tmcli.NewCompletionCmd(rootCmd, true), @@ -157,6 +160,11 @@ func initRootCmd( // this line is used by starport scaffolding # root/commands ) + // Load plugins if any + if err := LoadPlugins(context.Background(), rootCmd); err != nil { + panic(err) + } + a := appCreator{ encodingConfig, } diff --git a/cmd/sonrd/config/config.go b/config/config.go similarity index 94% rename from cmd/sonrd/config/config.go rename to config/config.go index c09abe331..416845f1b 100644 --- a/cmd/sonrd/config/config.go +++ b/config/config.go @@ -1,5 +1,10 @@ package config +import ( + "github.com/sonr-io/core/pkg/env" + "github.com/sonr-io/core/pkg/xfilepath" +) + var c Config // Config is defining a struct type named `Config`. This struct is used to store the configuration values for the application. It has various fields that correspond to different configuration parameters, such as version, chain ID, launch settings, database settings, node settings, genesis settings, etc. Each field is annotated with `mapstructure` tags, which are used to map the corresponding configuration values from a YAML file to the struct fields. @@ -100,3 +105,6 @@ type Config struct { } `mapstructure:"validators"` } `mapstructure:"genesis"` } + +// DirPath returns the path of configuration directory of Ignite. +var DirPath = xfilepath.Mkdir(env.ConfigDir()) diff --git a/cmd/sonrd/config/defaults.go b/config/defaults.go similarity index 96% rename from cmd/sonrd/config/defaults.go rename to config/defaults.go index c58a7fa84..fe517eb21 100644 --- a/cmd/sonrd/config/defaults.go +++ b/config/defaults.go @@ -35,6 +35,10 @@ Sonr Node ๐Ÿš€ - https://github.com/sonr-io/sonr ` +const bip44_purpose = 44 + +const bip44_coin_type = 703 + // Init initializes the configuration parameters. func Init() { // Set defaults @@ -57,6 +61,8 @@ func initSDKConfig() { config.SetBech32PrefixForAccount(app.AccountAddressPrefix, accountPubKeyPrefix) config.SetBech32PrefixForValidator(validatorAddressPrefix, validatorPubKeyPrefix) config.SetBech32PrefixForConsensusNode(consNodeAddressPrefix, consNodePubKeyPrefix) + config.SetCoinType(bip44_coin_type) + config.SetPurpose(bip44_purpose) config.Seal() } diff --git a/cmd/sonrd/config/env.go b/config/env.go similarity index 100% rename from cmd/sonrd/config/env.go rename to config/env.go diff --git a/cmd/sonrd/config/flags.go b/config/flags.go similarity index 100% rename from cmd/sonrd/config/flags.go rename to config/flags.go diff --git a/config/plugins/config.go b/config/plugins/config.go new file mode 100644 index 000000000..a003d185d --- /dev/null +++ b/config/plugins/config.go @@ -0,0 +1,152 @@ +package plugins + +import ( + "errors" + "fmt" + "os" + "strings" + + "golang.org/x/exp/slices" + "gopkg.in/yaml.v2" + + "github.com/sonr-io/core/pkg/gomodule" +) + +type Config struct { + // path to the config file + path string + + Plugins []Plugin `yaml:"plugins"` +} + +// Plugin keeps plugin name and location. +type Plugin struct { + // Path holds the location of the plugin. + // A path can be local, in that case it must start with a `/`. + // A remote path on the other hand, is an URL to a public remote git + // repository. For example: + // + // path: github.com/foo/bar + // + // It can contain a path inside that repository, if for instance the repo + // contains multiple plugins, for example: + // + // path: github.com/foo/bar/plugin1 + // + // It can also specify a tag or a branch, by adding a `@` and the branch/tag + // name at the end of the path. For example: + // + // path: github.com/foo/bar/plugin1@v42 + Path string `yaml:"path"` + // With holds arguments passed to the plugin interface + With map[string]string `yaml:"with,omitempty"` + // Global holds whether the plugin is installed globally + // (default: $HOME/.sonr/plugins/plugins.yml) or locally for a chain. + Global bool `yaml:"-"` +} + +// RemoveDuplicates takes a list of Plugins and returns a new list with only unique values. +// Local plugins take precedence over global plugins if duplicate paths exist. +// Duplicates are compared regardless of version. +func RemoveDuplicates(plugins []Plugin) (unique []Plugin) { + // struct to track plugin configs + type check struct { + hasPath bool + global bool + prevIndex int + } + + keys := make(map[string]check) + for i, plugin := range plugins { + c := keys[plugin.CanonicalPath()] + if !c.hasPath { + keys[plugin.CanonicalPath()] = check{ + hasPath: true, + global: plugin.Global, + prevIndex: i, + } + unique = append(unique, plugin) + } else if c.hasPath && !plugin.Global && c.global { // overwrite global plugin if local duplicate exists + unique[c.prevIndex] = plugin + } + } + + return unique +} + +// IsGlobal returns whether the plugin is installed globally or locally for a chain. +func (p Plugin) IsGlobal() bool { + return p.Global +} + +// IsLocalPath returns true if the plugin path is a local directory. +func (p Plugin) IsLocalPath() bool { + return strings.HasPrefix(p.Path, "/") +} + +// HasPath verifies if a plugin has the given path regardless of version. +// Example: +// github.com/foo/bar@v1 and github.com/foo/bar@v2 have the same path so "true" +// will be returned. +func (p Plugin) HasPath(path string) bool { + if path == "" { + return false + } + if p.Path == path { + return true + } + pluginPath := p.CanonicalPath() + path = strings.Split(path, "@")[0] + return pluginPath == path +} + +// CanonicalPath returns the canonical path of a plugin (excludes version ref). +func (p Plugin) CanonicalPath() string { + return strings.Split(p.Path, "@")[0] +} + +// Path return the path of the config file. +func (c Config) Path() string { + return c.path +} + +// Save persists a config yaml to a specified path on disk. +// Must be writable. +func (c *Config) Save() error { + errf := func(err error) error { + return fmt.Errorf("plugin config save: %w", err) + } + if c.path == "" { + return errf(errors.New("empty path")) + } + file, err := os.Create(c.path) + if err != nil { + return errf(err) + } + defer file.Close() + if err := yaml.NewEncoder(file).Encode(c); err != nil { + return errf(err) + } + return nil +} + +// HasPlugin returns true if c contains a plugin with given path. +// Returns also true if there's a local plugin with the module name equal to +// that path. +func (c Config) HasPlugin(path string) bool { + return slices.ContainsFunc(c.Plugins, func(cp Plugin) bool { + if cp.HasPath(path) { + return true + } + if cp.IsLocalPath() { + // check local plugin go.mod to see if module name match plugin path + gm, err := gomodule.ParseAt(cp.Path) + if err != nil { + // Skip if we can't parse gomod + return false + } + return Plugin{Path: gm.Module.Mod.Path}.HasPath(path) + } + return false + }) +} diff --git a/config/plugins/config_test.go b/config/plugins/config_test.go new file mode 100644 index 000000000..57e7ce9d9 --- /dev/null +++ b/config/plugins/config_test.go @@ -0,0 +1,246 @@ +package plugins_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + pluginsconfig "github.com/sonr-io/core/config/plugins" +) + +func TestPluginIsGlobal(t *testing.T) { + assert.False(t, pluginsconfig.Plugin{}.IsGlobal()) + assert.True(t, pluginsconfig.Plugin{Global: true}.IsGlobal()) +} + +func TestPluginIsLocalPath(t *testing.T) { + assert.False(t, pluginsconfig.Plugin{}.IsLocalPath()) + assert.False(t, pluginsconfig.Plugin{Path: "github.com/ignite/example"}.IsLocalPath()) + assert.True(t, pluginsconfig.Plugin{Path: "/home/bob/example"}.IsLocalPath()) +} + +func TestPluginHasPath(t *testing.T) { + tests := []struct { + name string + plugin pluginsconfig.Plugin + path string + expectedRes bool + }{ + { + name: "empty both path", + plugin: pluginsconfig.Plugin{}, + expectedRes: false, + }, + { + name: "simple path", + plugin: pluginsconfig.Plugin{ + Path: "github.com/ignite/example", + }, + path: "github.com/ignite/example", + expectedRes: true, + }, + { + name: "plugin path with ref", + plugin: pluginsconfig.Plugin{ + Path: "github.com/ignite/example@v1", + }, + path: "github.com/ignite/example", + expectedRes: true, + }, + { + name: "plugin path with empty ref", + plugin: pluginsconfig.Plugin{ + Path: "github.com/ignite/example@", + }, + path: "github.com/ignite/example", + expectedRes: true, + }, + { + name: "both path with different ref", + plugin: pluginsconfig.Plugin{ + Path: "github.com/ignite/example@v1", + }, + path: "github.com/ignite/example@v2", + expectedRes: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + res := tt.plugin.HasPath(tt.path) + + require.Equal(t, tt.expectedRes, res) + }) + } +} + +func TestPluginCanonicalPath(t *testing.T) { + tests := []struct { + name string + plugin pluginsconfig.Plugin + expectedPath string + }{ + { + name: "empty both path", + plugin: pluginsconfig.Plugin{}, + expectedPath: "", + }, + { + name: "simple path", + plugin: pluginsconfig.Plugin{ + Path: "github.com/ignite/example", + }, + expectedPath: "github.com/ignite/example", + }, + { + name: "plugin path with ref", + plugin: pluginsconfig.Plugin{ + Path: "github.com/ignite/example@v1", + }, + expectedPath: "github.com/ignite/example", + }, + { + name: "plugin path with empty ref", + plugin: pluginsconfig.Plugin{ + Path: "github.com/ignite/example@", + }, + expectedPath: "github.com/ignite/example", + }, + { + name: "plugin local directory path", + plugin: pluginsconfig.Plugin{ + Path: "/home/user/go/foo/bar", + }, + expectedPath: "/home/user/go/foo/bar", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + res := tt.plugin.CanonicalPath() + require.Equal(t, tt.expectedPath, res) + }) + } +} + +func TestRemoveDuplicates(t *testing.T) { + tests := []struct { + name string + configs []pluginsconfig.Plugin + expected []pluginsconfig.Plugin + }{ + { + name: "do nothing for empty list", + configs: []pluginsconfig.Plugin(nil), + expected: []pluginsconfig.Plugin(nil), + }, + { + name: "remove duplicates", + configs: []pluginsconfig.Plugin{ + { + Path: "foo/bar", + }, + { + Path: "foo/bar", + }, + { + Path: "bar/foo", + }, + }, + expected: []pluginsconfig.Plugin{ + { + Path: "foo/bar", + }, + { + Path: "bar/foo", + }, + }, + }, + { + name: "do nothing for no duplicates", + configs: []pluginsconfig.Plugin{ + { + Path: "foo/bar", + }, + { + Path: "bar/foo", + }, + }, + expected: []pluginsconfig.Plugin{ + { + Path: "foo/bar", + }, + { + Path: "bar/foo", + }, + }, + }, + { + name: "prioritize local plugins", + configs: []pluginsconfig.Plugin{ + { + Path: "foo/bar", + Global: true, + }, + { + Path: "bar/foo", + Global: true, + }, + { + Path: "foo/bar", + Global: false, + }, + { + Path: "bar/foo", + Global: false, + }, + }, + expected: []pluginsconfig.Plugin{ + { + Path: "foo/bar", + Global: false, + }, + { + Path: "bar/foo", + Global: false, + }, + }, + }, + { + name: "prioritize local plugins different versions", + configs: []pluginsconfig.Plugin{ + { + Path: "foo/bar@v1", + Global: true, + }, + { + Path: "bar/foo", + Global: true, + }, + { + Path: "foo/bar@v2", + Global: false, + }, + { + Path: "bar/foo", + Global: false, + }, + }, + expected: []pluginsconfig.Plugin{ + { + Path: "foo/bar@v2", + Global: false, + }, + { + Path: "bar/foo", + Global: false, + }, + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + unique := pluginsconfig.RemoveDuplicates(tt.configs) + require.EqualValues(t, tt.expected, unique) + }) + } +} diff --git a/config/plugins/parse.go b/config/plugins/parse.go new file mode 100644 index 000000000..589cc5c1d --- /dev/null +++ b/config/plugins/parse.go @@ -0,0 +1,75 @@ +package plugins + +import ( + "errors" + "fmt" + "io" + "os" + "path/filepath" + + "gopkg.in/yaml.v2" +) + +// ParseDir expects to find a plugin config file in dir. If dir is not a folder, +// an error is returned. +// The plugin config file format can be `plugins.yml` or `plugins.yaml`. If +// found, the file is parsed into a Config and returned. If no file from the +// given names above are found, then an empty config is returned, w/o errors. +func ParseDir(dir string) (*Config, error) { + // handy function that wraps and prefix err with a common label + errf := func(err error) (*Config, error) { + return nil, fmt.Errorf("plugin config parse: %w", err) + } + fi, err := os.Stat(dir) + if err != nil { + return errf(err) + } + if !fi.IsDir() { + return errf(fmt.Errorf("path %s is not a dir", dir)) + } + + filename, err := locateFile(dir) + if err != nil { + return errf(err) + } + c := Config{ + path: filename, + } + + f, err := os.Open(filename) + if err != nil { + if os.IsNotExist(err) { + return &c, nil + } + return errf(err) + } + defer f.Close() + + // if the error is end of file meaning an empty file on read return nil + if err := yaml.NewDecoder(f).Decode(&c); err != nil && !errors.Is(err, io.EOF) { + return errf(err) + } + return &c, nil +} + +var ( + // filenames is a list of recognized names as Ignite's plugins config file. + filenames = []string{"plugins.yml", "plugins.yaml"} + defaultFilename = filenames[0] +) + +func locateFile(root string) (string, error) { + for _, name := range filenames { + path := filepath.Join(root, name) + _, err := os.Stat(path) + if err == nil { + // file found + return path, nil + } + if !os.IsNotExist(err) { + return "", err + } + } + // no file found, return the default config name + return filepath.Join(root, defaultFilename), nil +} diff --git a/sonr.yml b/config/sonr.yml similarity index 100% rename from sonr.yml rename to config/sonr.yml diff --git a/docker/Taskfile.yml b/docker/Taskfile.yml new file mode 100644 index 000000000..8acec1ba9 --- /dev/null +++ b/docker/Taskfile.yml @@ -0,0 +1,76 @@ +version: "3" +vars: + CGO_ENABLED: 1 + WASMVM_URL: https://github.com/CosmWasm/wasmvm/releases/download + VERSION: + sh: echo $(git describe --tags --abbrev=0) + default: v0.0.0 + COMMIT: + sh: git log -n 1 --format=%h + default: 0000000 + DATE: + sh: date -u '+%m/%d/%y %I:%M:%S%p' + default: "1970-01-01_00:00:00AM" + COSMWASM_VERSION: + sh: go list -m github.com/CosmWasm/wasmvm | sed 's/.* //' + default: v1.3.0 + GO_VERSION: + sh: cat go.mod | grep -E 'go [0-9].[0-9]+' | cut -d ' ' -f 2 + default: 1.21 + GITHUB_TOKEN: + sh: echo $GITHUB_TOKEN + default: "" + GORELEASER_IMAGE: ghcr.io/goreleaser/goreleaser-cross:v{{.GO_VERSION}} +tasks: + # ---------------------------------------------------------------------------- + # -- Run Tasks --------------------------------------------------------------- + # ---------------------------------------------------------------------------- + default: + desc: Print the version + silent: true + cmds: + - task -l + + release: + desc: Build the binary for docker + cmds: + - task: docker-build + - for: ["ghcr.io/sonr-io", "registry.digitalocean.com/sonrhq"] + task: docker-push + vars: + REGISTRY: '{{.ITEM}}' + IMAGE: sonrd + + build: + silent: true + desc: Build, tag and push the docker image + cmds: + - docker build -f ./docker/deploy/Dockerfile . -t sonrd + + start: + silent: true + desc: Start the docker image + dir: ./docker/start + cmds: + - docker compose up + deps: + - build + + tag: + silent: true + desc: Build, tag and push the docker image + cmds: + - echo "Tagging {{.IMAGE}} with {{.REGISTRY}}/{{.IMAGE}}" + - docker tag sonrd {{.REGISTRY}}/{{.IMAGE}}:{{.VERSION}} + - docker tag sonrd {{.REGISTRY}}/{{.IMAGE}}:{{.COMMIT}} + requires: + vars: [IMAGE, REGISTRY] + + push: + silent: true + desc: Build, tag and push the docker image + cmds: + - echo "Pushing {{.REGISTRY}}/{{.IMAGE}}..." + - docker push {{.REGISTRY}}/{{.IMAGE}} --all-tags + requires: + vars: [IMAGE, REGISTRY] diff --git a/docker/deploy.sh b/docker/deploy.sh deleted file mode 100755 index a9bf588e2..000000000 --- a/docker/deploy.sh +++ /dev/null @@ -1 +0,0 @@ -#!/bin/bash diff --git a/Dockerfile b/docker/deploy/Dockerfile similarity index 88% rename from Dockerfile rename to docker/deploy/Dockerfile index 6d0764ddc..34a81d078 100644 --- a/Dockerfile +++ b/docker/deploy/Dockerfile @@ -11,8 +11,8 @@ FROM ${RUNNER_IMAGE} LABEL org.opencontainers.image.source https://github.com/sonr-io/sonr LABEL org.opencontainers.image.description "Sonr Validator node container" # Copy sonrd binary and config -COPY bin/sonrd /usr/local/bin/sonrd -COPY scripts scripts +COPY ../bin/sonrd /usr/local/bin/sonrd +COPY docker/deploy/deploy.sh start.sh # Expose ports EXPOSE 26657 diff --git a/scripts/localnet.sh b/docker/deploy/deploy.sh old mode 100644 new mode 100755 similarity index 100% rename from scripts/localnet.sh rename to docker/deploy/deploy.sh diff --git a/docker/docker-compose.yml b/docker/deploy/docker-compose.yml similarity index 85% rename from docker/docker-compose.yml rename to docker/deploy/docker-compose.yml index 4f0b3920f..ad267e918 100644 --- a/docker/docker-compose.yml +++ b/docker/deploy/docker-compose.yml @@ -5,8 +5,8 @@ services: node: init: true build: - dockerfile: Dockerfile.dev - command: sh scripts/entrypoint.sh + dockerfile: Dockerfile + command: sh deploy.sh ports: - 1317:1317 # rest - 26656:26656 # p2p diff --git a/docker/start.sh b/docker/start.sh deleted file mode 100755 index a9bf588e2..000000000 --- a/docker/start.sh +++ /dev/null @@ -1 +0,0 @@ -#!/bin/bash diff --git a/docker/start/Dockerfile.dev b/docker/start/Dockerfile.dev new file mode 100644 index 000000000..9ee5e917a --- /dev/null +++ b/docker/start/Dockerfile.dev @@ -0,0 +1,24 @@ +ARG GO_VERSION="1.19" +ARG RUNNER_IMAGE="alpine:3.16" + + +# ! ||----------------------------------------------------------------------------------|| +# ! || Sonr Standalone Node || +# ! ||----------------------------------------------------------------------------------|| +FROM --platform=linux alpine + +LABEL org.opencontainers.image.source https://github.com/sonr-io/core +LABEL org.opencontainers.image.description "Base sonr daemon image" +# Copy sonrd binary and config +COPY ../bin/sonrd /usr/local/bin/sonrd +COPY start.sh start.sh +COPY sonr.yml sonr.yml +ENV SONR_LAUNCH_CONFIG=/sonr.yml + +# Expose ports +EXPOSE 26657 +EXPOSE 1317 +EXPOSE 26656 +EXPOSE 8080 +EXPOSE 9090 + diff --git a/docker/start/docker-compose.yml b/docker/start/docker-compose.yml new file mode 100644 index 000000000..552ced090 --- /dev/null +++ b/docker/start/docker-compose.yml @@ -0,0 +1,35 @@ +version: "3" +networks: + sonr-net: {} +services: + node: + init: true + build: + dockerfile: Dockerfile.dev + ports: + - 1317:1317 # rest + - 26656:26656 # p2p + - 26657:26657 # rpc + - 9090:9090 # grpc + - 8000:8080 # highway + restart: always + fireice-nosql: + pull_policy: always + image: ghcr.io/sonr-io/fireice-nosql:latest + init: true + container_name: fireice-nosql + networks: + - sonr-net + ports: + - 6001:6001 + restart: always + fireice-sqlite: + pull_policy: always + image: ghcr.io/sonr-io/fireice-sqlite:latest + init: true + container_name: fireice-sqlite + networks: + - sonr-net + ports: + - 6002:6002 + restart: always diff --git a/docker/start/sonr.yml b/docker/start/sonr.yml new file mode 100644 index 000000000..49bd1c4ac --- /dev/null +++ b/docker/start/sonr.yml @@ -0,0 +1,51 @@ +version: 1 +launch: + environment: development + chain-id: sonr-localnet-1 + moniker: alice + val_address: "0x0000000000" +highway: + enabled: true + jwt: + key: "sercrethatmaycontainch@r$32chars" + api: + host: "localhost" + port: 8080 + timeout: 15 + icefirekv: + host: "db" + port: 6001 + icefiresql: + host: "sql" + port: 23306 +node: + api: + host: "validator" + port: 1317 + p2p: + host: "validator" + port: 26656 + rpc: + host: "validator" + port: 26657 + grpc: + host: "validator" + port: 9090 +genesis: + accounts: + - name: alice + coins: + - 20000token + - 200000000stake + - name: bob + coins: + - 10000token + - 100000000stake + faucet: + name: bob + coins: + - 5token + - 100000stake + validators: + - name: alice + bonded: 100000000stake diff --git a/scripts/entrypoint.sh b/docker/start/start.sh old mode 100644 new mode 100755 similarity index 99% rename from scripts/entrypoint.sh rename to docker/start/start.sh index 00528a171..badc9bc3b --- a/scripts/entrypoint.sh +++ b/docker/start/start.sh @@ -26,7 +26,7 @@ sonrd gentx $KEY 1000000000000000000000usnr --keyring-backend $KEYRING --chain-i # Collect genesis tx sonrd collect-gentxs - + # Run this to ensure everything worked and that the genesis file is setup correctly sonrd validate-genesis diff --git a/docs/api.go b/docs/api.go index bfa209c80..c44e636f3 100644 --- a/docs/api.go +++ b/docs/api.go @@ -9,7 +9,7 @@ import ( ) const ( - apiFile = "/static/sonr.swagger.yml" + apiFile = "/static/sonr.swagger.yaml" indexFile = "template/index.tpl" ) diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml new file mode 100644 index 000000000..7d7202ee3 --- /dev/null +++ b/docs/static/openapi.yml @@ -0,0 +1,85252 @@ +swagger: '2.0' +info: + title: HTTP API Console + name: '' + description: '' +paths: + /core/domain/params: + get: + summary: |- + Params queries the parameters of the module. + It returns the parameters of the module. + operationId: CoreDomainParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + + It holds all the parameters of this module. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /core/domain/username: + get: + summary: |- + UsernameRecordAll queries all UsernameRecords items. + It returns all UsernameRecords items. + operationId: CoreDomainUsernameRecordAll + responses: + '200': + description: A successful response. + schema: + type: object + properties: + usernameRecords: + type: array + items: + type: object + properties: + index: + type: string + address: + type: string + method: + type: string + 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; + } + description: >- + QueryAllUsernameRecordsResponse is the response type for the + + Query/UsernameRecordAll RPC method. It contains all queried + UsernameRecords + + and the pagination information. + default: + description: An unexpected error response. + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /core/domain/username/{index}: + get: + summary: |- + UsernameRecord queries a list of UsernameRecords items by index. + It returns a list of UsernameRecords items. + operationId: CoreDomainUsernameRecord + responses: + '200': + description: A successful response. + schema: + type: object + properties: + usernameRecords: + type: object + properties: + index: + type: string + address: + type: string + method: + type: string + description: >- + QueryGetUsernameRecordsResponse is the response type for the + + Query/UsernameRecord RPC method. It contains the queried + UsernameRecords. + default: + description: An unexpected error response. + 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: index + in: path + required: true + type: string + tags: + - Query + /core/id: + get: + summary: DIDDocumentAll queries all DIDDocument items. + operationId: CoreIdentityDIDDocumentAll + responses: + '200': + description: A successful response. + schema: + type: object + properties: + dIDDocument: + type: array + items: + type: object + properties: + context: + type: array + items: + type: string + title: The JSON-LD context(s) used in the document + id: + type: string + title: The identifier for the DID subject + controller: + type: array + items: + type: string + title: >- + optional, the entity/entities controlling the DID + subject + authentication: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification + method that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of authentication methods associated + with the DID + assertion_method: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification + method that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of assertion methods associated with + the DID + capability_invocation: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification + method that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of capability invocation methods + associated with + capability_delegation: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification + method that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of capability delegation methods + associated with + key_agreement: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification + method that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of key agreement methods associated + with the DID + also_known_as: + type: array + items: + type: string + title: >- + optional, the set of identifiers for other personas or + identities + description: >- + DIDDocument represents a Decentralized Identifier (DID) + document that + + contains information about the DID subject, such as public + keys, verification + + methods, and services. + 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; + } + description: >- + QueryAllDIDDocumentResponse is the response type for the + Query/DIDDocumentAll + + RPC method. + default: + description: An unexpected error response. + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /core/id/alias/{alias}: + get: + summary: |- + DidByAlsoKnownAs returns DIDDocument based on an alias *only Sonr + Identities. + operationId: CoreIdentityDidByAlsoKnownAs + responses: + '200': + description: A successful response. + schema: + type: object + properties: + didDocument: + title: >- + A DIDDocument is a JSON-LD object that contains a set of + public keys + type: object + properties: + context: + type: array + items: + type: string + title: The JSON-LD context(s) used in the document + id: + type: string + title: The identifier for the DID subject + controller: + type: array + items: + type: string + title: optional, the entity/entities controlling the DID subject + authentication: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of authentication methods associated + with the DID + assertion_method: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of assertion methods associated with the + DID + capability_invocation: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of capability invocation methods + associated with + capability_delegation: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of capability delegation methods + associated with + key_agreement: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of key agreement methods associated with + the DID + also_known_as: + type: array + items: + type: string + title: >- + optional, the set of identifiers for other personas or + identities + description: >- + DIDDocument represents a Decentralized Identifier (DID) + document that + + contains information about the DID subject, such as public + keys, verification + + methods, and services. + description: |- + QueryDidByAlsoKnownAsResponse is the response type for the + Query/DidByAlsoKnownAs RPC method. + default: + description: An unexpected error response. + 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: alias + description: >- + aka_aliasid is the unique identifier of the DIDDocument - it appears + like + + ("example.snr") + in: path + required: true + type: string + tags: + - Query + /core/id/alias/{alias}/check: + get: + summary: >- + AliasAvailable checks if a given alias is available to register *only + Sonr + + Identities. + operationId: CoreIdentityAliasAvailable + responses: + '200': + description: A successful response. + schema: + type: object + properties: + available: + type: boolean + existing_document: + type: object + properties: + context: + type: array + items: + type: string + title: The JSON-LD context(s) used in the document + id: + type: string + title: The identifier for the DID subject + controller: + type: array + items: + type: string + title: optional, the entity/entities controlling the DID subject + authentication: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of authentication methods associated + with the DID + assertion_method: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of assertion methods associated with the + DID + capability_invocation: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of capability invocation methods + associated with + capability_delegation: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of capability delegation methods + associated with + key_agreement: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of key agreement methods associated with + the DID + also_known_as: + type: array + items: + type: string + title: >- + optional, the set of identifiers for other personas or + identities + description: >- + DIDDocument represents a Decentralized Identifier (DID) + document that + + contains information about the DID subject, such as public + keys, verification + + methods, and services. + description: >- + QueryAliasAvailableResponse is the response type for the + Query/AliasAvailable + + RPC method. + default: + description: An unexpected error response. + 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: alias + description: |- + alias is the unique identifier of the DIDDocument - it appears like + ("example.snr") + in: path + required: true + type: string + tags: + - Query + /core/id/controllers: + get: + summary: ControllerAccountAll queries all ControllerAccount items. + operationId: CoreIdentityControllerAccountAll + responses: + '200': + description: A successful response. + schema: + type: object + properties: + controllerAccount: + type: array + items: + type: object + properties: + address: + type: string + publicKey: + type: string + authenticators: + type: array + items: + type: string + wallets: + type: array + items: + type: string + 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; + } + description: |- + QueryAllControllerAccountResponse is the response type for the + Query/ControllerAccountAll RPC method. + default: + description: An unexpected error response. + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /core/id/controllers/{address}: + get: + summary: ControllerAccount queries a list of ControllerAccount items. + operationId: CoreIdentityControllerAccount + responses: + '200': + description: A successful response. + schema: + type: object + properties: + controllerAccount: + type: object + properties: + address: + type: string + publicKey: + type: string + authenticators: + type: array + items: + type: string + wallets: + type: array + items: + type: string + description: |- + QueryGetControllerAccountResponse is the response type for the + Query/ControllerAccount RPC method. + default: + description: An unexpected error response. + 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 + in: path + required: true + type: string + tags: + - Query + /core/id/owner/{owner}: + get: + summary: DidByOwner returns DIDDocument based on an owner. + operationId: CoreIdentityDidByOwner + responses: + '200': + description: A successful response. + schema: + type: object + properties: + didDocument: + type: object + properties: + context: + type: array + items: + type: string + title: The JSON-LD context(s) used in the document + id: + type: string + title: The identifier for the DID subject + controller: + type: array + items: + type: string + title: optional, the entity/entities controlling the DID subject + authentication: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of authentication methods associated + with the DID + assertion_method: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of assertion methods associated with the + DID + capability_invocation: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of capability invocation methods + associated with + capability_delegation: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of capability delegation methods + associated with + key_agreement: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of key agreement methods associated with + the DID + also_known_as: + type: array + items: + type: string + title: >- + optional, the set of identifiers for other personas or + identities + description: >- + DIDDocument represents a Decentralized Identifier (DID) + document that + + contains information about the DID subject, such as public + keys, verification + + methods, and services. + description: >- + QueryDidByOwnerResponse is the response type for the + Query/DidByOwner RPC + + method. + default: + description: An unexpected error response. + 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: owner + in: path + required: true + type: string + tags: + - Query + /core/id/{did}: + get: + summary: DIDDocument queries a list of DIDDocument items. + operationId: CoreIdentityDIDDocument + responses: + '200': + description: A successful response. + schema: + type: object + properties: + dIDDocument: + type: object + properties: + context: + type: array + items: + type: string + title: The JSON-LD context(s) used in the document + id: + type: string + title: The identifier for the DID subject + controller: + type: array + items: + type: string + title: optional, the entity/entities controlling the DID subject + authentication: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of authentication methods associated + with the DID + assertion_method: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of assertion methods associated with the + DID + capability_invocation: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of capability invocation methods + associated with + capability_delegation: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of capability delegation methods + associated with + key_agreement: + type: array + items: + type: object + properties: + verification_method: + title: >- + The verification method associated with the + relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: >- + optional, the public key in JSON Web Key (JWK) + format + public_key_multibase: + type: string + title: >- + optional, the public key in multibase-encoded + format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier + associated with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated + with the verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols + supported by the + description: >- + VerificationMethod represents a verification method + that can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship + between a verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of key agreement methods associated with + the DID + also_known_as: + type: array + items: + type: string + title: >- + optional, the set of identifiers for other personas or + identities + description: >- + DIDDocument represents a Decentralized Identifier (DID) + document that + + contains information about the DID subject, such as public + keys, verification + + methods, and services. + description: >- + QueryGetDIDDocumentResponse is the response type for the + Query/DIDDocument + + RPC method. + default: + description: An unexpected error response. + 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: did + in: path + required: true + type: string + tags: + - Query + /core/params/identity: + get: + summary: Params queries the parameters of the module. + operationId: CoreIdentityParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + account_did_method_name: + type: string + account_did_method_context: + type: string + acccount_discovery_reward: + type: string + format: int64 + did_base_context: + type: string + maximum_identity_aliases: + type: integer + format: int32 + supported_did_methods: + type: array + items: + type: string + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /core/params/service: + get: + summary: Params queries the parameters of the module. + operationId: CoreServiceParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /core/service: + get: + summary: ServiceRecordAll queries all ServiceRecord items. + operationId: CoreServiceServiceRecordAll + responses: + '200': + description: A successful response. + schema: + type: object + properties: + ServiceRecord: + type: array + items: + type: object + properties: + id: + type: string + controller: + type: string + title: The entity controlling the service + origins: + type: array + items: + type: string + name: + type: string + title: The name of the service + description: + type: string + title: The description of the service + category: + type: string + title: The category of the service + 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; + } + description: |- + QueryAllServiceRecordResponse is the response type for the + Query/ServiceRecordAll RPC method. + default: + description: An unexpected error response. + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /core/service/{origin}: + get: + summary: ServiceRecord queries a list of ServiceRecord items. + operationId: CoreServiceServiceRecord + responses: + '200': + description: A successful response. + schema: + type: object + properties: + ServiceRecord: + type: object + properties: + id: + type: string + controller: + type: string + title: The entity controlling the service + origins: + type: array + items: + type: string + name: + type: string + title: The name of the service + description: + type: string + title: The description of the service + category: + type: string + title: The category of the service + description: |- + QueryGetServiceRecordResponse is the response type for the + Query/ServiceRecord RPC method. + default: + description: An unexpected error response. + 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: origin + in: path + required: true + type: string + tags: + - Query + /cosmos/auth/v1beta1/account_info/{address}: + get: + summary: AccountInfo queries account info which is common to all account types. + description: 'Since: cosmos-sdk 0.47' + operationId: CosmosAuthV1Beta1AccountInfo + responses: + '200': + description: A successful response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + description: |- + QueryAccountInfoResponse is the Query/AccountInfo response type. + + Since: cosmos-sdk 0.47 + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + type: string + tags: + - Query + /cosmos/auth/v1beta1/accounts: + get: + summary: Accounts returns all the existing accounts. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + + + Since: cosmos-sdk 0.43 + operationId: CosmosAuthV1Beta1Accounts + responses: + '200': + description: A successful response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + description: >- + QueryAccountsResponse is the response type for the Query/Accounts + RPC method. + + + Since: cosmos-sdk 0.43 + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/auth/v1beta1/accounts/{address}: + get: + summary: Account returns account details based on address. + operationId: CosmosAuthV1Beta1Account + responses: + '200': + description: A successful response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: >- + QueryAccountResponse is the response type for the Query/Account + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + type: string + tags: + - Query + /cosmos/auth/v1beta1/address_by_id/{id}: + get: + summary: AccountAddressByID returns account address based on account number. + description: 'Since: cosmos-sdk 0.46.2' + operationId: CosmosAuthV1Beta1AccountAddressByID + responses: + '200': + description: A successful response. + schema: + type: object + properties: + account_address: + type: string + description: 'Since: cosmos-sdk 0.46.2' + title: >- + QueryAccountAddressByIDResponse is the response type for + AccountAddressByID rpc method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: 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: path + required: true + type: string + format: int64 + - name: account_id + description: |- + account_id is the account number of the address to be queried. + + Since: cosmos-sdk 0.47 + in: query + required: false + type: string + format: uint64 + tags: + - Query + /cosmos/auth/v1beta1/bech32: + get: + summary: Bech32Prefix queries bech32Prefix + description: 'Since: cosmos-sdk 0.46' + operationId: CosmosAuthV1Beta1Bech32Prefix + responses: + '200': + description: A successful response. + schema: + type: object + properties: + bech32_prefix: + type: string + description: >- + Bech32PrefixResponse is the response type for Bech32Prefix rpc + method. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Query + /cosmos/auth/v1beta1/bech32/{address_bytes}: + get: + summary: AddressBytesToString converts Account Address bytes to string + description: 'Since: cosmos-sdk 0.46' + operationId: CosmosAuthV1Beta1AddressBytesToString + responses: + '200': + description: A successful response. + schema: + type: object + properties: + address_string: + type: string + description: >- + AddressBytesToStringResponse is the response type for + AddressString rpc method. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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_bytes + in: path + required: true + type: string + format: byte + tags: + - Query + /cosmos/auth/v1beta1/bech32/{address_string}: + get: + summary: AddressStringToBytes converts Address string to bytes + description: 'Since: cosmos-sdk 0.46' + operationId: CosmosAuthV1Beta1AddressStringToBytes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + address_bytes: + type: string + format: byte + description: >- + AddressStringToBytesResponse is the response type for AddressBytes + rpc method. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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_string + in: path + required: true + type: string + tags: + - Query + /cosmos/auth/v1beta1/module_accounts: + get: + summary: ModuleAccounts returns all the existing module accounts. + description: 'Since: cosmos-sdk 0.46' + operationId: CosmosAuthV1Beta1ModuleAccounts + responses: + '200': + description: A successful response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: >- + QueryModuleAccountsResponse is the response type for the + Query/ModuleAccounts RPC method. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Query + /cosmos/auth/v1beta1/module_accounts/{name}: + get: + summary: ModuleAccountByName returns the module account info by module name + operationId: CosmosAuthV1Beta1ModuleAccountByName + responses: + '200': + description: A successful response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: >- + QueryModuleAccountByNameResponse is the response type for the + Query/ModuleAccountByName RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + type: string + tags: + - Query + /cosmos/auth/v1beta1/params: + get: + summary: Params queries all parameters. + operationId: CosmosAuthV1Beta1Params + responses: + '200': + description: A successful response. + 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 + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Query + /cosmos/authz/v1beta1/grants: + get: + summary: Returns list of `Authorization`, granted to the grantee by the granter. + operationId: CosmosAuthzV1Beta1Grants + responses: + '200': + description: A successful response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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 + description: >- + QueryGrantsResponse is the response type for the + Query/Authorizations RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + type: string + - name: grantee + in: query + required: false + type: string + - name: msg_type_url + description: >- + Optional, msg_type_url, when set, will query only grants matching + given msg type. + in: query + required: false + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/authz/v1beta1/grants/grantee/{grantee}: + get: + summary: GranteeGrants returns a list of `GrantAuthorization` by grantee. + description: 'Since: cosmos-sdk 0.46' + operationId: CosmosAuthzV1Beta1GranteeGrants + responses: + '200': + description: A successful response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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 + description: >- + QueryGranteeGrantsResponse is the response type for the + Query/GranteeGrants RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/authz/v1beta1/grants/granter/{granter}: + get: + summary: GranterGrants returns list of `GrantAuthorization`, granted by granter. + description: 'Since: cosmos-sdk 0.46' + operationId: CosmosAuthzV1Beta1GranterGrants + responses: + '200': + description: A successful response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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 + description: >- + QueryGranterGrantsResponse is the response type for the + Query/GranterGrants RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/bank/v1beta1/balances/{address}: + get: + summary: AllBalances queries the balance of all coins for a single account. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: CosmosBankV1Beta1AllBalances + responses: + '200': + description: A successful response. + 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. + description: balances is the balances of all the coins. + 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 + description: >- + QueryAllBalancesResponse is the response type for the + Query/AllBalances RPC + + method. + default: + description: An unexpected error response. + 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 + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/bank/v1beta1/balances/{address}/by_denom: + get: + summary: Balance queries the balance of a single coin for a single account. + operationId: CosmosBankV1Beta1Balance + responses: + '200': + description: A successful response. + schema: + type: object + properties: + balance: + description: balance is the balance of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + QueryBalanceResponse is the response type for the Query/Balance + RPC method. + default: + description: An unexpected error response. + 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 + type: string + - name: denom + description: denom is the coin denom to query balances for. + in: query + required: false + type: string + tags: + - Query + /cosmos/bank/v1beta1/denom_owners/{denom}: + get: + summary: >- + DenomOwners queries for all account addresses that own a particular + token + + denomination. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + + + Since: cosmos-sdk 0.46 + operationId: CosmosBankV1Beta1DenomOwners + responses: + '200': + description: A successful response. + 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 + 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. + + + Since: cosmos-sdk 0.46 + 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 + description: >- + QueryDenomOwnersResponse defines the RPC response of a DenomOwners + RPC query. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. + 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 + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/bank/v1beta1/denoms_metadata: + get: + summary: |- + DenomsMetadata queries the client metadata for all registered coin + denominations. + operationId: CosmosBankV1Beta1DenomsMetadata + responses: + '200': + description: A successful response. + 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. + 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 + description: 'Since: cosmos-sdk 0.43' + 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. + + + Since: cosmos-sdk 0.43 + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains + additional information. Optional. + + + Since: cosmos-sdk 0.46 + 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. + + + Since: cosmos-sdk 0.46 + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + metadata provides the client information for all the + registered tokens. + 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 + description: >- + QueryDenomsMetadataResponse is the response type for the + Query/DenomsMetadata RPC + + method. + default: + description: An unexpected error response. + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/bank/v1beta1/denoms_metadata/{denom}: + get: + summary: DenomsMetadata queries the client metadata of a given coin denomination. + operationId: CosmosBankV1Beta1DenomMetadata + responses: + '200': + description: A successful response. + 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. + 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 + description: 'Since: cosmos-sdk 0.43' + 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. + + + Since: cosmos-sdk 0.43 + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains + additional information. Optional. + + + Since: cosmos-sdk 0.46 + 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. + + + Since: cosmos-sdk 0.46 + description: >- + QueryDenomMetadataResponse is the response type for the + Query/DenomMetadata RPC + + method. + default: + description: An unexpected error response. + 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 + type: string + tags: + - Query + /cosmos/bank/v1beta1/params: + get: + summary: Params queries the parameters of x/bank module. + operationId: CosmosBankV1Beta1Params + responses: + '200': + description: A successful response. + schema: + type: object + properties: + 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. + default_send_enabled: + type: boolean + description: Params defines the parameters for the bank module. + description: >- + QueryParamsResponse defines the response type for querying x/bank + parameters. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /cosmos/bank/v1beta1/send_enabled: + get: + summary: SendEnabled queries for SendEnabled entries. + description: >- + 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. + + + Since: cosmos-sdk 0.47 + operationId: CosmosBankV1Beta1SendEnabled + responses: + '200': + description: A successful response. + 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). + 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 + description: >- + QuerySendEnabledResponse defines the RPC response of a SendEnable + query. + + + Since: cosmos-sdk 0.47 + default: + description: An unexpected error response. + 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 + type: array + items: + type: string + collectionFormat: multi + - 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/bank/v1beta1/spendable_balances/{address}: + get: + summary: >- + SpendableBalances queries the spendable balance of all coins for a + single + + account. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + + + Since: cosmos-sdk 0.46 + operationId: CosmosBankV1Beta1SpendableBalances + responses: + '200': + description: A successful response. + 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. + description: balances is the spendable balances of all the coins. + 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 + description: >- + QuerySpendableBalancesResponse defines the gRPC response structure + for querying + + an account's spendable balances. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. + 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 + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/bank/v1beta1/spendable_balances/{address}/by_denom: + get: + summary: >- + SpendableBalanceByDenom queries the spendable balance of a single denom + for + + a single account. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + + + Since: cosmos-sdk 0.47 + operationId: CosmosBankV1Beta1SpendableBalanceByDenom + responses: + '200': + description: A successful response. + schema: + type: object + properties: + balance: + description: balance is the balance of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + QuerySpendableBalanceByDenomResponse defines the gRPC response + structure for + + querying an account's spendable balance for a specific denom. + + + Since: cosmos-sdk 0.47 + default: + description: An unexpected error response. + 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 + type: string + - name: denom + description: denom is the coin denom to query balances for. + in: query + required: false + type: string + tags: + - Query + /cosmos/bank/v1beta1/supply: + get: + summary: TotalSupply queries the total supply of all coins. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: CosmosBankV1Beta1TotalSupply + responses: + '200': + description: A successful response. + 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. + title: supply is the supply of the coins + pagination: + description: |- + pagination defines the pagination in the response. + + Since: cosmos-sdk 0.43 + 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 + title: >- + QueryTotalSupplyResponse is the response type for the + Query/TotalSupply RPC + + method + default: + description: An unexpected error response. + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/bank/v1beta1/supply/by_denom: + get: + summary: SupplyOf queries the supply of a single coin. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: CosmosBankV1Beta1SupplyOf + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + description: amount is the supply of the coin. + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + QuerySupplyOfResponse is the response type for the Query/SupplyOf + RPC method. + default: + description: An unexpected error response. + 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 + type: string + tags: + - Query + /cosmos/base/node/v1beta1/config: + get: + summary: Config queries for the operator configuration. + operationId: CosmosBaseNodeV1Beta1Config + responses: + '200': + description: A successful response. + schema: + type: object + properties: + minimum_gas_price: + type: string + description: >- + ConfigResponse defines the response structure for the Config gRPC + query. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Service + /cosmos/base/tendermint/v1beta1/abci_query: + get: + summary: >- + 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. + description: 'Since: cosmos-sdk 0.46' + operationId: CosmosBaseTendermintV1Beta1ABCIQuery + responses: + '200': + description: A successful response. + 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 + value: + type: string + format: byte + 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. + 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. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + type: string + format: byte + - name: path + in: query + required: false + type: string + - name: height + in: query + required: false + type: string + format: int64 + - name: prove + in: query + required: false + type: boolean + tags: + - Service + /cosmos/base/tendermint/v1beta1/blocks/latest: + get: + summary: GetLatestBlock returns the latest block. + operationId: CosmosBaseTendermintV1Beta1GetLatestBlock + responses: + '200': + description: A successful response. + schema: + 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 + 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 represents a prevote, precommit, or + commit 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 represents a prevote, precommit, or + commit 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 + title: >- + BlockIdFlag indicates which BlcokID 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 + title: >- + BlockIdFlag indicates which BlcokID 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. + sdk_block: + title: 'Since: cosmos-sdk 0.47' + 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 represents a prevote, precommit, or + commit 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 represents a prevote, precommit, or + commit 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 + title: >- + BlockIdFlag indicates which BlcokID 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 + title: >- + BlockIdFlag indicates which BlcokID 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. + description: >- + GetLatestBlockResponse is the response type for the + Query/GetLatestBlock RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Service + /cosmos/base/tendermint/v1beta1/blocks/{height}: + get: + summary: GetBlockByHeight queries block for given height. + operationId: CosmosBaseTendermintV1Beta1GetBlockByHeight + responses: + '200': + description: A successful response. + schema: + 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 + 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 represents a prevote, precommit, or + commit 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 represents a prevote, precommit, or + commit 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 + title: >- + BlockIdFlag indicates which BlcokID 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 + title: >- + BlockIdFlag indicates which BlcokID 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. + sdk_block: + title: 'Since: cosmos-sdk 0.47' + 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 represents a prevote, precommit, or + commit 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 represents a prevote, precommit, or + commit 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 + title: >- + BlockIdFlag indicates which BlcokID 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 + title: >- + BlockIdFlag indicates which BlcokID 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. + description: >- + GetBlockByHeightResponse is the response type for the + Query/GetBlockByHeight RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + type: string + format: int64 + tags: + - Service + /cosmos/base/tendermint/v1beta1/node_info: + get: + summary: GetNodeInfo queries the current node info. + operationId: CosmosBaseTendermintV1Beta1GetNodeInfo + responses: + '200': + description: A successful response. + 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 + 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 + 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 + title: 'Since: cosmos-sdk 0.43' + description: VersionInfo is the type for the GetNodeInfoResponse message. + description: >- + GetNodeInfoResponse is the response type for the Query/GetNodeInfo + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Service + /cosmos/base/tendermint/v1beta1/syncing: + get: + summary: GetSyncing queries node syncing. + operationId: CosmosBaseTendermintV1Beta1GetSyncing + responses: + '200': + description: A successful response. + schema: + type: object + properties: + syncing: + type: boolean + description: >- + GetSyncingResponse is the response type for the Query/GetSyncing + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Service + /cosmos/base/tendermint/v1beta1/validatorsets/latest: + get: + summary: GetLatestValidatorSet queries latest validator-set. + operationId: CosmosBaseTendermintV1Beta1GetLatestValidatorSet + responses: + '200': + description: A successful response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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 + description: >- + GetLatestValidatorSetResponse is the response type for the + Query/GetValidatorSetByHeight RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Service + /cosmos/base/tendermint/v1beta1/validatorsets/{height}: + get: + summary: GetValidatorSetByHeight queries validator-set at a given height. + operationId: CosmosBaseTendermintV1Beta1GetValidatorSetByHeight + responses: + '200': + description: A successful response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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 + description: >- + GetValidatorSetByHeightResponse is the response type for the + Query/GetValidatorSetByHeight RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Service + /cosmos/consensus/v1/params: + get: + summary: Params queries the parameters of x/consensus_param module. + operationId: CosmosConsensusV1Params + responses: + '200': + description: A successful response. + 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. + 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. + description: >- + QueryParamsResponse defines the response type for querying + x/consensus parameters. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /cosmos/distribution/v1beta1/community_pool: + get: + summary: CommunityPool queries the community pool coins. + operationId: CosmosDistributionV1Beta1CommunityPool + responses: + '200': + description: A successful response. + 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 an Dec which implements the custom + method + + signatures required by gogoproto. + description: pool defines community pool's coins. + description: >- + QueryCommunityPoolResponse is the response type for the + Query/CommunityPool + + RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards: + get: + summary: |- + DelegationTotalRewards queries the total rewards accrued by a each + validator. + operationId: CosmosDistributionV1Beta1DelegationTotalRewards + responses: + '200': + description: A successful response. + 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 an 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. + 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 an Dec which implements the custom + method + + signatures required by gogoproto. + description: total defines the sum of all the rewards. + description: |- + QueryDelegationTotalRewardsResponse is the response type for the + Query/DelegationTotalRewards RPC method. + default: + description: An unexpected error response. + 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: delegator_address + description: delegator_address defines the delegator address to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}: + get: + summary: DelegationRewards queries the total rewards accrued by a delegation. + operationId: CosmosDistributionV1Beta1DelegationRewards + responses: + '200': + description: A successful response. + 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 an Dec which implements the custom + method + + signatures required by gogoproto. + description: rewards defines the rewards accrued by a delegation. + description: |- + QueryDelegationRewardsResponse is the response type for the + Query/DelegationRewards RPC method. + default: + description: An unexpected error response. + 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: delegator_address + description: delegator_address defines the delegator address to query for. + in: path + required: true + type: string + - name: validator_address + description: validator_address defines the validator address to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/distribution/v1beta1/delegators/{delegator_address}/validators: + get: + summary: DelegatorValidators queries the validators of a delegator. + operationId: CosmosDistributionV1Beta1DelegatorValidators + responses: + '200': + description: A successful response. + 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. + default: + description: An unexpected error response. + 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: delegator_address + description: delegator_address defines the delegator address to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address: + get: + summary: DelegatorWithdrawAddress queries withdraw address of a delegator. + operationId: CosmosDistributionV1Beta1DelegatorWithdrawAddress + responses: + '200': + description: A successful response. + 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. + default: + description: An unexpected error response. + 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: delegator_address + description: delegator_address defines the delegator address to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/distribution/v1beta1/params: + get: + summary: Params queries params of the distribution module. + operationId: CosmosDistributionV1Beta1Params + responses: + '200': + description: A successful response. + 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 + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /cosmos/distribution/v1beta1/validators/{validator_address}: + get: + summary: >- + ValidatorDistributionInfo queries validator commission and + self-delegation rewards for validator + operationId: CosmosDistributionV1Beta1ValidatorDistributionInfo + responses: + '200': + description: A successful response. + 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 an Dec which implements the custom + method + + signatures required by gogoproto. + description: self_bond_rewards defines the self delegations rewards. + 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 an Dec which implements the custom + method + + signatures required by gogoproto. + description: commission defines the commission the validator received. + description: >- + QueryValidatorDistributionInfoResponse is the response type for + the Query/ValidatorDistributionInfo RPC method. + default: + description: An unexpected error response. + 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: validator_address + description: validator_address defines the validator address to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/distribution/v1beta1/validators/{validator_address}/commission: + get: + summary: ValidatorCommission queries accumulated commission for a validator. + operationId: CosmosDistributionV1Beta1ValidatorCommission + responses: + '200': + description: A successful response. + 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 an Dec which implements the + custom method + + signatures required by gogoproto. + title: |- + QueryValidatorCommissionResponse is the response type for the + Query/ValidatorCommission RPC method + default: + description: An unexpected error response. + 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: validator_address + description: validator_address defines the validator address to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards: + get: + summary: ValidatorOutstandingRewards queries rewards of a validator address. + operationId: CosmosDistributionV1Beta1ValidatorOutstandingRewards + responses: + '200': + description: A successful response. + 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 an 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. + description: >- + QueryValidatorOutstandingRewardsResponse is the response type for + the + + Query/ValidatorOutstandingRewards RPC method. + default: + description: An unexpected error response. + 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: validator_address + description: validator_address defines the validator address to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/distribution/v1beta1/validators/{validator_address}/slashes: + get: + summary: ValidatorSlashes queries slash events of a validator. + operationId: CosmosDistributionV1Beta1ValidatorSlashes + responses: + '200': + description: A successful response. + 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. + description: slashes defines the slashes the validator received. + 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 + description: |- + QueryValidatorSlashesResponse is the response type for the + Query/ValidatorSlashes RPC method. + default: + description: An unexpected error response. + 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: validator_address + description: validator_address defines the validator address to query for. + in: path + required: true + type: string + - name: starting_height + description: >- + starting_height defines the optional starting height to query the + slashes. + in: query + required: false + type: string + format: uint64 + - name: ending_height + description: >- + starting_height defines the optional ending height to query the + slashes. + in: query + required: false + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/evidence/v1beta1/evidence: + get: + summary: AllEvidence queries all evidence. + operationId: CosmosEvidenceV1Beta1AllEvidence + responses: + '200': + description: A successful response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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 + description: >- + QueryAllEvidenceResponse is the response type for the + Query/AllEvidence RPC + + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/evidence/v1beta1/evidence/{hash}: + get: + summary: Evidence queries evidence based on evidence hash. + operationId: CosmosEvidenceV1Beta1Evidence + responses: + '200': + description: A successful response. + 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. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + QueryEvidenceResponse is the response type for the Query/Evidence + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + + Since: cosmos-sdk 0.47 + in: path + required: true + type: string + - name: evidence_hash + description: |- + evidence_hash defines the hash of the requested evidence. + Deprecated: Use hash, a HEX encoded string, instead. + in: query + required: false + type: string + format: byte + tags: + - Query + /cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}: + get: + summary: Allowance returns fee granted to the grantee by the granter. + operationId: CosmosFeegrantV1Beta1Allowance + responses: + '200': + description: A successful response. + schema: + type: object + properties: + allowance: + description: allowance is a 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. + + + 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: >- + QueryAllowanceResponse is the response type for the + Query/Allowance RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + type: string + tags: + - Query + /cosmos/feegrant/v1beta1/allowances/{grantee}: + get: + summary: Allowances returns all the grants for address. + operationId: CosmosFeegrantV1Beta1Allowances + responses: + '200': + description: A successful response. + 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. + + + 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. + 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 + description: >- + QueryAllowancesResponse is the response type for the + Query/Allowances RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/feegrant/v1beta1/issued/{granter}: + get: + summary: AllowancesByGranter returns all the grants given by an address + description: 'Since: cosmos-sdk 0.46' + operationId: CosmosFeegrantV1Beta1AllowancesByGranter + responses: + '200': + description: A successful response. + 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. + + + 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. + 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 + description: >- + QueryAllowancesByGranterResponse is the response type for the + Query/AllowancesByGranter RPC method. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/gov/v1/params/{params_type}: + get: + summary: Params queries all parameters of the gov module. + operationId: CosmosGovV1Params + responses: + '200': + description: A successful response. + 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. + 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. + 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. + params: + description: |- + params defines all the paramaters of x/gov module. + + Since: cosmos-sdk 0.47 + 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. + 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 + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: params_type + description: >- + params_type defines which parameters to query for, can be one of + "voting", + + "tallying" or "deposit". + in: path + required: true + type: string + tags: + - Query + /cosmos/gov/v1/proposals: + get: + summary: Proposals queries all proposals based on given status. + operationId: CosmosGovV1Proposals + responses: + '200': + description: A successful response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + description: >- + metadata is any arbitrary metadata attached to the + proposal. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + proposer: + type: string + description: 'Since: cosmos-sdk 0.47' + title: Proposer is the address of the proposal sumbitter + description: >- + Proposal defines the core field members of a governance + proposal. + description: proposals defines all the requested governance proposals. + 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 + description: >- + QueryProposalsResponse is the response type for the + Query/Proposals RPC + + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_status + 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 + 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 + type: string + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: query + required: false + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/gov/v1/proposals/{proposal_id}: + get: + summary: Proposal queries proposal details based on ProposalID. + operationId: CosmosGovV1Proposal + responses: + '200': + description: A successful response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + description: >- + metadata is any arbitrary metadata attached to the + proposal. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + proposer: + type: string + description: 'Since: cosmos-sdk 0.47' + title: Proposer is the address of the proposal sumbitter + description: >- + QueryProposalResponse is the response type for the Query/Proposal + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmos/gov/v1/proposals/{proposal_id}/deposits: + get: + summary: Deposits queries all deposits of a single proposal. + operationId: CosmosGovV1Deposits + responses: + '200': + description: A successful response. + 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. + 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. + 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 + description: >- + QueryDepositsResponse is the response type for the Query/Deposits + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/gov/v1/proposals/{proposal_id}/deposits/{depositor}: + get: + summary: >- + Deposit queries single deposit information based proposalID, + depositAddr. + operationId: CosmosGovV1Deposit + responses: + '200': + description: A successful response. + 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. + description: amount to be deposited by depositor. + description: >- + QueryDepositResponse is the response type for the Query/Deposit + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: path + required: true + type: string + tags: + - Query + /cosmos/gov/v1/proposals/{proposal_id}/tally: + get: + summary: TallyResult queries the tally of a proposal vote. + operationId: CosmosGovV1TallyResult + responses: + '200': + description: A successful response. + 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. + description: >- + QueryTallyResultResponse is the response type for the Query/Tally + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmos/gov/v1/proposals/{proposal_id}/votes: + get: + summary: Votes queries votes of a given proposal. + operationId: CosmosGovV1Votes + responses: + '200': + description: A successful response. + 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 + 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 + description: >- + metadata is any arbitrary metadata to attached to the + vote. + 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. + 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 + description: >- + QueryVotesResponse is the response type for the Query/Votes RPC + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/gov/v1/proposals/{proposal_id}/votes/{voter}: + get: + summary: Vote queries voted information based on proposalID, voterAddr. + operationId: CosmosGovV1Vote + responses: + '200': + description: A successful response. + 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 + 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 + description: >- + metadata is any arbitrary metadata to attached to the + vote. + description: >- + QueryVoteResponse is the response type for the Query/Vote RPC + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + - name: voter + description: voter defines the voter address for the proposals. + in: path + required: true + type: string + tags: + - Query + /cosmos/gov/v1beta1/params/{params_type}: + get: + summary: Params queries all parameters of the gov module. + operationId: CosmosGovV1Beta1Params + responses: + '200': + description: A successful response. + 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. + 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. + 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. + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: params_type + description: >- + params_type defines which parameters to query for, can be one of + "voting", + + "tallying" or "deposit". + in: path + required: true + type: string + tags: + - Query + /cosmos/gov/v1beta1/proposals: + get: + summary: Proposals queries all proposals based on given status. + operationId: CosmosGovV1Beta1Proposals + responses: + '200': + description: A successful response. + 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. + + + 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. + 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 + description: >- + QueryProposalsResponse is the response type for the + Query/Proposals RPC + + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_status + 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 + 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 + type: string + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: query + required: false + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/gov/v1beta1/proposals/{proposal_id}: + get: + summary: Proposal queries proposal details based on ProposalID. + operationId: CosmosGovV1Beta1Proposal + responses: + '200': + description: A successful response. + 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. + + + 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: >- + QueryProposalResponse is the response type for the Query/Proposal + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits: + get: + summary: Deposits queries all deposits of a single proposal. + operationId: CosmosGovV1Beta1Deposits + responses: + '200': + description: A successful response. + 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. + 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. + 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 + description: >- + QueryDepositsResponse is the response type for the Query/Deposits + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}: + get: + summary: >- + Deposit queries single deposit information based proposalID, + depositAddr. + operationId: CosmosGovV1Beta1Deposit + responses: + '200': + description: A successful response. + 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. + description: amount to be deposited by depositor. + description: >- + QueryDepositResponse is the response type for the Query/Deposit + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: path + required: true + type: string + tags: + - Query + /cosmos/gov/v1beta1/proposals/{proposal_id}/tally: + get: + summary: TallyResult queries the tally of a proposal vote. + operationId: CosmosGovV1Beta1TallyResult + responses: + '200': + description: A successful response. + 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. + description: >- + QueryTallyResultResponse is the response type for the Query/Tally + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmos/gov/v1beta1/proposals/{proposal_id}/votes: + get: + summary: Votes queries votes of a given proposal. + operationId: CosmosGovV1Beta1Votes + responses: + '200': + description: A successful response. + 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 + 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. + + + Since: cosmos-sdk 0.43 + description: |- + options is the weighted vote options. + + Since: cosmos-sdk 0.43 + 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. + 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 + description: >- + QueryVotesResponse is the response type for the Query/Votes RPC + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}: + get: + summary: Vote queries voted information based on proposalID, voterAddr. + operationId: CosmosGovV1Beta1Vote + responses: + '200': + description: A successful response. + 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 + 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. + + + Since: cosmos-sdk 0.43 + description: |- + options is the weighted vote options. + + Since: cosmos-sdk 0.43 + description: >- + QueryVoteResponse is the response type for the Query/Vote RPC + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + - name: voter + description: voter defines the voter address for the proposals. + in: path + required: true + type: string + tags: + - Query + /cosmos/group/v1/group_info/{group_id}: + get: + summary: GroupInfo queries group info based on group id. + operationId: CosmosGroupV1GroupInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + info: + description: info is the GroupInfo of the group. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members + weight is changed, + + or any member is added or removed this version is + incremented and will + + cause proposals based on older versions of this group to + fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group was + created. + description: QueryGroupInfoResponse is the Query/GroupInfo response type. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: group_id + description: group_id is the unique ID of the group. + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmos/group/v1/group_members/{group_id}: + get: + summary: GroupMembers queries members of a group by group id. + operationId: CosmosGroupV1GroupMembers + responses: + '200': + description: A successful response. + schema: + type: object + properties: + members: + type: array + items: + type: object + properties: + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + member: + description: member is the member data. + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: >- + weight is the member's voting weight that should be + greater than 0. + metadata: + type: string + description: >- + metadata is any arbitrary metadata attached to the + member. + added_at: + type: string + format: date-time + description: >- + added_at is a timestamp specifying when a member was + added. + description: >- + GroupMember represents the relationship between a group and + a member. + description: members are the members of the group with given group_id. + 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 + description: >- + QueryGroupMembersResponse is the Query/GroupMembersResponse + response type. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: group_id + description: group_id is the unique ID of the group. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/group_policies_by_admin/{admin}: + get: + summary: GroupPoliciesByAdmin queries group policies by admin address. + operationId: CosmosGroupV1GroupPoliciesByAdmin + responses: + '200': + description: A successful response. + schema: + type: object + properties: + group_policies: + type: array + items: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + title: >- + metadata is any arbitrary metadata attached to the group + policy. + + the recommended format of the metadata is to be found + here: + + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's + GroupPolicyInfo structure that + + would create a different result on a running proposal. + decision_policy: + description: >- + decision_policy specifies the group policy's decision + policy. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy + was created. + description: >- + GroupPolicyInfo represents the high-level on-chain + information for a group policy. + description: >- + group_policies are the group policies info with provided + admin. + 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 + description: >- + QueryGroupPoliciesByAdminResponse is the + Query/GroupPoliciesByAdmin response type. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: admin + description: admin is the admin address of the group policy. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/group_policies_by_group/{group_id}: + get: + summary: GroupPoliciesByGroup queries group policies by group id. + operationId: CosmosGroupV1GroupPoliciesByGroup + responses: + '200': + description: A successful response. + schema: + type: object + properties: + group_policies: + type: array + items: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + title: >- + metadata is any arbitrary metadata attached to the group + policy. + + the recommended format of the metadata is to be found + here: + + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's + GroupPolicyInfo structure that + + would create a different result on a running proposal. + decision_policy: + description: >- + decision_policy specifies the group policy's decision + policy. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy + was created. + description: >- + GroupPolicyInfo represents the high-level on-chain + information for a group policy. + description: >- + group_policies are the group policies info associated with the + provided group. + 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 + description: >- + QueryGroupPoliciesByGroupResponse is the + Query/GroupPoliciesByGroup response type. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: group_id + description: group_id is the unique ID of the group policy's group. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/group_policy_info/{address}: + get: + summary: >- + GroupPolicyInfo queries group policy info based on account address of + group policy. + operationId: CosmosGroupV1GroupPolicyInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + info: + description: info is the GroupPolicyInfo of the group policy. + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + title: >- + metadata is any arbitrary metadata attached to the group + policy. + + the recommended format of the metadata is to be found + here: + + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's + GroupPolicyInfo structure that + + would create a different result on a running proposal. + decision_policy: + description: >- + decision_policy specifies the group policy's decision + policy. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy + was created. + description: >- + QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response + type. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 of the group policy. + in: path + required: true + type: string + tags: + - Query + /cosmos/group/v1/groups: + get: + summary: Groups queries all groups in state. + description: 'Since: cosmos-sdk 0.47.1' + operationId: CosmosGroupV1Groups + responses: + '200': + description: A successful response. + schema: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members + weight is changed, + + or any member is added or removed this version is + incremented and will + + cause proposals based on older versions of this group to + fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group was + created. + description: >- + GroupInfo represents the high-level on-chain information for + a group. + description: '`groups` is all the groups present in state.' + 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 + description: |- + QueryGroupsResponse is the Query/Groups response type. + + Since: cosmos-sdk 0.47.1 + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/groups_by_admin/{admin}: + get: + summary: GroupsByAdmin queries groups by admin address. + operationId: CosmosGroupV1GroupsByAdmin + responses: + '200': + description: A successful response. + schema: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members + weight is changed, + + or any member is added or removed this version is + incremented and will + + cause proposals based on older versions of this group to + fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group was + created. + description: >- + GroupInfo represents the high-level on-chain information for + a group. + description: groups are the groups info with the provided admin. + 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 + description: >- + QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse + response type. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: admin + description: admin is the account address of a group's admin. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/groups_by_member/{address}: + get: + summary: GroupsByMember queries groups by member address. + operationId: CosmosGroupV1GroupsByMember + responses: + '200': + description: A successful response. + schema: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members + weight is changed, + + or any member is added or removed this version is + incremented and will + + cause proposals based on older versions of this group to + fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group was + created. + description: >- + GroupInfo represents the high-level on-chain information for + a group. + description: groups are the groups info with the provided group member. + 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 + description: >- + QueryGroupsByMemberResponse is the Query/GroupsByMember response + type. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 group member address. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/proposal/{proposal_id}: + get: + summary: Proposal queries a proposal based on proposal id. + operationId: CosmosGroupV1Proposal + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposal: + description: proposal is the proposal info. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: >- + group_policy_address is the account address of group + policy. + 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/group#proposal-4 + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal was + submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at proposal + submission. + + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group + policy at proposal submission. + + When a decision policy is changed, existing proposals from + previous policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life + cycle of the proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes + for this + + proposal for each vote option. It is empty at submission, + and only + + populated after tallying, at voting period end or at + proposal execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting + must be done. + + Unless a successful MsgExec is called before (to execute a + proposal whose + + tally is successful before the voting period ends), + tallying will be done + + at this point, and the `final_tally_result`and `status` + fields will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal + execution. Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 `sdk.Msg`s that will be executed if + the proposal passes. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + description: QueryProposalResponse is the Query/Proposal response type. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id is the unique ID of a proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmos/group/v1/proposals/{proposal_id}/tally: + get: + summary: >- + TallyResult returns the tally result of a proposal. If the proposal is + + still in voting period, then this query computes the current tally + state, + + which might not be final. On the other hand, if the proposal is final, + + then it simply returns the `final_tally_result` state stored in the + + proposal itself. + operationId: CosmosGroupV1TallyResult + responses: + '200': + description: A successful response. + schema: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + description: QueryTallyResultResponse is the Query/TallyResult response type. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id is the unique id of a proposal. + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmos/group/v1/proposals_by_group_policy/{address}: + get: + summary: >- + ProposalsByGroupPolicy queries proposals based on account address of + group policy. + operationId: CosmosGroupV1ProposalsByGroupPolicy + responses: + '200': + description: A successful response. + schema: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: >- + group_policy_address is the account address of group + policy. + 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/group#proposal-4 + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal + was submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at + proposal submission. + + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group + policy at proposal submission. + + When a decision policy is changed, existing proposals + from previous policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life + cycle of the proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted + votes for this + + proposal for each vote option. It is empty at + submission, and only + + populated after tallying, at voting period end or at + proposal execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting + must be done. + + Unless a successful MsgExec is called before (to execute + a proposal whose + + tally is successful before the voting period ends), + tallying will be done + + at this point, and the `final_tally_result`and `status` + fields will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal + execution. Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 `sdk.Msg`s that will be executed + if the proposal passes. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + description: >- + Proposal defines a group proposal. Any member of a group can + submit a proposal + + for a group policy to decide upon. + + A proposal consists of a set of `sdk.Msg`s that will be + executed if the proposal + + passes as well as some optional metadata associated with the + proposal. + description: proposals are the proposals with given group policy. + 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 + description: >- + QueryProposalsByGroupPolicyResponse is the + Query/ProposalByGroupPolicy response type. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 of the group policy related to + proposals. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/vote_by_proposal_voter/{proposal_id}/{voter}: + get: + summary: VoteByProposalVoter queries a vote by proposal id and voter. + operationId: CosmosGroupV1VoteByProposalVoter + responses: + '200': + description: A successful response. + schema: + type: object + properties: + vote: + description: vote is the vote with given proposal_id and voter. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: >- + QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter + response type. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id is the unique ID of a proposal. + in: path + required: true + type: string + format: uint64 + - name: voter + description: voter is a proposal voter account address. + in: path + required: true + type: string + tags: + - Query + /cosmos/group/v1/votes_by_proposal/{proposal_id}: + get: + summary: VotesByProposal queries a vote by proposal id. + operationId: CosmosGroupV1VotesByProposal + responses: + '200': + description: A successful response. + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata attached to the vote. + submit_time: + type: string + format: date-time + description: >- + submit_time is the timestamp when the vote was + submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes for given proposal_id. + 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 + description: >- + QueryVotesByProposalResponse is the Query/VotesByProposal response + type. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: proposal_id + description: proposal_id is the unique ID of a proposal. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/group/v1/votes_by_voter/{voter}: + get: + summary: VotesByVoter queries a vote by voter. + operationId: CosmosGroupV1VotesByVoter + responses: + '200': + description: A successful response. + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata attached to the vote. + submit_time: + type: string + format: date-time + description: >- + submit_time is the timestamp when the vote was + submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes by given voter. + 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 + description: QueryVotesByVoterResponse is the Query/VotesByVoter response type. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: voter + description: voter is a proposal voter account address. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/mint/v1beta1/annual_provisions: + get: + summary: AnnualProvisions current minting annual provisions value. + operationId: CosmosMintV1Beta1AnnualProvisions + responses: + '200': + description: A successful response. + schema: + type: object + properties: + annual_provisions: + type: string + format: byte + description: >- + annual_provisions is the current minting annual provisions + value. + description: |- + QueryAnnualProvisionsResponse is the response type for the + Query/AnnualProvisions RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /cosmos/mint/v1beta1/inflation: + get: + summary: Inflation returns the current minting inflation value. + operationId: CosmosMintV1Beta1Inflation + responses: + '200': + description: A successful response. + schema: + type: object + properties: + inflation: + type: string + format: byte + description: inflation is the current minting inflation value. + description: >- + QueryInflationResponse is the response type for the + Query/Inflation RPC + + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /cosmos/mint/v1beta1/params: + get: + summary: Params returns the total set of minting parameters. + operationId: CosmosMintV1Beta1Params + responses: + '200': + description: A successful response. + 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 + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /cosmos/nft/v1beta1/balance/{owner}/{class_id}: + get: + summary: >- + Balance queries the number of NFTs of a given class owned by the owner, + same as balanceOf in ERC721 + operationId: CosmosNftV1Beta1Balance + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + type: string + format: uint64 + title: >- + amount is the number of all NFTs of a given class owned by the + owner + title: >- + QueryBalanceResponse is the response type for the Query/Balance + RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: owner + description: owner is the owner address of the nft + in: path + required: true + type: string + - name: class_id + description: class_id associated with the nft + in: path + required: true + type: string + tags: + - Query + /cosmos/nft/v1beta1/classes: + get: + summary: Classes queries all NFT classes + operationId: CosmosNftV1Beta1Classes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + classes: + type: array + items: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT + classification, similar to the contract address of + ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT + classification. Optional + symbol: + type: string + title: >- + symbol is an abbreviated name for nft classification. + Optional + description: + type: string + title: >- + description is a brief description of nft + classification. Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can + define schema for Class and NFT `Data` attributes. + Optional + uri_hash: + type: string + title: >- + uri_hash is a hash of the document pointed by uri. + Optional + data: + title: >- + data is the app specific metadata of the NFT class. + Optional + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: Class defines the class of the nft type. + description: class defines the class of the nft type. + 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 + title: >- + QueryClassesResponse is the response type for the Query/Classes + RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/nft/v1beta1/classes/{class_id}: + get: + summary: Class queries an NFT class based on its id + operationId: CosmosNftV1Beta1Class + responses: + '200': + description: A successful response. + schema: + type: object + properties: + class: + description: class defines the class of the nft type. + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT + classification, similar to the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT + classification. Optional + symbol: + type: string + title: >- + symbol is an abbreviated name for nft classification. + Optional + description: + type: string + title: >- + description is a brief description of nft classification. + Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define + schema for Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: >- + uri_hash is a hash of the document pointed by uri. + Optional + data: + title: >- + data is the app specific metadata of the NFT class. + Optional + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: >- + QueryClassResponse is the response type for the Query/Class RPC + method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: class_id + description: class_id associated with the nft + in: path + required: true + type: string + tags: + - Query + /cosmos/nft/v1beta1/nfts: + get: + summary: >- + NFTs queries all NFTs of a given class or owner,choose at least one of + the two, similar to tokenByIndex in + + ERC721Enumerable + operationId: CosmosNftV1Beta1NFTs + responses: + '200': + description: A successful response. + schema: + type: object + properties: + nfts: + type: array + items: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the + contract address of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + title: data is an app specific data of the NFT. Optional + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: NFT defines the NFT. + title: NFT defines the NFT + 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 + title: >- + QueryNFTsResponse is the response type for the Query/NFTs RPC + methods + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: class_id + description: class_id associated with the nft + in: query + required: false + type: string + - name: owner + description: owner is the owner address of the nft + in: query + required: false + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/nft/v1beta1/nfts/{class_id}/{id}: + get: + summary: NFT queries an NFT based on its class and id. + operationId: CosmosNftV1Beta1NFT + responses: + '200': + description: A successful response. + schema: + type: object + properties: + nft: + title: owner is the owner address of the nft + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the contract + address of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + title: data is an app specific data of the NFT. Optional + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: NFT defines the NFT. + title: QueryNFTResponse is the response type for the Query/NFT RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: class_id + description: class_id associated with the nft + in: path + required: true + type: string + - name: id + description: id is a unique identifier of the NFT + in: path + required: true + type: string + tags: + - Query + /cosmos/nft/v1beta1/owner/{class_id}/{id}: + get: + summary: >- + Owner queries the owner of the NFT based on its class and id, same as + ownerOf in ERC721 + operationId: CosmosNftV1Beta1Owner + responses: + '200': + description: A successful response. + schema: + type: object + properties: + owner: + type: string + title: owner is the owner address of the nft + title: >- + QueryOwnerResponse is the response type for the Query/Owner RPC + method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: class_id + description: class_id associated with the nft + in: path + required: true + type: string + - name: id + description: id is a unique identifier of the NFT + in: path + required: true + type: string + tags: + - Query + /cosmos/nft/v1beta1/supply/{class_id}: + get: + summary: >- + Supply queries the number of NFTs from the given class, same as + totalSupply of ERC721. + operationId: CosmosNftV1Beta1Supply + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + type: string + format: uint64 + title: amount is the number of all NFTs from the given class + title: >- + QuerySupplyResponse is the response type for the Query/Supply RPC + method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: class_id + description: class_id associated with the nft + in: path + required: true + type: string + tags: + - Query + /cosmos/params/v1beta1/params: + get: + summary: |- + Params queries a specific parameter of a module, given its subspace and + key. + operationId: CosmosParamsV1Beta1Params + responses: + '200': + description: A successful response. + schema: + type: object + properties: + param: + description: param defines the queried parameter. + type: object + properties: + subspace: + type: string + key: + type: string + value: + type: string + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + 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: subspace + description: subspace defines the module to query the parameter for. + in: query + required: false + type: string + - name: key + description: key defines the key of the parameter in the subspace. + in: query + required: false + type: string + tags: + - Query + /cosmos/params/v1beta1/subspaces: + get: + summary: >- + Subspaces queries for all registered subspaces and all keys for a + subspace. + description: 'Since: cosmos-sdk 0.46' + operationId: CosmosParamsV1Beta1Subspaces + responses: + '200': + description: A successful response. + schema: + type: object + properties: + subspaces: + type: array + items: + type: object + properties: + subspace: + type: string + keys: + type: array + items: + type: string + description: >- + Subspace defines a parameter subspace name and all the keys + that exist for + + the subspace. + + + Since: cosmos-sdk 0.46 + description: >- + QuerySubspacesResponse defines the response types for querying for + all + + registered subspaces and all keys for a subspace. + + + Since: cosmos-sdk 0.46 + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /cosmos/slashing/v1beta1/params: + get: + summary: Params queries the parameters of slashing module + operationId: CosmosSlashingV1Beta1Params + responses: + '200': + description: A successful response. + schema: + 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. + title: >- + QueryParamsResponse is the response type for the Query/Params RPC + method + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /cosmos/slashing/v1beta1/signing_infos: + get: + summary: SigningInfos queries signing info of all validators + operationId: CosmosSlashingV1Beta1SigningInfos + responses: + '200': + description: A successful response. + 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 + unjailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented each time the validator was a + bonded + + in a block and may have signed a precommit or not. This + in conjunction with the + + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + 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 misbehiavor. + missed_blocks_counter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + description: >- + ValidatorSigningInfo defines a validator's signing info for + monitoring their + + liveness activity. + title: info is the signing info of all validators + 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; + } + title: >- + QuerySigningInfosResponse is the response type for the + Query/SigningInfos RPC + + method + default: + description: An unexpected error response. + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/slashing/v1beta1/signing_infos/{cons_address}: + get: + summary: SigningInfo queries the signing info of given cons address + operationId: CosmosSlashingV1Beta1SigningInfo + responses: + '200': + description: A successful response. + 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 + unjailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented each time the validator was a + bonded + + in a block and may have signed a precommit or not. This in + conjunction with the + + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + 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 misbehiavor. + missed_blocks_counter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + description: >- + ValidatorSigningInfo defines a validator's signing info for + monitoring their + + liveness activity. + title: >- + QuerySigningInfoResponse is the response type for the + Query/SigningInfo RPC + + method + default: + description: An unexpected error response. + 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: cons_address + description: cons_address is the address to query signing info of + in: path + required: true + type: string + tags: + - Query + /cosmos/staking/v1beta1/delegations/{delegator_addr}: + get: + summary: >- + DelegatorDelegations queries all delegations of a given delegator + address. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: CosmosStakingV1Beta1DelegatorDelegations + responses: + '200': + description: A successful response. + 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 bech32-encoded address of + the delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-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. + 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 + description: |- + QueryDelegatorDelegationsResponse is response type for the + Query/DelegatorDelegations RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: delegator_addr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations: + get: + summary: Redelegations queries redelegations of given address. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: CosmosStakingV1Beta1Redelegations + responses: + '200': + description: A successful response. + 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. + 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. + 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 + description: >- + QueryRedelegationsResponse is response type for the + Query/Redelegations RPC + + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: delegator_addr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + type: string + - name: src_validator_addr + description: src_validator_addr defines the validator address to redelegate from. + in: query + required: false + type: string + - name: dst_validator_addr + description: dst_validator_addr defines the validator address to redelegate to. + in: query + required: false + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations: + get: + summary: >- + DelegatorUnbondingDelegations queries all unbonding delegations of a + given + + delegator address. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: CosmosStakingV1Beta1DelegatorUnbondingDelegations + responses: + '200': + description: A successful response. + schema: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-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. + 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 + description: >- + QueryUnbondingDelegatorDelegationsResponse is response type for + the + + Query/UnbondingDelegatorDelegations RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: delegator_addr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators: + get: + summary: |- + DelegatorValidators queries all validators info for given delegator + address. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: CosmosStakingV1Beta1DelegatorValidators + responses: + '200': + description: A successful response. + 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. + + + 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. + + + Since: cosmos-sdk 0.46 + 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 identifing 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. + 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 + description: |- + QueryDelegatorValidatorsResponse is response type for the + Query/DelegatorValidators RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: delegator_addr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}: + get: + summary: |- + DelegatorValidator queries validator info for given delegator validator + pair. + operationId: CosmosStakingV1Beta1DelegatorValidator + responses: + '200': + description: A successful response. + 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. + + + 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. + + + Since: cosmos-sdk 0.46 + 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 identifing an + unbonding of this validator + description: |- + QueryDelegatorValidatorResponse response type for the + Query/DelegatorValidator RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: delegator_addr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + type: string + - name: validator_addr + description: validator_addr defines the validator address to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/staking/v1beta1/historical_info/{height}: + get: + summary: HistoricalInfo queries the historical info for given height. + operationId: CosmosStakingV1Beta1HistoricalInfo + responses: + '200': + description: A successful response. + 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. + 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. + + + 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. + + + Since: cosmos-sdk 0.46 + 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 identifing 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: >- + QueryHistoricalInfoResponse is response type for the + Query/HistoricalInfo RPC + + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + type: string + format: int64 + tags: + - Query + /cosmos/staking/v1beta1/params: + get: + summary: Parameters queries the staking parameters. + operationId: CosmosStakingV1Beta1Params + responses: + '200': + description: A successful response. + 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. + 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: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Query + /cosmos/staking/v1beta1/pool: + get: + summary: Pool queries the pool info. + operationId: CosmosStakingV1Beta1Pool + responses: + '200': + description: A successful response. + schema: + type: object + properties: + pool: + description: pool defines the pool info. + type: object + properties: + not_bonded_tokens: + type: string + bonded_tokens: + type: string + description: QueryPoolResponse is response type for the Query/Pool RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Query + /cosmos/staking/v1beta1/validators: + get: + summary: Validators queries all validators that match the given status. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: CosmosStakingV1Beta1Validators + responses: + '200': + description: A successful response. + 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. + + + 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. + + + Since: cosmos-sdk 0.46 + 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 identifing 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. + 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 + title: >- + QueryValidatorsResponse is response type for the Query/Validators + RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/staking/v1beta1/validators/{validator_addr}: + get: + summary: Validator queries validator info for given validator address. + operationId: CosmosStakingV1Beta1Validator + responses: + '200': + description: A successful response. + 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. + + + 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. + + + Since: cosmos-sdk 0.46 + 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 identifing an + unbonding of this validator + title: >- + QueryValidatorResponse is response type for the Query/Validator + RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: validator_addr + description: validator_addr defines the validator address to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations: + get: + summary: ValidatorDelegations queries delegate info for given validator. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: CosmosStakingV1Beta1ValidatorDelegations + responses: + '200': + description: A successful response. + 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 bech32-encoded address of + the delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-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. + 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 + title: |- + QueryValidatorDelegationsResponse is response type for the + Query/ValidatorDelegations RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: validator_addr + description: validator_addr defines the validator address to query for. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}: + get: + summary: Delegation queries delegate info for given validator delegator pair. + operationId: CosmosStakingV1Beta1Delegation + responses: + '200': + description: A successful response. + 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 bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-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: >- + QueryDelegationResponse is response type for the Query/Delegation + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: validator_addr + description: validator_addr defines the validator address to query for. + in: path + required: true + type: string + - name: delegator_addr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation: + get: + summary: |- + UnbondingDelegation queries unbonding info for given validator delegator + pair. + operationId: CosmosStakingV1Beta1UnbondingDelegation + responses: + '200': + description: A successful response. + 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 bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-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: >- + QueryDelegationResponse is response type for the + Query/UnbondingDelegation + + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: validator_addr + description: validator_addr defines the validator address to query for. + in: path + required: true + type: string + - name: delegator_addr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations: + get: + summary: >- + ValidatorUnbondingDelegations queries unbonding delegations of a + validator. + description: >- + When called from another module, this query might consume a high amount + of + + gas if the pagination field is incorrectly set. + operationId: CosmosStakingV1Beta1ValidatorUnbondingDelegations + responses: + '200': + description: A successful response. + schema: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-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. + 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 + description: >- + QueryValidatorUnbondingDelegationsResponse is response type for + the + + Query/ValidatorUnbondingDelegations RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: validator_addr + description: validator_addr defines the validator address to query for. + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmos/tx/v1beta1/decode: + post: + summary: TxDecode decodes the transaction. + description: 'Since: cosmos-sdk 0.47' + operationId: CosmosTxV1Beta1TxDecode + responses: + '200': + description: A successful response. + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.TxDecodeResponse' + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: body + description: |- + TxDecodeRequest is the request type for the Service.TxDecode + RPC method. + + Since: cosmos-sdk 0.47 + in: body + required: true + 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. + + Since: cosmos-sdk 0.47 + tags: + - Service + /cosmos/tx/v1beta1/decode/amino: + post: + summary: TxDecodeAmino decodes an Amino transaction from encoded bytes to JSON. + description: 'Since: cosmos-sdk 0.47' + operationId: CosmosTxV1Beta1TxDecodeAmino + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amino_json: + type: string + description: >- + TxDecodeAminoResponse is the response type for the + Service.TxDecodeAmino + + RPC method. + + + Since: cosmos-sdk 0.47 + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: body + description: >- + TxDecodeAminoRequest is the request type for the + Service.TxDecodeAmino + + RPC method. + + + Since: cosmos-sdk 0.47 + in: body + required: true + schema: + type: object + properties: + amino_binary: + type: string + format: byte + description: >- + TxDecodeAminoRequest is the request type for the + Service.TxDecodeAmino + + RPC method. + + + Since: cosmos-sdk 0.47 + tags: + - Service + /cosmos/tx/v1beta1/encode: + post: + summary: TxEncode encodes the transaction. + description: 'Since: cosmos-sdk 0.47' + operationId: CosmosTxV1Beta1TxEncode + responses: + '200': + description: A successful response. + schema: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the encoded transaction bytes. + description: |- + TxEncodeResponse is the response type for the + Service.TxEncode method. + + Since: cosmos-sdk 0.47 + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: body + description: |- + TxEncodeRequest is the request type for the Service.TxEncode + RPC method. + + Since: cosmos-sdk 0.47 + in: body + required: true + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.TxEncodeRequest' + tags: + - Service + /cosmos/tx/v1beta1/encode/amino: + post: + summary: TxEncodeAmino encodes an Amino transaction from JSON to encoded bytes. + description: 'Since: cosmos-sdk 0.47' + operationId: CosmosTxV1Beta1TxEncodeAmino + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amino_binary: + type: string + format: byte + description: >- + TxEncodeAminoResponse is the response type for the + Service.TxEncodeAmino + + RPC method. + + + Since: cosmos-sdk 0.47 + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: body + description: >- + TxEncodeAminoRequest is the request type for the + Service.TxEncodeAmino + + RPC method. + + + Since: cosmos-sdk 0.47 + in: body + required: true + schema: + type: object + properties: + amino_json: + type: string + description: >- + TxEncodeAminoRequest is the request type for the + Service.TxEncodeAmino + + RPC method. + + + Since: cosmos-sdk 0.47 + tags: + - Service + /cosmos/tx/v1beta1/simulate: + post: + summary: Simulate simulates executing a transaction for estimating gas usage. + operationId: CosmosTxV1Beta1Simulate + responses: + '200': + description: A successful response. + 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. + 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 + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx + and ResponseDeliverTx. + + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + + + Since: cosmos-sdk 0.46 + description: |- + SimulateResponse is the response type for the + Service.SimulateRPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: body + description: |- + SimulateRequest is the request type for the Service.Simulate + RPC method. + in: body + required: true + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.SimulateRequest' + tags: + - Service + /cosmos/tx/v1beta1/txs: + get: + summary: GetTxsEvent fetches txs by event. + operationId: CosmosTxV1Beta1GetTxsEvent + responses: + '200': + description: A successful response. + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse' + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + - 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + - name: order_by + 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 + 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 + 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 + type: string + format: uint64 + tags: + - Service + post: + summary: BroadcastTx broadcast transaction. + operationId: CosmosTxV1Beta1BroadcastTx + responses: + '200': + description: A successful response. + 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. + 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. + + + 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 + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx + and ResponseDeliverTx. + + 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. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + description: |- + BroadcastTxResponse is the response type for the + Service.BroadcastTx method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: body + description: >- + BroadcastTxRequest is the request type for the + Service.BroadcastTxRequest + + RPC method. + in: body + required: true + 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. + tags: + - Service + /cosmos/tx/v1beta1/txs/block/{height}: + get: + summary: GetBlockWithTxs fetches a block with decoded txs. + description: 'Since: cosmos-sdk 0.45.2' + operationId: CosmosTxV1Beta1GetBlockWithTxs + responses: + '200': + description: A successful response. + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.GetBlockWithTxsResponse' + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Service + /cosmos/tx/v1beta1/txs/{hash}: + get: + summary: GetTx fetches a tx by hash. + operationId: CosmosTxV1Beta1GetTx + responses: + '200': + description: A successful response. + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.GetTxResponse' + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + type: string + tags: + - Service + /cosmos/upgrade/v1beta1/applied_plan/{name}: + get: + summary: AppliedPlan queries a previously applied upgrade plan by its name. + operationId: CosmosUpgradeV1Beta1AppliedPlan + responses: + '200': + description: A successful response. + 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. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + type: string + tags: + - Query + /cosmos/upgrade/v1beta1/authority: + get: + summary: Returns the account with authority to conduct upgrades + description: 'Since: cosmos-sdk 0.46' + operationId: CosmosUpgradeV1Beta1Authority + responses: + '200': + description: A successful response. + schema: + type: object + properties: + address: + type: string + description: 'Since: cosmos-sdk 0.46' + title: QueryAuthorityResponse is the response type for Query/Authority + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Query + /cosmos/upgrade/v1beta1/current_plan: + get: + summary: CurrentPlan queries the current upgrade plan. + operationId: CosmosUpgradeV1Beta1CurrentPlan + responses: + '200': + description: A successful response. + 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. + 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. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + QueryCurrentPlanResponse is the response type for the + Query/CurrentPlan RPC + + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Query + /cosmos/upgrade/v1beta1/module_versions: + get: + summary: ModuleVersions queries the list of module versions from state. + description: 'Since: cosmos-sdk 0.43' + operationId: CosmosUpgradeV1Beta1ModuleVersions + responses: + '200': + description: A successful response. + 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. + + Since: cosmos-sdk 0.43 + description: >- + module_versions is a list of module names with their consensus + versions. + description: >- + QueryModuleVersionsResponse is the response type for the + Query/ModuleVersions + + RPC method. + + + Since: cosmos-sdk 0.43 + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: module_name + 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 + type: string + tags: + - Query + /cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}: + get: + summary: >- + 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) + operationId: CosmosUpgradeV1Beta1UpgradedConsensusState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + upgraded_consensus_state: + type: string + format: byte + title: 'Since: cosmos-sdk 0.43' + description: >- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState + + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: last_height + 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 + type: string + format: int64 + tags: + - Query + /cosmwasm/wasm/v1/code: + get: + summary: Codes gets the metadata for all stored wasm codes + operationId: CosmwasmWasmV1Codes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + code_infos: + type: array + items: + type: object + properties: + code_id: + type: string + format: uint64 + title: id for legacy support + creator: + type: string + data_hash: + type: string + format: byte + instantiate_permission: + type: object + properties: + permission: + type: string + enum: + - ACCESS_TYPE_UNSPECIFIED + - ACCESS_TYPE_NOBODY + - ACCESS_TYPE_EVERYBODY + - ACCESS_TYPE_ANY_OF_ADDRESSES + default: ACCESS_TYPE_UNSPECIFIED + description: >- + - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified + placeholder for empty value + - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden + - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted + - ACCESS_TYPE_ANY_OF_ADDRESSES: AccessTypeAnyOfAddresses allow any of the addresses + title: AccessType permission types + addresses: + type: array + items: + type: string + description: AccessConfig access control type. + title: CodeInfoResponse contains code meta data from CodeInfo + 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 + title: >- + QueryCodesResponse is the response type for the Query/Codes RPC + method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmwasm/wasm/v1/code/{code_id}: + get: + summary: Code gets the binary code and metadata for a singe wasm code + operationId: CosmwasmWasmV1Code + responses: + '200': + description: A successful response. + schema: + type: object + properties: + code_info: + type: object + properties: + code_id: + type: string + format: uint64 + title: id for legacy support + creator: + type: string + data_hash: + type: string + format: byte + instantiate_permission: + type: object + properties: + permission: + type: string + enum: + - ACCESS_TYPE_UNSPECIFIED + - ACCESS_TYPE_NOBODY + - ACCESS_TYPE_EVERYBODY + - ACCESS_TYPE_ANY_OF_ADDRESSES + default: ACCESS_TYPE_UNSPECIFIED + description: >- + - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified + placeholder for empty value + - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden + - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted + - ACCESS_TYPE_ANY_OF_ADDRESSES: AccessTypeAnyOfAddresses allow any of the addresses + title: AccessType permission types + addresses: + type: array + items: + type: string + description: AccessConfig access control type. + title: CodeInfoResponse contains code meta data from CodeInfo + data: + type: string + format: byte + title: >- + QueryCodeResponse is the response type for the Query/Code RPC + method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: code_id + description: grpc-gateway_out does not support Go style CodID + in: path + required: true + type: string + format: uint64 + tags: + - Query + /cosmwasm/wasm/v1/code/{code_id}/contracts: + get: + summary: ContractsByCode lists all smart contracts for a code id + operationId: CosmwasmWasmV1ContractsByCode + responses: + '200': + description: A successful response. + schema: + type: object + properties: + contracts: + type: array + items: + type: string + title: contracts are a set of contract addresses + 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 + title: |- + QueryContractsByCodeResponse is the response type for the + Query/ContractsByCode RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: code_id + description: grpc-gateway_out does not support Go style CodID + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmwasm/wasm/v1/codes/params: + get: + summary: Params gets the module params + operationId: CosmwasmWasmV1Params + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + code_upload_access: + type: object + properties: + permission: + type: string + enum: + - ACCESS_TYPE_UNSPECIFIED + - ACCESS_TYPE_NOBODY + - ACCESS_TYPE_EVERYBODY + - ACCESS_TYPE_ANY_OF_ADDRESSES + default: ACCESS_TYPE_UNSPECIFIED + description: >- + - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified + placeholder for empty value + - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden + - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted + - ACCESS_TYPE_ANY_OF_ADDRESSES: AccessTypeAnyOfAddresses allow any of the addresses + title: AccessType permission types + addresses: + type: array + items: + type: string + description: AccessConfig access control type. + instantiate_default_permission: + type: string + enum: + - ACCESS_TYPE_UNSPECIFIED + - ACCESS_TYPE_NOBODY + - ACCESS_TYPE_EVERYBODY + - ACCESS_TYPE_ANY_OF_ADDRESSES + default: ACCESS_TYPE_UNSPECIFIED + description: >- + - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified + placeholder for empty value + - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden + - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted + - ACCESS_TYPE_ANY_OF_ADDRESSES: AccessTypeAnyOfAddresses allow any of the addresses + title: AccessType permission types + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Query + /cosmwasm/wasm/v1/codes/pinned: + get: + summary: PinnedCodes gets the pinned code ids + operationId: CosmwasmWasmV1PinnedCodes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + code_ids: + type: array + items: + type: string + format: uint64 + 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 + title: |- + QueryPinnedCodesResponse is the response type for the + Query/PinnedCodes RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmwasm/wasm/v1/contract/{address}: + get: + summary: ContractInfo gets the contract meta data + operationId: CosmwasmWasmV1ContractInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + address: + type: string + title: address is the address of the contract + contract_info: + type: object + properties: + code_id: + type: string + format: uint64 + title: CodeID is the reference to the stored Wasm code + creator: + type: string + title: Creator address who initially instantiated the contract + admin: + type: string + title: Admin is an optional address that can execute migrations + label: + type: string + description: >- + Label is optional metadata to be stored with a contract + instance. + created: + description: Created Tx position when the contract was instantiated. + type: object + properties: + block_height: + type: string + format: uint64 + title: BlockHeight is the block the contract was created at + tx_index: + type: string + format: uint64 + title: >- + TxIndex is a monotonic counter within the block + (actual transaction index, + + or gas consumed) + ibc_port_id: + type: string + extension: + description: >- + Extension is an extension point to store custom metadata + within the + + persistence model. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + title: ContractInfo stores a WASM contract instance + title: >- + QueryContractInfoResponse is the response type for the + Query/ContractInfo RPC + + method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 address of the contract to query + in: path + required: true + type: string + tags: + - Query + /cosmwasm/wasm/v1/contract/{address}/history: + get: + summary: ContractHistory gets the contract code history + operationId: CosmwasmWasmV1ContractHistory + responses: + '200': + description: A successful response. + schema: + type: object + properties: + entries: + type: array + items: + type: object + properties: + operation: + type: string + enum: + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS + default: CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED + description: >- + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: + ContractCodeHistoryOperationTypeUnspecified placeholder + for empty value + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: ContractCodeHistoryOperationTypeInit on chain contract instantiation + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: ContractCodeHistoryOperationTypeMigrate code migration + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: ContractCodeHistoryOperationTypeGenesis based on genesis data + title: >- + ContractCodeHistoryOperationType actions that caused a + code change + code_id: + type: string + format: uint64 + title: CodeID is the reference to the stored WASM code + updated: + description: Updated Tx position when the operation was executed. + type: object + properties: + block_height: + type: string + format: uint64 + title: BlockHeight is the block the contract was created at + tx_index: + type: string + format: uint64 + title: >- + TxIndex is a monotonic counter within the block + (actual transaction index, + + or gas consumed) + msg: + type: string + format: byte + description: ContractCodeHistoryEntry metadata to a contract. + 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 + title: |- + QueryContractHistoryResponse is the response type for the + Query/ContractHistory RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 address of the contract to query + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmwasm/wasm/v1/contract/{address}/raw/{query_data}: + get: + summary: RawContractState gets single key from the raw store data of a contract + operationId: CosmwasmWasmV1RawContractState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + data: + type: string + format: byte + title: Data contains the raw store data + title: |- + QueryRawContractStateResponse is the response type for the + Query/RawContractState RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 address of the contract + in: path + required: true + type: string + - name: query_data + in: path + required: true + type: string + format: byte + tags: + - Query + /cosmwasm/wasm/v1/contract/{address}/smart/{query_data}: + get: + summary: SmartContractState get smart query result from the contract + operationId: CosmwasmWasmV1SmartContractState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + data: + type: string + format: byte + title: Data contains the json data returned from the smart contract + title: |- + QuerySmartContractStateResponse is the response type for the + Query/SmartContractState RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 address of the contract + in: path + required: true + type: string + - name: query_data + description: QueryData contains the query data passed to the contract + in: path + required: true + type: string + format: byte + tags: + - Query + /cosmwasm/wasm/v1/contract/{address}/state: + get: + summary: AllContractState gets all raw store data for a single contract + operationId: CosmwasmWasmV1AllContractState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + models: + type: array + items: + type: object + properties: + key: + type: string + format: byte + title: hex-encode key to read it better (this is often ascii) + value: + type: string + format: byte + title: base64-encode raw value + title: Model is a struct that holds a KV pair + 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 + title: |- + QueryAllContractStateResponse is the response type for the + Query/AllContractState RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 address of the contract + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /cosmwasm/wasm/v1/contracts/creator/{creator_address}: + get: + summary: ContractsByCreator gets the contracts by creator + operationId: CosmwasmWasmV1ContractsByCreator + responses: + '200': + description: A successful response. + schema: + type: object + properties: + contract_addresses: + type: array + items: + type: string + title: ContractAddresses result set + 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 + description: |- + QueryContractsByCreatorResponse is the response type for the + Query/ContractsByCreator RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: creator_address + description: CreatorAddress is the address of contract creator + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /ibc/apps/interchain_accounts/controller/v1/owners/{owner}/connections/{connection_id}: + get: + summary: >- + InterchainAccount returns the interchain account address for a given + owner address on a given connection + operationId: IbcApplicationsInterchainAccountsControllerV1InterchainAccount + responses: + '200': + description: A successful response. + schema: + type: object + properties: + address: + type: string + description: >- + QueryInterchainAccountResponse the response type for the + Query/InterchainAccount RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: owner + in: path + required: true + type: string + - name: connection_id + in: path + required: true + type: string + tags: + - Query + /ibc/apps/interchain_accounts/controller/v1/params: + get: + summary: Params queries all parameters of the ICA controller submodule. + operationId: IbcApplicationsInterchainAccountsControllerV1Params + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + controller_enabled: + type: boolean + description: >- + controller_enabled enables or disables the controller + submodule. + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Query + /ibc/apps/interchain_accounts/host/v1/params: + get: + summary: Params queries all parameters of the ICA host submodule. + operationId: IbcApplicationsInterchainAccountsHostV1Params + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + host_enabled: + type: boolean + description: host_enabled enables or disables the host submodule. + allow_messages: + type: array + items: + type: string + description: >- + allow_messages defines a list of sdk message typeURLs + allowed to be executed on a host chain. + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + additionalProperties: {} + tags: + - Query + /ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address: + get: + summary: >- + EscrowAddress returns the escrow address for a particular port and + channel id. + operationId: IbcApplicationsTransferV1EscrowAddress + responses: + '200': + description: A successful response. + schema: + type: object + properties: + escrow_address: + type: string + title: the escrow account address + description: >- + QueryEscrowAddressResponse is the response type of the + EscrowAddress RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: channel_id + description: unique channel identifier + in: path + required: true + type: string + - name: port_id + description: unique port identifier + in: path + required: true + type: string + tags: + - Query + /ibc/apps/transfer/v1/denom_hashes/{trace}: + get: + summary: DenomHash queries a denomination hash information. + operationId: IbcApplicationsTransferV1DenomHash + responses: + '200': + description: A successful response. + schema: + type: object + properties: + hash: + type: string + description: hash (in hex format) of the denomination trace information. + description: >- + QueryDenomHashResponse is the response type for the + Query/DenomHash RPC + + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: trace + description: The denomination trace ([port_id]/[channel_id])+/[denom] + in: path + required: true + type: string + pattern: .+ + tags: + - Query + /ibc/apps/transfer/v1/denom_traces: + get: + summary: DenomTraces queries all denomination traces. + operationId: IbcApplicationsTransferV1DenomTraces + responses: + '200': + description: A successful response. + schema: + type: object + properties: + denom_traces: + type: array + items: + type: object + properties: + path: + type: string + description: >- + path defines the chain of port/channel identifiers used + for tracing the + + source of the fungible token. + base_denom: + type: string + description: base denomination of the relayed fungible token. + description: >- + DenomTrace contains the base denomination for ICS20 fungible + tokens and the + + source tracing information path. + description: denom_traces returns all denominations trace information. + 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 + description: >- + QueryConnectionsResponse is the response type for the + Query/DenomTraces RPC + + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /ibc/apps/transfer/v1/denom_traces/{hash}: + get: + summary: DenomTrace queries a denomination trace information. + operationId: IbcApplicationsTransferV1DenomTrace + responses: + '200': + description: A successful response. + schema: + type: object + properties: + denom_trace: + description: >- + denom_trace returns the requested denomination trace + information. + type: object + properties: + path: + type: string + description: >- + path defines the chain of port/channel identifiers used + for tracing the + + source of the fungible token. + base_denom: + type: string + description: base denomination of the relayed fungible token. + description: >- + QueryDenomTraceResponse is the response type for the + Query/DenomTrace RPC + + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 (in hex format) or denom (full denom with ibc prefix) of the + denomination trace information. + in: path + required: true + type: string + pattern: .+ + tags: + - Query + /ibc/apps/transfer/v1/denoms/{denom}/total_escrow: + get: + summary: >- + TotalEscrowForDenom returns the total amount of tokens in escrow based + on the denom. + operationId: IbcApplicationsTransferV1TotalEscrowForDenom + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + 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: >- + QueryTotalEscrowForDenomResponse is the response type for + TotalEscrowForDenom RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: denom + in: path + required: true + type: string + pattern: .+ + tags: + - Query + /ibc/apps/transfer/v1/params: + get: + summary: Params queries all parameters of the ibc-transfer module. + operationId: IbcApplicationsTransferV1Params + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + send_enabled: + type: boolean + description: >- + send_enabled enables or disables all cross-chain token + transfers from this + + chain. + receive_enabled: + type: boolean + description: >- + receive_enabled enables or disables all cross-chain token + transfers to this + + chain. + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Query + /ibc/core/channel/v1/channels: + get: + summary: Channels queries all the IBC channels of a chain. + operationId: IbcCoreChannelV1Channels + responses: + '200': + description: A successful response. + schema: + type: object + properties: + channels: + type: array + items: + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: >- + State defines if a channel is in one of the following + states: + + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: >- + - ORDER_NONE_UNSPECIFIED: zero-value for channel + ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other + end of the channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: >- + list of connection identifiers, in order, along which + packets sent on + + this channel will travel + version: + type: string + title: >- + opaque channel version, which is agreed upon during the + handshake + port_id: + type: string + title: port identifier + channel_id: + type: string + title: channel identifier + description: >- + IdentifiedChannel defines a channel with additional port and + channel + + identifier fields. + description: list of stored channels of the chain. + pagination: + title: pagination 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 + 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; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryChannelsResponse is the response type for the Query/Channels + RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}: + get: + summary: Channel queries an IBC Channel. + operationId: IbcCoreChannelV1Channel + responses: + '200': + description: A successful response. + schema: + type: object + properties: + channel: + title: channel associated with the request identifiers + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: >- + State defines if a channel is in one of the following + states: + + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other + end of the channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: >- + list of connection identifiers, in order, along which + packets sent on + + this channel will travel + version: + type: string + title: >- + opaque channel version, which is agreed upon during the + handshake + description: >- + Channel defines pipeline for exactly-once packet delivery + between specific + + modules on separate blockchains, which has at least one end + capable of + + sending packets and one end capable of receiving packets. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryChannelResponse is the response type for the Query/Channel + RPC method. + + Besides the Channel end, it includes a proof and the height from + which the + + proof was retrieved. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + tags: + - Query + /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/client_state: + get: + summary: >- + ChannelClientState queries for the client state for the channel + associated + + with the provided channel identifiers. + operationId: IbcCoreChannelV1ChannelClientState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + identified_client_state: + title: client state associated with the channel + type: object + properties: + client_id: + type: string + title: client identifier + client_state: + title: client state + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: >- + IdentifiedClientState defines a client state with an + additional client + + identifier field. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryChannelClientStateResponse is the Response type for the + Query/QueryChannelClientState RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + tags: + - Query + /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/consensus_state/revision/{revision_number}/height/{revision_height}: + get: + summary: |- + ChannelConsensusState queries for the consensus state for the channel + associated with the provided channel identifiers. + operationId: IbcCoreChannelV1ChannelConsensusState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + consensus_state: + title: consensus state associated with the channel + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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" + } + client_id: + type: string + title: client ID associated with the consensus state + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryChannelClientStateResponse is the Response type for the + Query/QueryChannelClientState RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: revision_number + description: revision number of the consensus state + in: path + required: true + type: string + format: uint64 + - name: revision_height + description: revision height of the consensus state + in: path + required: true + type: string + format: uint64 + tags: + - Query + /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/next_sequence: + get: + summary: >- + NextSequenceReceive returns the next receive sequence for a given + channel. + operationId: IbcCoreChannelV1NextSequenceReceive + responses: + '200': + description: A successful response. + schema: + type: object + properties: + next_sequence_receive: + type: string + format: uint64 + title: next sequence receive number + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QuerySequenceResponse is the request type for the + Query/QueryNextSequenceReceiveResponse RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + tags: + - Query + /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acknowledgements: + get: + summary: >- + PacketAcknowledgements returns all the packet acknowledgements + associated + + with a channel. + operationId: IbcCoreChannelV1PacketAcknowledgements + responses: + '200': + description: A successful response. + schema: + type: object + properties: + acknowledgements: + type: array + items: + type: object + properties: + port_id: + type: string + description: channel port identifier. + channel_id: + type: string + description: channel unique identifier. + sequence: + type: string + format: uint64 + description: packet sequence. + data: + type: string + format: byte + description: embedded data that represents packet state. + description: >- + PacketState defines the generic type necessary to retrieve + and store + + packet commitments, acknowledgements, and receipts. + + Caller is responsible for knowing the context necessary to + interpret this + + state as a commitment, acknowledgement, or a receipt. + pagination: + title: pagination 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 + 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; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryPacketAcknowledgemetsResponse is the request type for the + Query/QueryPacketAcknowledgements RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + - name: packet_commitment_sequences + description: list of packet sequences + in: query + required: false + type: array + items: + type: string + format: uint64 + collectionFormat: multi + tags: + - Query + /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}: + get: + summary: PacketAcknowledgement queries a stored packet acknowledgement hash. + operationId: IbcCoreChannelV1PacketAcknowledgement + responses: + '200': + description: A successful response. + schema: + type: object + properties: + acknowledgement: + type: string + format: byte + title: packet associated with the request fields + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + QueryPacketAcknowledgementResponse defines the client query + response for a + + packet which also includes a proof and the height from which the + + proof was retrieved + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - Query + /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments: + get: + summary: |- + PacketCommitments returns all the packet commitments hashes associated + with a channel. + operationId: IbcCoreChannelV1PacketCommitments + responses: + '200': + description: A successful response. + schema: + type: object + properties: + commitments: + type: array + items: + type: object + properties: + port_id: + type: string + description: channel port identifier. + channel_id: + type: string + description: channel unique identifier. + sequence: + type: string + format: uint64 + description: packet sequence. + data: + type: string + format: byte + description: embedded data that represents packet state. + description: >- + PacketState defines the generic type necessary to retrieve + and store + + packet commitments, acknowledgements, and receipts. + + Caller is responsible for knowing the context necessary to + interpret this + + state as a commitment, acknowledgement, or a receipt. + pagination: + title: pagination 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 + 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; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryPacketCommitmentsResponse is the request type for the + Query/QueryPacketCommitments RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks: + get: + summary: >- + UnreceivedAcks returns all the unreceived IBC acknowledgements + associated + + with a channel and sequences. + operationId: IbcCoreChannelV1UnreceivedAcks + responses: + '200': + description: A successful response. + schema: + type: object + properties: + sequences: + type: array + items: + type: string + format: uint64 + title: list of unreceived acknowledgement sequences + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryUnreceivedAcksResponse is the response type for the + Query/UnreceivedAcks RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: packet_ack_sequences + description: list of acknowledgement sequences + in: path + required: true + type: array + items: + type: string + format: uint64 + collectionFormat: csv + minItems: 1 + tags: + - Query + /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_commitment_sequences}/unreceived_packets: + get: + summary: >- + UnreceivedPackets returns all the unreceived IBC packets associated with + a + + channel and sequences. + operationId: IbcCoreChannelV1UnreceivedPackets + responses: + '200': + description: A successful response. + schema: + type: object + properties: + sequences: + type: array + items: + type: string + format: uint64 + title: list of unreceived packet sequences + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryUnreceivedPacketsResponse is the response type for the + Query/UnreceivedPacketCommitments RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: packet_commitment_sequences + description: list of packet sequences + in: path + required: true + type: array + items: + type: string + format: uint64 + collectionFormat: csv + minItems: 1 + tags: + - Query + /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_commitments/{sequence}: + get: + summary: PacketCommitment queries a stored packet commitment hash. + operationId: IbcCoreChannelV1PacketCommitment + responses: + '200': + description: A successful response. + schema: + type: object + properties: + commitment: + type: string + format: byte + title: packet associated with the request fields + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + QueryPacketCommitmentResponse defines the client query response + for a packet + + which also includes a proof and the height from which the proof + was + + retrieved + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - Query + /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/packet_receipts/{sequence}: + get: + summary: >- + PacketReceipt queries if a given packet sequence has been received on + the + + queried chain + operationId: IbcCoreChannelV1PacketReceipt + responses: + '200': + description: A successful response. + schema: + type: object + properties: + received: + type: boolean + title: success flag for if receipt exists + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + QueryPacketReceiptResponse defines the client query response for a + packet + + receipt which also includes a proof, and the height from which the + proof was + + retrieved + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: channel_id + description: channel unique identifier + in: path + required: true + type: string + - name: port_id + description: port unique identifier + in: path + required: true + type: string + - name: sequence + description: packet sequence + in: path + required: true + type: string + format: uint64 + tags: + - Query + /ibc/core/channel/v1/connections/{connection}/channels: + get: + summary: |- + ConnectionChannels queries all the channels associated with a connection + end. + operationId: IbcCoreChannelV1ConnectionChannels + responses: + '200': + description: A successful response. + schema: + type: object + properties: + channels: + type: array + items: + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: >- + State defines if a channel is in one of the following + states: + + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: >- + - ORDER_NONE_UNSPECIFIED: zero-value for channel + ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other + end of the channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: >- + list of connection identifiers, in order, along which + packets sent on + + this channel will travel + version: + type: string + title: >- + opaque channel version, which is agreed upon during the + handshake + port_id: + type: string + title: port identifier + channel_id: + type: string + title: channel identifier + description: >- + IdentifiedChannel defines a channel with additional port and + channel + + identifier fields. + description: list of channels associated with a connection. + pagination: + title: pagination 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 + 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; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryConnectionChannelsResponse is the Response type for the + Query/QueryConnectionChannels RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: connection + description: connection unique identifier + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /ibc/core/client/v1/client_states: + get: + summary: ClientStates queries all the IBC light clients of a chain. + operationId: IbcCoreClientV1ClientStates + responses: + '200': + description: A successful response. + schema: + type: object + properties: + client_states: + type: array + items: + type: object + properties: + client_id: + type: string + title: client identifier + client_state: + title: client state + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: >- + IdentifiedClientState defines a client state with an + additional client + + identifier field. + description: list of stored ClientStates of the chain. + pagination: + title: pagination 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 + 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; + } + description: >- + QueryClientStatesResponse is the response type for the + Query/ClientStates RPC + + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /ibc/core/client/v1/client_states/{client_id}: + get: + summary: ClientState queries an IBC light client. + operationId: IbcCoreClientV1ClientState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + client_state: + title: client state associated with the request identifier + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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" + } + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryClientStateResponse is the response type for the + Query/ClientState RPC + + method. Besides the client state, it includes a proof and the + height from + + which the proof was retrieved. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: client_id + description: client state unique identifier + in: path + required: true + type: string + tags: + - Query + /ibc/core/client/v1/client_status/{client_id}: + get: + summary: Status queries the status of an IBC client. + operationId: IbcCoreClientV1ClientStatus + responses: + '200': + description: A successful response. + schema: + type: object + properties: + status: + type: string + description: >- + QueryClientStatusResponse is the response type for the + Query/ClientStatus RPC + + method. It returns the current status of the IBC client. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: client_id + description: client unique identifier + in: path + required: true + type: string + tags: + - Query + /ibc/core/client/v1/consensus_states/{client_id}: + get: + summary: |- + ConsensusStates queries all the consensus state associated with a given + client. + operationId: IbcCoreClientV1ConsensusStates + responses: + '200': + description: A successful response. + schema: + type: object + properties: + consensus_states: + type: array + items: + type: object + properties: + height: + title: consensus state height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each + height while keeping + + RevisionNumber the same. However some consensus + algorithms may choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as + the RevisionHeight + + gets reset + consensus_state: + title: consensus state + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: >- + ConsensusStateWithHeight defines a consensus state with an + additional height + + field. + title: consensus states associated with the identifier + pagination: + title: pagination 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 + 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; + } + title: |- + QueryConsensusStatesResponse is the response type for the + Query/ConsensusStates RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: client_id + description: client identifier + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /ibc/core/client/v1/consensus_states/{client_id}/heights: + get: + summary: >- + ConsensusStateHeights queries the height of every consensus states + associated with a given client. + operationId: IbcCoreClientV1ConsensusStateHeights + responses: + '200': + description: A successful response. + schema: + type: object + properties: + consensus_state_heights: + type: array + items: + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms + may choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + Height is a monotonically increasing data type + + that can be compared against another Height for the purposes + of updating and + + freezing clients + title: consensus state heights + pagination: + title: pagination 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 + 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; + } + title: |- + QueryConsensusStateHeightsResponse is the response type for the + Query/ConsensusStateHeights RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: client_id + description: client identifier + in: path + required: true + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /ibc/core/client/v1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}: + get: + summary: >- + ConsensusState queries a consensus state associated with a client state + at + + a given height. + operationId: IbcCoreClientV1ConsensusState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + consensus_state: + title: >- + consensus state associated with the client identifier at the + given height + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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" + } + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + QueryConsensusStateResponse is the response type for the + Query/ConsensusState + + RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: client_id + description: client identifier + in: path + required: true + type: string + - name: revision_number + description: consensus state revision number + in: path + required: true + type: string + format: uint64 + - name: revision_height + description: consensus state revision height + in: path + required: true + type: string + format: uint64 + - name: latest_height + description: >- + latest_height overrrides the height field and queries the latest + stored + + ConsensusState + in: query + required: false + type: boolean + tags: + - Query + /ibc/core/client/v1/params: + get: + summary: ClientParams queries all parameters of the ibc client submodule. + operationId: IbcCoreClientV1ClientParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + allowed_clients: + type: array + items: + type: string + description: >- + allowed_clients defines the list of allowed client state + types which can be created + + and interacted with. If a client type is removed from the + allowed clients list, usage + + of this client will be disabled until it is added again to + the list. + description: >- + QueryClientParamsResponse is the response type for the + Query/ClientParams RPC + + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Query + /ibc/core/client/v1/upgraded_client_states: + get: + summary: UpgradedClientState queries an Upgraded IBC light client. + operationId: IbcCoreClientV1UpgradedClientState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + upgraded_client_state: + title: client state associated with the request identifier + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: |- + QueryUpgradedClientStateResponse is the response type for the + Query/UpgradedClientState RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Query + /ibc/core/client/v1/upgraded_consensus_states: + get: + summary: UpgradedConsensusState queries an Upgraded IBC consensus state. + operationId: IbcCoreClientV1UpgradedConsensusState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + upgraded_consensus_state: + title: Consensus state associated with the request identifier + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: |- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Query + /ibc/core/connection/v1/client_connections/{client_id}: + get: + summary: |- + ClientConnections queries the connection paths associated with a client + state. + operationId: IbcCoreConnectionV1ClientConnections + responses: + '200': + description: A successful response. + schema: + type: object + properties: + connection_paths: + type: array + items: + type: string + description: slice of all the connection paths associated with a client. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was generated + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryClientConnectionsResponse is the response type for the + Query/ClientConnections RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: client_id + description: client identifier associated with a connection + in: path + required: true + type: string + tags: + - Query + /ibc/core/connection/v1/connections: + get: + summary: Connections queries all the IBC connections of a chain. + operationId: IbcCoreConnectionV1Connections + responses: + '200': + description: A successful response. + schema: + type: object + properties: + connections: + type: array + items: + type: object + properties: + id: + type: string + description: connection identifier. + client_id: + type: string + description: client associated with this connection. + versions: + type: array + items: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: >- + list of features compatible with the specified + identifier + description: >- + Version defines the versioning scheme used to + negotiate the IBC verison in + + the connection handshake. + title: >- + IBC version which can be utilised to determine encodings + or protocols for + + channels or packets utilising this connection + state: + description: current state of the connection end. + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain + associated with a given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty + chain associated with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will + be append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: delay period associated with this connection. + description: >- + IdentifiedConnection defines a connection with additional + connection + + identifier field. + description: list of stored connections of the chain. + pagination: + title: pagination 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 + 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; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryConnectionsResponse is the response type for the + Query/Connections RPC + + method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + 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 + type: string + format: uint64 + - name: pagination.count_total + 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 + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - Query + /ibc/core/connection/v1/connections/{connection_id}: + get: + summary: Connection queries an IBC connection end. + operationId: IbcCoreConnectionV1Connection + responses: + '200': + description: A successful response. + schema: + type: object + properties: + connection: + title: connection associated with the request identifier + type: object + properties: + client_id: + type: string + description: client associated with this connection. + versions: + type: array + items: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: >- + list of features compatible with the specified + identifier + description: >- + Version defines the versioning scheme used to negotiate + the IBC verison in + + the connection handshake. + description: >- + IBC version which can be utilised to determine encodings + or protocols for + + channels or packets utilising this connection. + state: + description: current state of the connection end. + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain + associated with a given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty + chain associated with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: >- + delay period that must pass before a consensus state can + be used for + + packet-verification NOTE: delay period logic is only + implemented by some + + clients. + description: >- + ConnectionEnd defines a stateful object on a chain connected + to another + + separate one. + + NOTE: there must only be 2 defined ConnectionEnds to establish + + a connection between two chains. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryConnectionResponse is the response type for the + Query/Connection RPC + + method. Besides the connection end, it includes a proof and the + height from + + which the proof was retrieved. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: connection_id + description: connection unique identifier + in: path + required: true + type: string + tags: + - Query + /ibc/core/connection/v1/connections/{connection_id}/client_state: + get: + summary: |- + ConnectionClientState queries the client state associated with the + connection. + operationId: IbcCoreConnectionV1ConnectionClientState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + identified_client_state: + title: client state associated with the channel + type: object + properties: + client_id: + type: string + title: client identifier + client_state: + title: client state + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: >- + IdentifiedClientState defines a client state with an + additional client + + identifier field. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryConnectionClientStateResponse is the response type for the + Query/ConnectionClientState RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: connection_id + description: connection identifier + in: path + required: true + type: string + tags: + - Query + /ibc/core/connection/v1/connections/{connection_id}/consensus_state/revision/{revision_number}/height/{revision_height}: + get: + summary: |- + ConnectionConsensusState queries the consensus state associated with the + connection. + operationId: IbcCoreConnectionV1ConnectionConsensusState + responses: + '200': + description: A successful response. + schema: + type: object + properties: + consensus_state: + title: consensus state associated with the channel + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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" + } + client_id: + type: string + title: client ID associated with the consensus state + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryConnectionConsensusStateResponse is the response type for the + Query/ConnectionConsensusState RPC method + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: connection_id + description: connection identifier + in: path + required: true + type: string + - name: revision_number + in: path + required: true + type: string + format: uint64 + - name: revision_height + in: path + required: true + type: string + format: uint64 + tags: + - Query + /ibc/core/connection/v1/params: + get: + summary: ConnectionParams queries all parameters of the ibc connection submodule. + operationId: IbcCoreConnectionV1ConnectionParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_expected_time_per_block: + type: string + format: uint64 + description: >- + maximum expected time per block (in nanoseconds), used to + enforce block delay. This parameter should reflect the + + largest amount of time that the chain might reasonably + take to produce the next block under normal operating + + conditions. A safe choice is 3-5x the expected time per + block. + description: >- + QueryConnectionParamsResponse is the response type for the + Query/ConnectionParams RPC method. + default: + description: An unexpected error response. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: + - Query +definitions: + core.domain.MsgCreateUsernameRecordsResponse: + type: object + description: |- + MsgCreateUsernameRecordsResponse represents the response from creating a + UsernameRecord. + core.domain.MsgDeleteUsernameRecordsResponse: + type: object + description: |- + MsgDeleteUsernameRecordsResponse represents the response from deleting a + UsernameRecord. + core.domain.MsgUpdateUsernameRecordsResponse: + type: object + description: |- + MsgUpdateUsernameRecordsResponse represents the response from updating a + UsernameRecord. + core.domain.Params: + type: object + description: Params defines the parameters for the module. + core.domain.QueryAllUsernameRecordsResponse: + type: object + properties: + usernameRecords: + type: array + items: + type: object + properties: + index: + type: string + address: + type: string + method: + type: string + 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; + } + description: >- + QueryAllUsernameRecordsResponse is the response type for the + + Query/UsernameRecordAll RPC method. It contains all queried + UsernameRecords + + and the pagination information. + core.domain.QueryGetUsernameRecordsResponse: + type: object + properties: + usernameRecords: + type: object + properties: + index: + type: string + address: + type: string + method: + type: string + description: |- + QueryGetUsernameRecordsResponse is the response type for the + Query/UsernameRecord RPC method. It contains the queried UsernameRecords. + core.domain.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + description: |- + QueryParamsResponse is response type for the Query/Params RPC method. + It holds all the parameters of this module. + core.domain.UsernameRecord: + type: object + properties: + index: + type: string + address: + type: string + method: + type: string + 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. + 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. + + + Since: cosmos-sdk 0.43 + description: |- + message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } + title: |- + PageRequest is to be embedded in gRPC request messages for efficient + pagination. Ex: + 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. + 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; + } + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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" + } + core.identity.ControllerAccount: + type: object + properties: + address: + type: string + publicKey: + type: string + authenticators: + type: array + items: + type: string + wallets: + type: array + items: + type: string + core.identity.DIDDocument: + type: object + properties: + context: + type: array + items: + type: string + title: The JSON-LD context(s) used in the document + id: + type: string + title: The identifier for the DID subject + controller: + type: array + items: + type: string + title: optional, the entity/entities controlling the DID subject + authentication: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated with + the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: optional, the set of transport protocols supported by the + description: >- + VerificationMethod represents a verification method that can be + used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: The idx address of the owner of the verification relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., authentication, + assertion, + + etc.). + title: optional, the set of authentication methods associated with the DID + assertion_method: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated with + the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: optional, the set of transport protocols supported by the + description: >- + VerificationMethod represents a verification method that can be + used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: The idx address of the owner of the verification relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., authentication, + assertion, + + etc.). + title: optional, the set of assertion methods associated with the DID + capability_invocation: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated with + the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: optional, the set of transport protocols supported by the + description: >- + VerificationMethod represents a verification method that can be + used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: The idx address of the owner of the verification relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., authentication, + assertion, + + etc.). + title: optional, the set of capability invocation methods associated with + capability_delegation: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated with + the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: optional, the set of transport protocols supported by the + description: >- + VerificationMethod represents a verification method that can be + used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: The idx address of the owner of the verification relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., authentication, + assertion, + + etc.). + title: optional, the set of capability delegation methods associated with + key_agreement: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated with + the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: optional, the set of transport protocols supported by the + description: >- + VerificationMethod represents a verification method that can be + used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: The idx address of the owner of the verification relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., authentication, + assertion, + + etc.). + title: optional, the set of key agreement methods associated with the DID + also_known_as: + type: array + items: + type: string + title: optional, the set of identifiers for other personas or identities + description: >- + DIDDocument represents a Decentralized Identifier (DID) document that + + contains information about the DID subject, such as public keys, + verification + + methods, and services. + core.identity.MsgCreateControllerAccountResponse: + type: object + properties: + id: + type: string + format: uint64 + description: The ID of the created controller account. + account: + type: object + properties: + address: + type: string + publicKey: + type: string + authenticators: + type: array + items: + type: string + wallets: + type: array + items: + type: string + description: The created controller account. + description: |- + MsgCreateControllerAccountResponse represents the response to a create + controller account request. + core.identity.MsgDeleteControllerAccountResponse: + type: object + description: |- + MsgDeleteControllerAccountResponse represents the response to a delete + controller account request. + core.identity.MsgRegisterIdentityResponse: + type: object + properties: + success: + type: boolean + description: Indicates if the registration was successful. + did_document: + type: object + properties: + context: + type: array + items: + type: string + title: The JSON-LD context(s) used in the document + id: + type: string + title: The identifier for the DID subject + controller: + type: array + items: + type: string + title: optional, the entity/entities controlling the DID subject + authentication: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of authentication methods associated with the + DID + assertion_method: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of assertion methods associated with the DID + capability_invocation: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of capability invocation methods associated with + capability_delegation: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of capability delegation methods associated with + key_agreement: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of key agreement methods associated with the DID + also_known_as: + type: array + items: + type: string + title: optional, the set of identifiers for other personas or identities + description: >- + DIDDocument represents a Decentralized Identifier (DID) document that + + contains information about the DID subject, such as public keys, + verification + + methods, and services. + description: |- + MsgRegisterIdentityResponse represents the response to a register identity + request. + core.identity.MsgUpdateControllerAccountResponse: + type: object + properties: + account: + type: object + properties: + address: + type: string + publicKey: + type: string + authenticators: + type: array + items: + type: string + wallets: + type: array + items: + type: string + description: The updated controller account. + description: |- + MsgUpdateControllerAccountResponse represents the response to an update + controller account request. + core.identity.Params: + type: object + properties: + account_did_method_name: + type: string + account_did_method_context: + type: string + acccount_discovery_reward: + type: string + format: int64 + did_base_context: + type: string + maximum_identity_aliases: + type: integer + format: int32 + supported_did_methods: + type: array + items: + type: string + description: Params defines the parameters for the module. + core.identity.QueryAliasAvailableResponse: + type: object + properties: + available: + type: boolean + existing_document: + type: object + properties: + context: + type: array + items: + type: string + title: The JSON-LD context(s) used in the document + id: + type: string + title: The identifier for the DID subject + controller: + type: array + items: + type: string + title: optional, the entity/entities controlling the DID subject + authentication: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of authentication methods associated with the + DID + assertion_method: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of assertion methods associated with the DID + capability_invocation: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of capability invocation methods associated with + capability_delegation: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of capability delegation methods associated with + key_agreement: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of key agreement methods associated with the DID + also_known_as: + type: array + items: + type: string + title: optional, the set of identifiers for other personas or identities + description: >- + DIDDocument represents a Decentralized Identifier (DID) document that + + contains information about the DID subject, such as public keys, + verification + + methods, and services. + description: >- + QueryAliasAvailableResponse is the response type for the + Query/AliasAvailable + + RPC method. + core.identity.QueryAllControllerAccountResponse: + type: object + properties: + controllerAccount: + type: array + items: + type: object + properties: + address: + type: string + publicKey: + type: string + authenticators: + type: array + items: + type: string + wallets: + type: array + items: + type: string + 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; + } + description: |- + QueryAllControllerAccountResponse is the response type for the + Query/ControllerAccountAll RPC method. + core.identity.QueryAllDIDDocumentResponse: + type: object + properties: + dIDDocument: + type: array + items: + type: object + properties: + context: + type: array + items: + type: string + title: The JSON-LD context(s) used in the document + id: + type: string + title: The identifier for the DID subject + controller: + type: array + items: + type: string + title: optional, the entity/entities controlling the DID subject + authentication: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that + can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of authentication methods associated with the + DID + assertion_method: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that + can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of assertion methods associated with the DID + capability_invocation: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that + can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of capability invocation methods associated + with + capability_delegation: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that + can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of capability delegation methods associated + with + key_agreement: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that + can be used to + + authenticate the DID subject or perform other + cryptographic operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of key agreement methods associated with the + DID + also_known_as: + type: array + items: + type: string + title: >- + optional, the set of identifiers for other personas or + identities + description: >- + DIDDocument represents a Decentralized Identifier (DID) document + that + + contains information about the DID subject, such as public keys, + verification + + methods, and services. + 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; + } + description: >- + QueryAllDIDDocumentResponse is the response type for the + Query/DIDDocumentAll + + RPC method. + core.identity.QueryDidByAlsoKnownAsResponse: + type: object + properties: + didDocument: + title: A DIDDocument is a JSON-LD object that contains a set of public keys + type: object + properties: + context: + type: array + items: + type: string + title: The JSON-LD context(s) used in the document + id: + type: string + title: The identifier for the DID subject + controller: + type: array + items: + type: string + title: optional, the entity/entities controlling the DID subject + authentication: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of authentication methods associated with the + DID + assertion_method: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of assertion methods associated with the DID + capability_invocation: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of capability invocation methods associated with + capability_delegation: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of capability delegation methods associated with + key_agreement: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of key agreement methods associated with the DID + also_known_as: + type: array + items: + type: string + title: optional, the set of identifiers for other personas or identities + description: >- + DIDDocument represents a Decentralized Identifier (DID) document that + + contains information about the DID subject, such as public keys, + verification + + methods, and services. + description: |- + QueryDidByAlsoKnownAsResponse is the response type for the + Query/DidByAlsoKnownAs RPC method. + core.identity.QueryDidByOwnerResponse: + type: object + properties: + didDocument: + type: object + properties: + context: + type: array + items: + type: string + title: The JSON-LD context(s) used in the document + id: + type: string + title: The identifier for the DID subject + controller: + type: array + items: + type: string + title: optional, the entity/entities controlling the DID subject + authentication: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of authentication methods associated with the + DID + assertion_method: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of assertion methods associated with the DID + capability_invocation: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of capability invocation methods associated with + capability_delegation: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of capability delegation methods associated with + key_agreement: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of key agreement methods associated with the DID + also_known_as: + type: array + items: + type: string + title: optional, the set of identifiers for other personas or identities + description: >- + DIDDocument represents a Decentralized Identifier (DID) document that + + contains information about the DID subject, such as public keys, + verification + + methods, and services. + description: |- + QueryDidByOwnerResponse is the response type for the Query/DidByOwner RPC + method. + core.identity.QueryGetControllerAccountResponse: + type: object + properties: + controllerAccount: + type: object + properties: + address: + type: string + publicKey: + type: string + authenticators: + type: array + items: + type: string + wallets: + type: array + items: + type: string + description: |- + QueryGetControllerAccountResponse is the response type for the + Query/ControllerAccount RPC method. + core.identity.QueryGetDIDDocumentResponse: + type: object + properties: + dIDDocument: + type: object + properties: + context: + type: array + items: + type: string + title: The JSON-LD context(s) used in the document + id: + type: string + title: The identifier for the DID subject + controller: + type: array + items: + type: string + title: optional, the entity/entities controlling the DID subject + authentication: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: >- + optional, the set of authentication methods associated with the + DID + assertion_method: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of assertion methods associated with the DID + capability_invocation: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of capability invocation methods associated with + capability_delegation: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of capability delegation methods associated with + key_agreement: + type: array + items: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: >- + optional, the blockchain account identifier associated + with the + attestation_type: + type: string + title: >- + optional, the type of attestation associated with the + verification + transports: + type: array + items: + type: string + title: >- + optional, the set of transport protocols supported by + the + description: >- + VerificationMethod represents a verification method that can + be used to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: >- + The idx address of the owner of the verification + relationship + description: >- + VerificationRelationship represents a relationship between a + verification + + method and a specific verification purpose (e.g., + authentication, assertion, + + etc.). + title: optional, the set of key agreement methods associated with the DID + also_known_as: + type: array + items: + type: string + title: optional, the set of identifiers for other personas or identities + description: >- + DIDDocument represents a Decentralized Identifier (DID) document that + + contains information about the DID subject, such as public keys, + verification + + methods, and services. + description: |- + QueryGetDIDDocumentResponse is the response type for the Query/DIDDocument + RPC method. + core.identity.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + properties: + account_did_method_name: + type: string + account_did_method_context: + type: string + acccount_discovery_reward: + type: string + format: int64 + did_base_context: + type: string + maximum_identity_aliases: + type: integer + format: int32 + supported_did_methods: + type: array + items: + type: string + description: QueryParamsResponse is response type for the Query/Params RPC method. + core.identity.VerificationMethod: + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: optional, the blockchain account identifier associated with the + attestation_type: + type: string + title: optional, the type of attestation associated with the verification + transports: + type: array + items: + type: string + title: optional, the set of transport protocols supported by the + description: |- + VerificationMethod represents a verification method that can be used to + authenticate the DID subject or perform other cryptographic operations. + core.identity.VerificationRelationship: + type: object + properties: + verification_method: + title: The verification method associated with the relationship + type: object + properties: + id: + type: string + title: The identifier for the verification method + type: + type: string + title: The type of the verification method + controller: + type: string + title: The entity controlling the verification method + public_key_jwk: + type: string + title: optional, the public key in JSON Web Key (JWK) format + public_key_multibase: + type: string + title: optional, the public key in multibase-encoded format + blockchain_account_id: + type: string + title: optional, the blockchain account identifier associated with the + attestation_type: + type: string + title: optional, the type of attestation associated with the verification + transports: + type: array + items: + type: string + title: optional, the set of transport protocols supported by the + description: >- + VerificationMethod represents a verification method that can be used + to + + authenticate the DID subject or perform other cryptographic + operations. + reference: + type: string + title: The reference identifier for the relationship + type: + type: string + title: The type of the verification relationship + owner: + type: string + title: The idx address of the owner of the verification relationship + description: >- + VerificationRelationship represents a relationship between a verification + + method and a specific verification purpose (e.g., authentication, + assertion, + + etc.). + core.service.MsgCreateServiceRecordResponse: + type: object + properties: + id: + type: string + format: uint64 + description: >- + MsgCreateServiceRecordResponse is the response type for the + + CreateServiceRecord method. It returns the id of the created + ServiceRecord. + core.service.MsgDeleteServiceRecordResponse: + type: object + description: |- + MsgDeleteServiceRecordResponse is the response type for the + DeleteServiceRecord method. It doesn't return any specific value. + core.service.MsgUpdateServiceRecordResponse: + type: object + description: |- + MsgUpdateServiceRecordResponse is the response type for the + UpdateServiceRecord method. It doesn't return any specific value. + core.service.Params: + type: object + description: Params defines the parameters for the module. + core.service.QueryAllServiceRecordResponse: + type: object + properties: + ServiceRecord: + type: array + items: + type: object + properties: + id: + type: string + controller: + type: string + title: The entity controlling the service + origins: + type: array + items: + type: string + name: + type: string + title: The name of the service + description: + type: string + title: The description of the service + category: + type: string + title: The category of the service + 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; + } + description: |- + QueryAllServiceRecordResponse is the response type for the + Query/ServiceRecordAll RPC method. + core.service.QueryGetServiceRecordResponse: + type: object + properties: + ServiceRecord: + type: object + properties: + id: + type: string + controller: + type: string + title: The entity controlling the service + origins: + type: array + items: + type: string + name: + type: string + title: The name of the service + description: + type: string + title: The description of the service + category: + type: string + title: The category of the service + description: |- + QueryGetServiceRecordResponse is the response type for the + Query/ServiceRecord RPC method. + core.service.QueryParamsResponse: + type: object + properties: + params: + description: params holds all the parameters of this module. + type: object + description: QueryParamsResponse is response type for the Query/Params RPC method. + core.service.ServiceRecord: + type: object + properties: + id: + type: string + controller: + type: string + title: The entity controlling the service + origins: + type: array + items: + type: string + name: + type: string + title: The name of the service + description: + type: string + title: The description of the service + category: + type: string + title: The category of the service + cosmos.auth.v1beta1.AddressBytesToStringResponse: + type: object + properties: + address_string: + type: string + description: >- + AddressBytesToStringResponse is the response type for AddressString rpc + method. + + + Since: cosmos-sdk 0.46 + cosmos.auth.v1beta1.AddressStringToBytesResponse: + type: object + properties: + address_bytes: + type: string + format: byte + description: >- + AddressStringToBytesResponse is the response type for AddressBytes rpc + method. + + + Since: cosmos-sdk 0.46 + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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. + + Since: cosmos-sdk 0.46 + cosmos.auth.v1beta1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 + 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. + cosmos.auth.v1beta1.QueryAccountAddressByIDResponse: + type: object + properties: + account_address: + type: string + description: 'Since: cosmos-sdk 0.46.2' + title: >- + QueryAccountAddressByIDResponse is the response type for + AccountAddressByID rpc method + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + description: |- + QueryAccountInfoResponse is the Query/AccountInfo response type. + + Since: cosmos-sdk 0.47 + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: >- + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + description: >- + QueryAccountsResponse is the response type for the Query/Accounts RPC + method. + + + Since: cosmos-sdk 0.43 + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: >- + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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: >- + QueryModuleAccountsResponse is the response type for the + Query/ModuleAccounts RPC method. + + + Since: cosmos-sdk 0.46 + 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 + description: QueryParamsResponse is the response type for the Query/Params RPC method. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + cosmos.authz.v1beta1.MsgExecResponse: + type: object + properties: + results: + type: array + items: + type: string + format: byte + description: MsgExecResponse defines the Msg/MsgExecResponse response type. + cosmos.authz.v1beta1.MsgGrantResponse: + type: object + description: MsgGrantResponse defines the Msg/MsgGrant response type. + cosmos.authz.v1beta1.MsgRevokeResponse: + type: object + description: MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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 + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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 + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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 + 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 + 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. + + Since: cosmos-sdk 0.46 + 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. + cosmos.bank.v1beta1.Input: + type: object + properties: + address: + type: string + coins: + 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: Input models transaction input. + 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 + 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 + description: 'Since: cosmos-sdk 0.43' + 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. + + + Since: cosmos-sdk 0.43 + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional + information. Optional. + + + Since: cosmos-sdk 0.46 + 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. + + + Since: cosmos-sdk 0.46 + description: |- + Metadata represents a struct that describes + a basic token. + cosmos.bank.v1beta1.MsgMultiSendResponse: + type: object + description: MsgMultiSendResponse defines the Msg/MultiSend response type. + cosmos.bank.v1beta1.MsgSendResponse: + type: object + description: MsgSendResponse defines the Msg/Send response type. + cosmos.bank.v1beta1.MsgSetSendEnabledResponse: + type: object + description: |- + MsgSetSendEnabledResponse defines the Msg/SetSendEnabled response type. + + Since: cosmos-sdk 0.47 + cosmos.bank.v1beta1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 + cosmos.bank.v1beta1.Output: + type: object + properties: + address: + type: string + coins: + 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: Output models transaction outputs. + 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. + default_send_enabled: + type: boolean + description: Params defines the parameters for the bank module. + 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. + 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 + description: >- + QueryAllBalancesResponse is the response type for the Query/AllBalances + RPC + + method. + 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 + description: >- + QueryBalanceResponse is the response type for the Query/Balance RPC + method. + 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 + description: 'Since: cosmos-sdk 0.43' + 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. + + + Since: cosmos-sdk 0.43 + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional + information. Optional. + + + Since: cosmos-sdk 0.46 + 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. + + + Since: cosmos-sdk 0.46 + description: >- + QueryDenomMetadataResponse is the response type for the + Query/DenomMetadata RPC + + method. + 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. + + + Since: cosmos-sdk 0.46 + 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 + description: >- + QueryDenomOwnersResponse defines the RPC response of a DenomOwners RPC + query. + + + Since: cosmos-sdk 0.46 + 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 + description: 'Since: cosmos-sdk 0.43' + 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. + + + Since: cosmos-sdk 0.43 + uri: + type: string + description: >- + URI to a document (on or off-chain) that contains additional + information. Optional. + + + Since: cosmos-sdk 0.46 + 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. + + + Since: cosmos-sdk 0.46 + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + metadata provides the client information for all the registered + tokens. + 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 + description: >- + QueryDenomsMetadataResponse is the response type for the + Query/DenomsMetadata RPC + + method. + cosmos.bank.v1beta1.QueryParamsResponse: + type: object + properties: + 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. + default_send_enabled: + type: boolean + description: Params defines the parameters for the bank module. + description: >- + QueryParamsResponse defines the response type for querying x/bank + parameters. + 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). + 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 + description: |- + QuerySendEnabledResponse defines the RPC response of a SendEnable query. + + Since: cosmos-sdk 0.47 + 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 + description: >- + QuerySpendableBalanceByDenomResponse defines the gRPC response structure + for + + querying an account's spendable balance for a specific denom. + + + Since: cosmos-sdk 0.47 + 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. + 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 + description: >- + QuerySpendableBalancesResponse defines the gRPC response structure for + querying + + an account's spendable balances. + + + Since: cosmos-sdk 0.46 + 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 + description: >- + QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC + method. + 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 + pagination: + description: |- + pagination defines the pagination in the response. + + Since: cosmos-sdk 0.43 + 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 + title: >- + QueryTotalSupplyResponse is the response type for the Query/TotalSupply + RPC + + method + 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). + 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. + cosmos.base.node.v1beta1.ConfigResponse: + type: object + properties: + minimum_gas_price: + type: string + description: ConfigResponse defines the response structure for the Config gRPC query. + 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 + value: + type: string + format: byte + 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. + 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. + 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. + 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 represents a prevote, precommit, or commit 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 represents a prevote, precommit, or commit 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 + title: >- + BlockIdFlag indicates which BlcokID 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 + title: BlockIdFlag indicates which BlcokID 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. + 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 + 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 represents a prevote, precommit, or commit 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 represents a prevote, precommit, or commit 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 + title: >- + BlockIdFlag indicates which BlcokID 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 + title: BlockIdFlag indicates which BlcokID 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. + sdk_block: + title: 'Since: cosmos-sdk 0.47' + 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 represents a prevote, precommit, or commit 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 represents a prevote, precommit, or commit 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 + title: >- + BlockIdFlag indicates which BlcokID 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 + title: BlockIdFlag indicates which BlcokID 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. + description: >- + GetBlockByHeightResponse is the response type for the + Query/GetBlockByHeight RPC method. + 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 + 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 represents a prevote, precommit, or commit 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 represents a prevote, precommit, or commit 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 + title: >- + BlockIdFlag indicates which BlcokID 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 + title: BlockIdFlag indicates which BlcokID 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. + sdk_block: + title: 'Since: cosmos-sdk 0.47' + 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 represents a prevote, precommit, or commit 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 represents a prevote, precommit, or commit 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 + title: >- + BlockIdFlag indicates which BlcokID 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 + title: BlockIdFlag indicates which BlcokID 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. + description: >- + GetLatestBlockResponse is the response type for the Query/GetLatestBlock + RPC method. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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 + 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 + 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 + title: 'Since: cosmos-sdk 0.43' + description: VersionInfo is the type for the GetNodeInfoResponse message. + description: >- + GetNodeInfoResponse is the response type for the Query/GetNodeInfo RPC + method. + cosmos.base.tendermint.v1beta1.GetSyncingResponse: + type: object + properties: + syncing: + type: boolean + description: >- + GetSyncingResponse is the response type for the Query/GetSyncing RPC + method. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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 + 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. + 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. + 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 + cosmos.base.tendermint.v1beta1.ProofOp: + 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. + 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. + 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. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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 + cosmos_sdk_version: + type: string + title: 'Since: cosmos-sdk 0.43' + description: VersionInfo is the type for the GetNodeInfoResponse message. + tendermint.crypto.PublicKey: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Validators + 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 + 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 + tendermint.p2p.DefaultNodeInfoOther: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + tendermint.p2p.ProtocolVersion: + type: object + properties: + p2p: + type: string + format: uint64 + block: + type: string + format: uint64 + app: + type: string + format: uint64 + 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. + 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 represents a prevote, precommit, or commit 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 represents a prevote, precommit, or commit 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 + title: >- + BlockIdFlag indicates which BlcokID 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 + title: BlockIdFlag indicates which BlcokID 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. + tendermint.types.BlockID: + 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 + 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 + title: BlockIdFlag indicates which BlcokID the signature is for + 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 + 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 + title: BlockIdFlag indicates which BlcokID 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. + 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 + title: BlockIdFlag indicates which BlcokID 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. + 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. + title: Data contains the set of transactions included in the block + 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 represents a prevote, precommit, or commit 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 represents a prevote, precommit, or commit 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. + 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 represents a prevote, precommit, or commit 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 represents a prevote, precommit, or commit 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 + title: >- + BlockIdFlag indicates which BlcokID 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. + 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 represents a prevote, precommit, or commit 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 represents a prevote, precommit, or commit 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 + title: >- + BlockIdFlag indicates which BlcokID 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. + 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. + 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. + 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 + title: BlockIdFlag indicates which BlcokID 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 + 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 + title: >- + BlockIdFlag indicates which BlcokID 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. + tendermint.types.PartSetHeader: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + 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. + 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 + title: BlockIdFlag indicates which BlcokID 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. + 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 + 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 + 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 + 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 + 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 + 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 represents a prevote, precommit, or commit vote from validators for + consensus. + 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. + cosmos.consensus.v1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + 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. + description: >- + QueryParamsResponse defines the response type for querying x/consensus + parameters. + 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. + 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. + 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. + description: |- + ConsensusParams contains consensus critical parameters that determine the + validity of blocks. + 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). + 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. + 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. + tendermint.types.VersionParams: + type: object + properties: + app: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + cosmos.crisis.v1beta1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 + cosmos.crisis.v1beta1.MsgVerifyInvariantResponse: + type: object + description: MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. + 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 an Dec which implements the custom method + signatures required by gogoproto. + 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 an Dec which implements the custom method + signatures required by gogoproto. + description: |- + DelegationDelegatorReward represents the properties + of a delegator's delegation reward. + cosmos.distribution.v1beta1.MsgCommunityPoolSpendResponse: + type: object + description: |- + MsgCommunityPoolSpendResponse defines the response to executing a + MsgCommunityPoolSpend message. + + Since: cosmos-sdk 0.47 + cosmos.distribution.v1beta1.MsgFundCommunityPoolResponse: + type: object + description: >- + MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response + type. + cosmos.distribution.v1beta1.MsgSetWithdrawAddressResponse: + type: object + description: |- + MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response + type. + cosmos.distribution.v1beta1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 + cosmos.distribution.v1beta1.MsgWithdrawDelegatorRewardResponse: + 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: 'Since: cosmos-sdk 0.46' + description: |- + MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward + response type. + cosmos.distribution.v1beta1.MsgWithdrawValidatorCommissionResponse: + 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: 'Since: cosmos-sdk 0.46' + description: |- + MsgWithdrawValidatorCommissionResponse defines the + Msg/WithdrawValidatorCommission response type. + 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. + 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 an Dec which implements the custom method + signatures required by gogoproto. + description: pool defines community pool's coins. + description: >- + QueryCommunityPoolResponse is the response type for the + Query/CommunityPool + + RPC method. + 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 an Dec which implements the custom method + signatures required by gogoproto. + description: rewards defines the rewards accrued by a delegation. + description: |- + QueryDelegationRewardsResponse is the response type for the + Query/DelegationRewards RPC method. + 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 an 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. + 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 an Dec which implements the custom method + signatures required by gogoproto. + description: total defines the sum of all the rewards. + description: |- + QueryDelegationTotalRewardsResponse is the response type for the + Query/DelegationTotalRewards RPC method. + 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. + 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. + 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 + description: QueryParamsResponse is the response type for the Query/Params RPC method. + 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 an Dec which implements the custom + method + + signatures required by gogoproto. + title: |- + QueryValidatorCommissionResponse is the response type for the + Query/ValidatorCommission RPC method + 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 an Dec which implements the custom method + signatures required by gogoproto. + description: self_bond_rewards defines the self delegations rewards. + 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 an Dec which implements the custom method + signatures required by gogoproto. + description: commission defines the commission the validator received. + description: >- + QueryValidatorDistributionInfoResponse is the response type for the + Query/ValidatorDistributionInfo RPC method. + 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 an 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. + description: |- + QueryValidatorOutstandingRewardsResponse is the response type for the + Query/ValidatorOutstandingRewards RPC method. + 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. + 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 + description: |- + QueryValidatorSlashesResponse is the response type for the + Query/ValidatorSlashes RPC method. + 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 an Dec which implements the custom method + signatures required by gogoproto. + description: |- + ValidatorAccumulatedCommission represents accumulated commission + for a validator kept as a running counter, can be withdrawn at any time. + 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 an 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. + 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. + cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse: + type: object + properties: + hash: + type: string + format: byte + description: hash defines the hash of the evidence. + description: MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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 + 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. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + 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. + + + 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 + cosmos.feegrant.v1beta1.MsgGrantAllowanceResponse: + type: object + description: >- + MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response + type. + cosmos.feegrant.v1beta1.MsgRevokeAllowanceResponse: + type: object + description: >- + MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse + response type. + cosmos.feegrant.v1beta1.QueryAllowanceResponse: + type: object + properties: + allowance: + description: allowance is a 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. + + + 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: >- + 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. + + + 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. + 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 + description: >- + QueryAllowancesByGranterResponse is the response type for the + Query/AllowancesByGranter RPC method. + + + Since: cosmos-sdk 0.46 + 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. + + + 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. + 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 + 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. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + 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. + max_deposit_period: + type: string + description: >- + Maximum period for Atom holders to deposit on a proposal. Initial + value: 2 + + months. + description: DepositParams defines the params for deposits on governance proposals. + cosmos.gov.v1.MsgDepositResponse: + type: object + description: MsgDepositResponse defines the Msg/Deposit response type. + cosmos.gov.v1.MsgExecLegacyContentResponse: + type: object + description: >- + MsgExecLegacyContentResponse defines the Msg/ExecLegacyContent response + type. + cosmos.gov.v1.MsgSubmitProposalResponse: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + description: MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. + cosmos.gov.v1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 + cosmos.gov.v1.MsgVoteResponse: + type: object + description: MsgVoteResponse defines the Msg/Vote response type. + cosmos.gov.v1.MsgVoteWeightedResponse: + type: object + description: MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. + 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. + 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. + 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 + description: |- + Params defines the parameters for the x/gov module. + + Since: cosmos-sdk 0.47 + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + description: metadata is any arbitrary metadata attached to the proposal. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + proposer: + type: string + description: 'Since: cosmos-sdk 0.47' + title: Proposer is the address of the proposal sumbitter + 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.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. + description: >- + QueryDepositResponse is the response type for the Query/Deposit RPC + method. + 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. + 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 + description: >- + QueryDepositsResponse is the response type for the Query/Deposits RPC + method. + 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. + 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. + 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. + params: + description: |- + params defines all the paramaters of x/gov module. + + Since: cosmos-sdk 0.47 + 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. + 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 + description: QueryParamsResponse is the response type for the Query/Params RPC method. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + description: metadata is any arbitrary metadata attached to the proposal. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + proposer: + type: string + description: 'Since: cosmos-sdk 0.47' + title: Proposer is the address of the proposal sumbitter + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + description: metadata is any arbitrary metadata attached to the proposal. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + proposer: + type: string + description: 'Since: cosmos-sdk 0.47' + title: Proposer is the address of the proposal sumbitter + description: Proposal defines the core field members of a governance proposal. + description: proposals defines all the requested governance proposals. + 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 + 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. + description: >- + QueryTallyResultResponse is the response type for the Query/Tally RPC + method. + 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 + description: metadata is any arbitrary metadata to attached to the vote. + description: QueryVoteResponse is the response type for the Query/Vote RPC method. + 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 + description: metadata is any arbitrary metadata to attached to the vote. + 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. + 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 + description: QueryVotesResponse is the response type for the Query/Votes RPC method. + 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. + 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. + 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. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the vote. + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + 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. + description: VotingParams defines the params for voting on governance proposals. + 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 + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: WeightedVoteOption defines a unit of vote for vote split. + 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. + description: |- + Deposit defines an amount deposited by an account address to an active + proposal. + 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. + max_deposit_period: + type: string + description: >- + Maximum period for Atom holders to deposit on a proposal. Initial + value: 2 + + months. + description: DepositParams defines the params for deposits on governance proposals. + cosmos.gov.v1beta1.MsgDepositResponse: + type: object + description: MsgDepositResponse defines the Msg/Deposit response type. + cosmos.gov.v1beta1.MsgSubmitProposalResponse: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal_id defines the unique id of the proposal. + description: MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. + cosmos.gov.v1beta1.MsgVoteResponse: + type: object + description: MsgVoteResponse defines the Msg/Vote response type. + cosmos.gov.v1beta1.MsgVoteWeightedResponse: + type: object + description: |- + MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. + + Since: cosmos-sdk 0.43 + 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. + + + 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. + 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. + description: >- + QueryDepositResponse is the response type for the Query/Deposit RPC + method. + 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. + 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 + description: >- + QueryDepositsResponse is the response type for the Query/Deposits RPC + method. + 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. + 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. + 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. + description: QueryParamsResponse is the response type for the Query/Params RPC method. + 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. + + + 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: >- + 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. + + + 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. + 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 + 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. + description: >- + QueryTallyResultResponse is the response type for the Query/Tally RPC + method. + 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. + + Since: cosmos-sdk 0.43 + description: |- + options is the weighted vote options. + + Since: cosmos-sdk 0.43 + description: QueryVoteResponse is the response type for the Query/Vote RPC method. + 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. + + Since: cosmos-sdk 0.43 + description: |- + options is the weighted vote options. + + Since: cosmos-sdk 0.43 + 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. + 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 + description: QueryVotesResponse is the response type for the Query/Votes RPC method. + 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. + 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. + description: TallyParams defines the params for tallying votes on governance proposals. + 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. + 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 + 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. + + Since: cosmos-sdk 0.43 + description: |- + options is the weighted vote options. + + Since: cosmos-sdk 0.43 + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. + 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. + description: VotingParams defines the params for voting on governance proposals. + 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 + weight: + type: string + description: weight is the vote weight associated with the vote option. + description: |- + WeightedVoteOption defines a unit of vote for vote split. + + Since: cosmos-sdk 0.43 + cosmos.group.v1.Exec: + type: string + enum: + - EXEC_UNSPECIFIED + - EXEC_TRY + default: EXEC_UNSPECIFIED + description: |- + Exec defines modes of execution of a proposal on creation or on new vote. + + - EXEC_UNSPECIFIED: An empty value means that there should be a separate + MsgExec request for the proposal to execute. + - EXEC_TRY: Try to execute the proposal immediately. + If the proposal is not allowed per the DecisionPolicy, + the proposal will still be open and could + be executed at a later point. + cosmos.group.v1.GroupInfo: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership structure + that + + would break existing proposals. Whenever any members weight is + changed, + + or any member is added or removed this version is incremented and will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: GroupInfo represents the high-level on-chain information for a group. + cosmos.group.v1.GroupMember: + type: object + properties: + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + member: + description: member is the member data. + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: >- + weight is the member's voting weight that should be greater than + 0. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the member. + added_at: + type: string + format: date-time + description: added_at is a timestamp specifying when a member was added. + description: GroupMember represents the relationship between a group and a member. + cosmos.group.v1.GroupPolicyInfo: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + title: |- + metadata is any arbitrary metadata attached to the group policy. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's GroupPolicyInfo + structure that + + would create a different result on a running proposal. + decision_policy: + description: decision_policy specifies the group policy's decision policy. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group policy was created. + description: >- + GroupPolicyInfo represents the high-level on-chain information for a group + policy. + cosmos.group.v1.Member: + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: weight is the member's voting weight that should be greater than 0. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the member. + added_at: + type: string + format: date-time + description: added_at is a timestamp specifying when a member was added. + description: |- + Member represents a group member with an account address, + non-zero weight, metadata and added_at timestamp. + cosmos.group.v1.MemberRequest: + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: weight is the member's voting weight that should be greater than 0. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the member. + description: |- + MemberRequest represents a group member to be used in Msg server requests. + Contrary to `Member`, it doesn't have any `added_at` field + since this field cannot be set as part of requests. + cosmos.group.v1.MsgCreateGroupPolicyResponse: + type: object + properties: + address: + type: string + description: address is the account address of the newly created group policy. + description: MsgCreateGroupPolicyResponse is the Msg/CreateGroupPolicy response type. + cosmos.group.v1.MsgCreateGroupResponse: + type: object + properties: + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the newly created group. + description: MsgCreateGroupResponse is the Msg/CreateGroup response type. + cosmos.group.v1.MsgCreateGroupWithPolicyResponse: + type: object + properties: + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the newly created group with policy. + group_policy_address: + type: string + description: >- + group_policy_address is the account address of the newly created group + policy. + description: >- + MsgCreateGroupWithPolicyResponse is the Msg/CreateGroupWithPolicy response + type. + cosmos.group.v1.MsgExecResponse: + type: object + properties: + result: + description: result is the final result of the proposal execution. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + description: MsgExecResponse is the Msg/Exec request type. + cosmos.group.v1.MsgLeaveGroupResponse: + type: object + description: MsgLeaveGroupResponse is the Msg/LeaveGroup response type. + cosmos.group.v1.MsgSubmitProposalResponse: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + description: MsgSubmitProposalResponse is the Msg/SubmitProposal response type. + cosmos.group.v1.MsgUpdateGroupAdminResponse: + type: object + description: MsgUpdateGroupAdminResponse is the Msg/UpdateGroupAdmin response type. + cosmos.group.v1.MsgUpdateGroupMembersResponse: + type: object + description: MsgUpdateGroupMembersResponse is the Msg/UpdateGroupMembers response type. + cosmos.group.v1.MsgUpdateGroupMetadataResponse: + type: object + description: >- + MsgUpdateGroupMetadataResponse is the Msg/UpdateGroupMetadata response + type. + cosmos.group.v1.MsgUpdateGroupPolicyAdminResponse: + type: object + description: >- + MsgUpdateGroupPolicyAdminResponse is the Msg/UpdateGroupPolicyAdmin + response type. + cosmos.group.v1.MsgUpdateGroupPolicyDecisionPolicyResponse: + type: object + description: >- + MsgUpdateGroupPolicyDecisionPolicyResponse is the + Msg/UpdateGroupPolicyDecisionPolicy response type. + cosmos.group.v1.MsgUpdateGroupPolicyMetadataResponse: + type: object + description: >- + MsgUpdateGroupPolicyMetadataResponse is the Msg/UpdateGroupPolicyMetadata + response type. + cosmos.group.v1.MsgVoteResponse: + type: object + description: MsgVoteResponse is the Msg/Vote response type. + cosmos.group.v1.MsgWithdrawProposalResponse: + type: object + description: MsgWithdrawProposalResponse is the Msg/WithdrawProposal response type. + cosmos.group.v1.Proposal: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: group_policy_address is the account address of group policy. + 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/group#proposal-4 + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: submit_time is a timestamp specifying when a proposal was submitted. + group_version: + type: string + format: uint64 + description: |- + group_version tracks the version of the group at proposal submission. + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group policy at + proposal submission. + + When a decision policy is changed, existing proposals from previous + policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life cycle of the + proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes for this + + proposal for each vote option. It is empty at submission, and only + + populated after tallying, at voting period end or at proposal + execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting must be done. + + Unless a successful MsgExec is called before (to execute a proposal + whose + + tally is successful before the voting period ends), tallying will be + done + + at this point, and the `final_tally_result`and `status` fields will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal execution. Initial + value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 `sdk.Msg`s that will be executed if the proposal + passes. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + description: >- + Proposal defines a group proposal. Any member of a group can submit a + proposal + + for a group policy to decide upon. + + A proposal consists of a set of `sdk.Msg`s that will be executed if the + proposal + + passes as well as some optional metadata associated with the proposal. + cosmos.group.v1.ProposalExecutorResult: + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + description: |- + ProposalExecutorResult defines types of proposal executor results. + + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED: An empty value is not allowed. + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN: We have not yet run the executor. + - PROPOSAL_EXECUTOR_RESULT_SUCCESS: The executor was successful and proposed action updated state. + - PROPOSAL_EXECUTOR_RESULT_FAILURE: The executor returned an error and proposed action didn't update state. + cosmos.group.v1.ProposalStatus: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + description: |- + ProposalStatus defines proposal statuses. + + - PROPOSAL_STATUS_UNSPECIFIED: An empty value is invalid and not allowed. + - PROPOSAL_STATUS_SUBMITTED: Initial status of a proposal when submitted. + - PROPOSAL_STATUS_ACCEPTED: Final status of a proposal when the final tally is done and the outcome + passes the group policy's decision policy. + - PROPOSAL_STATUS_REJECTED: Final status of a proposal when the final tally is done and the outcome + is rejected by the group policy's decision policy. + - PROPOSAL_STATUS_ABORTED: Final status of a proposal when the group policy is modified before the + final tally. + - PROPOSAL_STATUS_WITHDRAWN: A proposal can be withdrawn before the voting start time by the owner. + When this happens the final status is Withdrawn. + cosmos.group.v1.QueryGroupInfoResponse: + type: object + properties: + info: + description: info is the GroupInfo of the group. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership structure + that + + would break existing proposals. Whenever any members weight is + changed, + + or any member is added or removed this version is incremented and + will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: QueryGroupInfoResponse is the Query/GroupInfo response type. + cosmos.group.v1.QueryGroupMembersResponse: + type: object + properties: + members: + type: array + items: + type: object + properties: + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + member: + description: member is the member data. + type: object + properties: + address: + type: string + description: address is the member's account address. + weight: + type: string + description: >- + weight is the member's voting weight that should be greater + than 0. + metadata: + type: string + description: metadata is any arbitrary metadata attached to the member. + added_at: + type: string + format: date-time + description: added_at is a timestamp specifying when a member was added. + description: >- + GroupMember represents the relationship between a group and a + member. + description: members are the members of the group with given group_id. + 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 + description: QueryGroupMembersResponse is the Query/GroupMembersResponse response type. + cosmos.group.v1.QueryGroupPoliciesByAdminResponse: + type: object + properties: + group_policies: + type: array + items: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + title: >- + metadata is any arbitrary metadata attached to the group policy. + + the recommended format of the metadata is to be found here: + + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's GroupPolicyInfo + structure that + + would create a different result on a running proposal. + decision_policy: + description: decision_policy specifies the group policy's decision policy. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy was + created. + description: >- + GroupPolicyInfo represents the high-level on-chain information for a + group policy. + description: group_policies are the group policies info with provided admin. + 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 + description: >- + QueryGroupPoliciesByAdminResponse is the Query/GroupPoliciesByAdmin + response type. + cosmos.group.v1.QueryGroupPoliciesByGroupResponse: + type: object + properties: + group_policies: + type: array + items: + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + title: >- + metadata is any arbitrary metadata attached to the group policy. + + the recommended format of the metadata is to be found here: + + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's GroupPolicyInfo + structure that + + would create a different result on a running proposal. + decision_policy: + description: decision_policy specifies the group policy's decision policy. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy was + created. + description: >- + GroupPolicyInfo represents the high-level on-chain information for a + group policy. + description: >- + group_policies are the group policies info associated with the + provided group. + 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 + description: >- + QueryGroupPoliciesByGroupResponse is the Query/GroupPoliciesByGroup + response type. + cosmos.group.v1.QueryGroupPolicyInfoResponse: + type: object + properties: + info: + description: info is the GroupPolicyInfo of the group policy. + type: object + properties: + address: + type: string + description: address is the account address of group policy. + group_id: + type: string + format: uint64 + description: group_id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group admin. + metadata: + type: string + title: |- + metadata is any arbitrary metadata attached to the group policy. + the recommended format of the metadata is to be found here: + https://docs.cosmos.network/v0.47/modules/group#decision-policy-1 + version: + type: string + format: uint64 + description: >- + version is used to track changes to a group's GroupPolicyInfo + structure that + + would create a different result on a running proposal. + decision_policy: + description: decision_policy specifies the group policy's decision policy. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + created_at: + type: string + format: date-time + description: >- + created_at is a timestamp specifying when a group policy was + created. + description: QueryGroupPolicyInfoResponse is the Query/GroupPolicyInfo response type. + cosmos.group.v1.QueryGroupsByAdminResponse: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members weight is + changed, + + or any member is added or removed this version is incremented + and will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: >- + GroupInfo represents the high-level on-chain information for a + group. + description: groups are the groups info with the provided admin. + 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 + description: >- + QueryGroupsByAdminResponse is the Query/GroupsByAdminResponse response + type. + cosmos.group.v1.QueryGroupsByMemberResponse: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members weight is + changed, + + or any member is added or removed this version is incremented + and will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: >- + GroupInfo represents the high-level on-chain information for a + group. + description: groups are the groups info with the provided group member. + 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 + description: QueryGroupsByMemberResponse is the Query/GroupsByMember response type. + cosmos.group.v1.QueryGroupsResponse: + type: object + properties: + groups: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique ID of the group. + admin: + type: string + description: admin is the account address of the group's admin. + metadata: + type: string + description: metadata is any arbitrary metadata to attached to the group. + version: + type: string + format: uint64 + title: >- + version is used to track changes to a group's membership + structure that + + would break existing proposals. Whenever any members weight is + changed, + + or any member is added or removed this version is incremented + and will + + cause proposals based on older versions of this group to fail + total_weight: + type: string + description: total_weight is the sum of the group members' weights. + created_at: + type: string + format: date-time + description: created_at is a timestamp specifying when a group was created. + description: >- + GroupInfo represents the high-level on-chain information for a + group. + description: '`groups` is all the groups present in state.' + 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 + description: |- + QueryGroupsResponse is the Query/Groups response type. + + Since: cosmos-sdk 0.47.1 + cosmos.group.v1.QueryProposalResponse: + type: object + properties: + proposal: + description: proposal is the proposal info. + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: group_policy_address is the account address of group policy. + 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/group#proposal-4 + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal was + submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at proposal + submission. + + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group policy at + proposal submission. + + When a decision policy is changed, existing proposals from + previous policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life cycle of the + proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes for + this + + proposal for each vote option. It is empty at submission, and only + + populated after tallying, at voting period end or at proposal + execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting must be + done. + + Unless a successful MsgExec is called before (to execute a + proposal whose + + tally is successful before the voting period ends), tallying will + be done + + at this point, and the `final_tally_result`and `status` fields + will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal execution. + Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 `sdk.Msg`s that will be executed if the + proposal passes. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + description: QueryProposalResponse is the Query/Proposal response type. + cosmos.group.v1.QueryProposalsByGroupPolicyResponse: + type: object + properties: + proposals: + type: array + items: + type: object + properties: + id: + type: string + format: uint64 + description: id is the unique id of the proposal. + group_policy_address: + type: string + description: group_policy_address is the account address of group policy. + 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/group#proposal-4 + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal was + submitted. + group_version: + type: string + format: uint64 + description: >- + group_version tracks the version of the group at proposal + submission. + + This field is here for informational purposes only. + group_policy_version: + type: string + format: uint64 + description: >- + group_policy_version tracks the version of the group policy at + proposal submission. + + When a decision policy is changed, existing proposals from + previous policy + + versions will become invalid with the `ABORTED` status. + + This field is here for informational purposes only. + status: + description: >- + status represents the high level position in the life cycle of + the proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all weighted votes for + this + + proposal for each vote option. It is empty at submission, and + only + + populated after tallying, at voting period end or at proposal + execution, + + whichever happens first. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting must be + done. + + Unless a successful MsgExec is called before (to execute a + proposal whose + + tally is successful before the voting period ends), tallying + will be done + + at this point, and the `final_tally_result`and `status` fields + will be + + accordingly updated. + executor_result: + description: >- + executor_result is the final result of the proposal execution. + Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 `sdk.Msg`s that will be executed if the + proposal passes. + title: + type: string + description: 'Since: cosmos-sdk 0.47' + title: title is the title of the proposal + summary: + type: string + description: 'Since: cosmos-sdk 0.47' + title: summary is a short summary of the proposal + description: >- + Proposal defines a group proposal. Any member of a group can submit + a proposal + + for a group policy to decide upon. + + A proposal consists of a set of `sdk.Msg`s that will be executed if + the proposal + + passes as well as some optional metadata associated with the + proposal. + description: proposals are the proposals with given group policy. + 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 + description: >- + QueryProposalsByGroupPolicyResponse is the Query/ProposalByGroupPolicy + response type. + cosmos.group.v1.QueryTallyResultResponse: + type: object + properties: + tally: + description: tally defines the requested tally. + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + description: QueryTallyResultResponse is the Query/TallyResult response type. + cosmos.group.v1.QueryVoteByProposalVoterResponse: + type: object + properties: + vote: + description: vote is the vote with given proposal_id and voter. + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: >- + QueryVoteByProposalVoterResponse is the Query/VoteByProposalVoter response + type. + cosmos.group.v1.QueryVotesByProposalResponse: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes for given proposal_id. + 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 + description: QueryVotesByProposalResponse is the Query/VotesByProposal response type. + cosmos.group.v1.QueryVotesByVoterResponse: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes by given voter. + 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 + description: QueryVotesByVoterResponse is the Query/VotesByVoter response type. + cosmos.group.v1.TallyResult: + type: object + properties: + yes_count: + type: string + description: yes_count is the weighted sum of yes votes. + abstain_count: + type: string + description: abstain_count is the weighted sum of abstainers. + no_count: + type: string + description: no_count is the weighted sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the weighted sum of veto. + description: TallyResult represents the sum of weighted votes for each vote option. + cosmos.group.v1.Vote: + type: object + properties: + proposal_id: + type: string + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + metadata: + type: string + description: metadata is any arbitrary metadata attached to the vote. + submit_time: + type: string + format: date-time + description: submit_time is the timestamp when the vote was submitted. + description: Vote represents a vote for a proposal. + cosmos.group.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 proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines an unspecified vote option which will + return an error. + - 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.mint.v1beta1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 + 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 + description: Params defines the parameters for the x/mint module. + cosmos.mint.v1beta1.QueryAnnualProvisionsResponse: + type: object + properties: + annual_provisions: + type: string + format: byte + description: annual_provisions is the current minting annual provisions value. + description: |- + QueryAnnualProvisionsResponse is the response type for the + Query/AnnualProvisions RPC method. + cosmos.mint.v1beta1.QueryInflationResponse: + type: object + properties: + inflation: + type: string + format: byte + description: inflation is the current minting inflation value. + description: |- + QueryInflationResponse is the response type for the Query/Inflation RPC + method. + 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 + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.nft.v1beta1.Class: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT classification, similar to + the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT classification. + Optional + symbol: + type: string + title: symbol is an abbreviated name for nft classification. Optional + description: + type: string + title: description is a brief description of nft classification. Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define schema for + Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri. Optional + data: + title: data is the app specific metadata of the NFT class. Optional + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: Class defines the class of the nft type. + cosmos.nft.v1beta1.MsgSendResponse: + type: object + description: MsgSendResponse defines the Msg/Send response type. + cosmos.nft.v1beta1.NFT: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the contract address of + ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + title: data is an app specific data of the NFT. Optional + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: NFT defines the NFT. + cosmos.nft.v1beta1.QueryBalanceResponse: + type: object + properties: + amount: + type: string + format: uint64 + title: amount is the number of all NFTs of a given class owned by the owner + title: QueryBalanceResponse is the response type for the Query/Balance RPC method + cosmos.nft.v1beta1.QueryClassResponse: + type: object + properties: + class: + description: class defines the class of the nft type. + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT classification, + similar to the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT classification. + Optional + symbol: + type: string + title: symbol is an abbreviated name for nft classification. Optional + description: + type: string + title: description is a brief description of nft classification. Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define schema + for Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri. Optional + data: + title: data is the app specific metadata of the NFT class. Optional + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: QueryClassResponse is the response type for the Query/Class RPC method + cosmos.nft.v1beta1.QueryClassesResponse: + type: object + properties: + classes: + type: array + items: + type: object + properties: + id: + type: string + title: >- + id defines the unique identifier of the NFT classification, + similar to the contract address of ERC721 + name: + type: string + title: >- + name defines the human-readable name of the NFT classification. + Optional + symbol: + type: string + title: symbol is an abbreviated name for nft classification. Optional + description: + type: string + title: >- + description is a brief description of nft classification. + Optional + uri: + type: string + title: >- + uri for the class metadata stored off chain. It can define + schema for Class and NFT `Data` attributes. Optional + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri. Optional + data: + title: data is the app specific metadata of the NFT class. Optional + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: Class defines the class of the nft type. + description: class defines the class of the nft type. + 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 + title: QueryClassesResponse is the response type for the Query/Classes RPC method + cosmos.nft.v1beta1.QueryNFTResponse: + type: object + properties: + nft: + title: owner is the owner address of the nft + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the contract address + of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + title: data is an app specific data of the NFT. Optional + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: NFT defines the NFT. + title: QueryNFTResponse is the response type for the Query/NFT RPC method + cosmos.nft.v1beta1.QueryNFTsResponse: + type: object + properties: + nfts: + type: array + items: + type: object + properties: + class_id: + type: string + title: >- + class_id associated with the NFT, similar to the contract + address of ERC721 + id: + type: string + title: id is a unique identifier of the NFT + uri: + type: string + title: uri for the NFT metadata stored off chain + uri_hash: + type: string + title: uri_hash is a hash of the document pointed by uri + data: + title: data is an app specific data of the NFT. Optional + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: NFT defines the NFT. + title: NFT defines the NFT + 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 + title: QueryNFTsResponse is the response type for the Query/NFTs RPC methods + cosmos.nft.v1beta1.QueryOwnerResponse: + type: object + properties: + owner: + type: string + title: owner is the owner address of the nft + title: QueryOwnerResponse is the response type for the Query/Owner RPC method + cosmos.nft.v1beta1.QuerySupplyResponse: + type: object + properties: + amount: + type: string + format: uint64 + title: amount is the number of all NFTs from the given class + title: QuerySupplyResponse is the response type for the Query/Supply RPC method + cosmos.params.v1beta1.ParamChange: + type: object + properties: + subspace: + type: string + key: + type: string + value: + type: string + description: |- + ParamChange defines an individual parameter change, for use in + ParameterChangeProposal. + cosmos.params.v1beta1.QueryParamsResponse: + type: object + properties: + param: + description: param defines the queried parameter. + type: object + properties: + subspace: + type: string + key: + type: string + value: + type: string + description: QueryParamsResponse is response type for the Query/Params RPC method. + cosmos.params.v1beta1.QuerySubspacesResponse: + type: object + properties: + subspaces: + type: array + items: + type: object + properties: + subspace: + type: string + keys: + type: array + items: + type: string + description: >- + Subspace defines a parameter subspace name and all the keys that + exist for + + the subspace. + + + Since: cosmos-sdk 0.46 + description: |- + QuerySubspacesResponse defines the response types for querying for all + registered subspaces and all keys for a subspace. + + Since: cosmos-sdk 0.46 + cosmos.params.v1beta1.Subspace: + type: object + properties: + subspace: + type: string + keys: + type: array + items: + type: string + description: |- + Subspace defines a parameter subspace name and all the keys that exist for + the subspace. + + Since: cosmos-sdk 0.46 + cosmos.slashing.v1beta1.MsgUnjailResponse: + type: object + title: MsgUnjailResponse defines the Msg/Unjail response type + cosmos.slashing.v1beta1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 + cosmos.slashing.v1beta1.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. + 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. + title: QueryParamsResponse is the response type for the Query/Params RPC method + 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 unjailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented each time the validator was a bonded + + in a block and may have signed a precommit or not. This in + conjunction with the + + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + 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 misbehiavor. + missed_blocks_counter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + description: >- + ValidatorSigningInfo defines a validator's signing info for monitoring + their + + liveness activity. + title: >- + QuerySigningInfoResponse is the response type for the Query/SigningInfo + RPC + + method + 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 unjailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented each time the validator was a bonded + + in a block and may have signed a precommit or not. This in + conjunction with the + + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + 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 misbehiavor. + missed_blocks_counter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + description: >- + ValidatorSigningInfo defines a validator's signing info for + monitoring their + + liveness activity. + title: info is the signing info of all validators + 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; + } + title: >- + QuerySigningInfosResponse is the response type for the Query/SigningInfos + RPC + + method + 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 unjailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented each time the validator was a bonded + + in a block and may have signed a precommit or not. This in conjunction + with the + + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + 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 + misbehiavor. + missed_blocks_counter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + description: >- + ValidatorSigningInfo defines a validator's signing info for monitoring + their + + liveness activity. + 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. + update_time: + type: string + format: date-time + description: update_time is the last time the commission rate was changed. + description: Commission defines commission parameters for a given validator. + 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. + cosmos.staking.v1beta1.Delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_address: + type: string + description: validator_address is the bech32-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. + cosmos.staking.v1beta1.DelegationResponse: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_address: + type: string + description: validator_address is the bech32-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. + 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. + 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. + 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. + + + 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. + + + Since: cosmos-sdk 0.46 + 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 identifing 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: >- + 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.MsgBeginRedelegateResponse: + type: object + properties: + completion_time: + type: string + format: date-time + description: MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. + cosmos.staking.v1beta1.MsgCancelUnbondingDelegationResponse: + type: object + description: 'Since: cosmos-sdk 0.46' + title: MsgCancelUnbondingDelegationResponse + cosmos.staking.v1beta1.MsgCreateValidatorResponse: + type: object + description: MsgCreateValidatorResponse defines the Msg/CreateValidator response type. + cosmos.staking.v1beta1.MsgDelegateResponse: + type: object + description: MsgDelegateResponse defines the Msg/Delegate response type. + cosmos.staking.v1beta1.MsgEditValidatorResponse: + type: object + description: MsgEditValidatorResponse defines the Msg/EditValidator response type. + cosmos.staking.v1beta1.MsgUndelegateResponse: + type: object + properties: + completion_time: + type: string + format: date-time + description: MsgUndelegateResponse defines the Msg/Undelegate response type. + cosmos.staking.v1beta1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: cosmos-sdk 0.47 + cosmos.staking.v1beta1.Params: + 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 + description: Params defines the parameters for the x/staking module. + 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. + 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 bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-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: >- + QueryDelegationResponse is response type for the Query/Delegation RPC + method. + 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 bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-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. + 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 + description: |- + QueryDelegatorDelegationsResponse is response type for the + Query/DelegatorDelegations RPC method. + cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-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. + 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 + description: |- + QueryUnbondingDelegatorDelegationsResponse is response type for the + Query/UnbondingDelegatorDelegations RPC method. + 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. + + + 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. + + + Since: cosmos-sdk 0.46 + 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 identifing an unbonding of + this validator + 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. + + + 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. + + + Since: cosmos-sdk 0.46 + 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 identifing 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. + 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 + 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. + + + 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. + + + Since: cosmos-sdk 0.46 + 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 identifing 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: >- + 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 + description: QueryParamsResponse is response type for the Query/Params RPC method. + 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 + description: QueryPoolResponse is response type for the Query/Pool RPC method. + 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. + 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 + description: >- + QueryRedelegationsResponse is response type for the Query/Redelegations + RPC + + method. + 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 bech32-encoded address of the delegator. + validator_address: + type: string + description: validator_address is the bech32-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: |- + QueryDelegationResponse is response type for the Query/UnbondingDelegation + RPC method. + 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 bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-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. + 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 + title: |- + QueryValidatorDelegationsResponse is response type for the + Query/ValidatorDelegations RPC method + 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. + + + 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. + + + Since: cosmos-sdk 0.46 + 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 identifing an unbonding of + this validator + 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 bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-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. + 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 + description: |- + QueryValidatorUnbondingDelegationsResponse is response type for the + Query/ValidatorUnbondingDelegations RPC method. + 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. + + + 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. + + + Since: cosmos-sdk 0.46 + 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 identifing 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. + 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 + 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 + description: >- + Redelegation contains the list of a particular delegator's redelegating + bonds + + from a particular source validator to a particular destination validator. + 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. + 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. + 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. + 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. + 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. + 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. + cosmos.staking.v1beta1.UnbondingDelegation: + type: object + properties: + delegator_address: + type: string + description: delegator_address is the bech32-encoded address of the delegator. + validator_address: + type: string + description: validator_address is the bech32-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. + 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. + 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. + 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. + + + 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. + + + Since: cosmos-sdk 0.46 + 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 identifing 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. + description: >- + ABCIMessageLog defines a structure containing an indexed tx ABCI message + log. + 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. + 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. + 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. + 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 + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. + + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + + Since: cosmos-sdk 0.46 + 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. + description: |- + StringEvent defines en Event object wrapper where all the attributes + contain key/value pairs that are strings instead of raw bytes. + 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. + 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. + + + 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 + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. + + 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. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + 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 + 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. + 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. It is currently not supported. + - 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`. It also allows + for adding Tips in transactions. + + 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: '#/definitions/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. + 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. + title: amount is the amount of coins to be paid as a fee + 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 + 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. + + + Since: cosmos-sdk 0.46 + 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 + tipper: + type: string + title: tipper is the address of the account paying for the tip + description: |- + AuthInfo describes the fee and signer modes that are used to sign a + transaction. + 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. + 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. + 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. + + + 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 + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. + + 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. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + 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 + 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 miminum to be accepted into the mempool. + cosmos.tx.v1beta1.GetBlockWithTxsResponse: + type: object + properties: + txs: + type: array + items: + type: object + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: txs are the transactions in the block. + 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 + 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. + 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 represents a prevote, precommit, or commit 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 represents a prevote, precommit, or commit 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 + title: >- + BlockIdFlag indicates which BlcokID 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 + title: BlockIdFlag indicates which BlcokID 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. + 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 + description: >- + GetBlockWithTxsResponse is the response type for the + Service.GetBlockWithTxs method. + + + Since: cosmos-sdk 0.45.2 + cosmos.tx.v1beta1.GetTxResponse: + type: object + properties: + tx: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: tx is the queried transaction. + 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. + + + 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 + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. + + 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. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + description: GetTxResponse is the response type for the Service.GetTx method. + cosmos.tx.v1beta1.GetTxsEventResponse: + type: object + properties: + txs: + type: array + items: + type: object + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: txs is the list of queried transactions. + 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. + 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. + + + 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 + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. + + 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. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + 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. + 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. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + 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. + 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. It is currently not supported. + - 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`. It also + allows + + for adding Tips in transactions. + + + 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 + multi: + $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo.Multi' + title: multi represents a nested multisig signer + description: ModeInfo describes the signing mode of a single or nested multisig signer. + 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 + 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. + mode_infos: + type: array + items: + type: object + $ref: '#/definitions/cosmos.tx.v1beta1.ModeInfo' + title: |- + mode_infos is the corresponding modes of the signers of the multisig + which could include nested multisig public keys + title: Multi is the mode info for a multisig public key + 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. It is currently not supported. + - 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`. It also + allows + + for adding Tips in transactions. + + + 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 + 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 + 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. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + mode_info: + $ref: '#/definitions/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 + 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: '#/definitions/cosmos.tx.v1beta1.Tx' + description: |- + tx is the transaction to simulate. + Deprecated. Send raw tx bytes instead. + tx_bytes: + type: string + format: byte + description: |- + tx_bytes is the raw transaction. + + Since: cosmos-sdk 0.43 + 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. + 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 + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. + + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + + + Since: cosmos-sdk 0.46 + 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 + tipper: + type: string + title: tipper is the address of the account paying for the tip + description: |- + Tip is the tip used for meta-transactions. + + Since: cosmos-sdk 0.46 + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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 + title: |- + timeout is the block height after which this transaction will not + be processed by the chain + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + description: TxBody is the body of a transaction that all signers sign over. + auth_info: + $ref: '#/definitions/cosmos.tx.v1beta1.AuthInfo' + title: |- + auth_info is the authorization related content of the transaction, + specifically signers, signer modes and fee + 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. + description: Tx is the standard type used for broadcasting transactions. + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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. + 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 + title: |- + timeout is the block height after which this transaction will not + be processed by the chain + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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. + + + 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); + } + + 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": , + "lastName": + } + + 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 + 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 + description: |- + TxDecodeAminoRequest is the request type for the Service.TxDecodeAmino + RPC method. + + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxDecodeAminoResponse: + type: object + properties: + amino_json: + type: string + description: |- + TxDecodeAminoResponse is the response type for the Service.TxDecodeAmino + RPC method. + + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxDecodeRequest: + 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. + + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxDecodeResponse: + type: object + properties: + tx: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: tx is the decoded transaction. + description: |- + TxDecodeResponse is the response type for the + Service.TxDecode method. + + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxEncodeAminoRequest: + type: object + properties: + amino_json: + type: string + description: |- + TxEncodeAminoRequest is the request type for the Service.TxEncodeAmino + RPC method. + + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxEncodeAminoResponse: + type: object + properties: + amino_binary: + type: string + format: byte + description: |- + TxEncodeAminoResponse is the response type for the Service.TxEncodeAmino + RPC method. + + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxEncodeRequest: + type: object + properties: + tx: + $ref: '#/definitions/cosmos.tx.v1beta1.Tx' + description: tx is the transaction to encode. + description: |- + TxEncodeRequest is the request type for the Service.TxEncode + RPC method. + + Since: cosmos-sdk 0.47 + cosmos.tx.v1beta1.TxEncodeResponse: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the encoded transaction bytes. + description: |- + TxEncodeResponse is the response type for the + Service.TxEncode method. + + Since: cosmos-sdk 0.47 + 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. + description: >- + Event allows application developers to attach additional information to + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. + + Later, transactions may be queried using these events. + 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. + 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. + + Since: cosmos-sdk 0.43 + cosmos.upgrade.v1beta1.MsgCancelUpgradeResponse: + type: object + description: |- + MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type. + + Since: cosmos-sdk 0.46 + cosmos.upgrade.v1beta1.MsgSoftwareUpgradeResponse: + type: object + description: |- + MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type. + + Since: cosmos-sdk 0.46 + 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. + 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. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + 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. + cosmos.upgrade.v1beta1.QueryAuthorityResponse: + type: object + properties: + address: + type: string + description: 'Since: cosmos-sdk 0.46' + title: QueryAuthorityResponse is the response type for Query/Authority + 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. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + 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. + + Since: cosmos-sdk 0.43 + description: >- + module_versions is a list of module names with their consensus + versions. + description: >- + QueryModuleVersionsResponse is the response type for the + Query/ModuleVersions + + RPC method. + + + Since: cosmos-sdk 0.43 + cosmos.upgrade.v1beta1.QueryUpgradedConsensusStateResponse: + type: object + properties: + upgraded_consensus_state: + type: string + format: byte + title: 'Since: cosmos-sdk 0.43' + description: >- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState + + RPC method. + cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccountResponse: + type: object + description: >- + MsgCreateVestingAccountResponse defines the + Msg/CreatePeriodicVestingAccount + + response type. + + + Since: cosmos-sdk 0.46 + cosmos.vesting.v1beta1.MsgCreatePermanentLockedAccountResponse: + type: object + description: >- + MsgCreatePermanentLockedAccountResponse defines the + Msg/CreatePermanentLockedAccount response type. + + + Since: cosmos-sdk 0.46 + cosmos.vesting.v1beta1.MsgCreateVestingAccountResponse: + type: object + description: >- + MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount + response type. + cosmos.vesting.v1beta1.Period: + type: object + properties: + length: + type: string + format: int64 + description: Period duration in seconds. + 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: Period defines a length of time and amount of coins that will vest. + cosmwasm.wasm.v1.AbsoluteTxPosition: + type: object + properties: + block_height: + type: string + format: uint64 + title: BlockHeight is the block the contract was created at + tx_index: + type: string + format: uint64 + title: >- + TxIndex is a monotonic counter within the block (actual transaction + index, + + or gas consumed) + description: |- + AbsoluteTxPosition is a unique transaction position that allows for global + ordering of transactions. + cosmwasm.wasm.v1.AccessConfig: + type: object + properties: + permission: + type: string + enum: + - ACCESS_TYPE_UNSPECIFIED + - ACCESS_TYPE_NOBODY + - ACCESS_TYPE_EVERYBODY + - ACCESS_TYPE_ANY_OF_ADDRESSES + default: ACCESS_TYPE_UNSPECIFIED + description: >- + - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder for empty + value + - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden + - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted + - ACCESS_TYPE_ANY_OF_ADDRESSES: AccessTypeAnyOfAddresses allow any of the addresses + title: AccessType permission types + addresses: + type: array + items: + type: string + description: AccessConfig access control type. + cosmwasm.wasm.v1.AccessType: + type: string + enum: + - ACCESS_TYPE_UNSPECIFIED + - ACCESS_TYPE_NOBODY + - ACCESS_TYPE_EVERYBODY + - ACCESS_TYPE_ANY_OF_ADDRESSES + default: ACCESS_TYPE_UNSPECIFIED + description: >- + - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder for empty + value + - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden + - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted + - ACCESS_TYPE_ANY_OF_ADDRESSES: AccessTypeAnyOfAddresses allow any of the addresses + title: AccessType permission types + cosmwasm.wasm.v1.CodeInfoResponse: + type: object + properties: + code_id: + type: string + format: uint64 + title: id for legacy support + creator: + type: string + data_hash: + type: string + format: byte + instantiate_permission: + type: object + properties: + permission: + type: string + enum: + - ACCESS_TYPE_UNSPECIFIED + - ACCESS_TYPE_NOBODY + - ACCESS_TYPE_EVERYBODY + - ACCESS_TYPE_ANY_OF_ADDRESSES + default: ACCESS_TYPE_UNSPECIFIED + description: >- + - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder for + empty value + - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden + - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted + - ACCESS_TYPE_ANY_OF_ADDRESSES: AccessTypeAnyOfAddresses allow any of the addresses + title: AccessType permission types + addresses: + type: array + items: + type: string + description: AccessConfig access control type. + title: CodeInfoResponse contains code meta data from CodeInfo + cosmwasm.wasm.v1.ContractCodeHistoryEntry: + type: object + properties: + operation: + type: string + enum: + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS + default: CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED + description: >- + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: + ContractCodeHistoryOperationTypeUnspecified placeholder for empty + value + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: ContractCodeHistoryOperationTypeInit on chain contract instantiation + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: ContractCodeHistoryOperationTypeMigrate code migration + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: ContractCodeHistoryOperationTypeGenesis based on genesis data + title: ContractCodeHistoryOperationType actions that caused a code change + code_id: + type: string + format: uint64 + title: CodeID is the reference to the stored WASM code + updated: + description: Updated Tx position when the operation was executed. + type: object + properties: + block_height: + type: string + format: uint64 + title: BlockHeight is the block the contract was created at + tx_index: + type: string + format: uint64 + title: >- + TxIndex is a monotonic counter within the block (actual + transaction index, + + or gas consumed) + msg: + type: string + format: byte + description: ContractCodeHistoryEntry metadata to a contract. + cosmwasm.wasm.v1.ContractCodeHistoryOperationType: + type: string + enum: + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS + default: CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED + description: >- + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: + ContractCodeHistoryOperationTypeUnspecified placeholder for empty value + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: ContractCodeHistoryOperationTypeInit on chain contract instantiation + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: ContractCodeHistoryOperationTypeMigrate code migration + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: ContractCodeHistoryOperationTypeGenesis based on genesis data + title: ContractCodeHistoryOperationType actions that caused a code change + cosmwasm.wasm.v1.ContractInfo: + type: object + properties: + code_id: + type: string + format: uint64 + title: CodeID is the reference to the stored Wasm code + creator: + type: string + title: Creator address who initially instantiated the contract + admin: + type: string + title: Admin is an optional address that can execute migrations + label: + type: string + description: Label is optional metadata to be stored with a contract instance. + created: + description: Created Tx position when the contract was instantiated. + type: object + properties: + block_height: + type: string + format: uint64 + title: BlockHeight is the block the contract was created at + tx_index: + type: string + format: uint64 + title: >- + TxIndex is a monotonic counter within the block (actual + transaction index, + + or gas consumed) + ibc_port_id: + type: string + extension: + description: |- + Extension is an extension point to store custom metadata within the + persistence model. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + additionalProperties: {} + title: ContractInfo stores a WASM contract instance + cosmwasm.wasm.v1.Model: + type: object + properties: + key: + type: string + format: byte + title: hex-encode key to read it better (this is often ascii) + value: + type: string + format: byte + title: base64-encode raw value + title: Model is a struct that holds a KV pair + cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse: + type: object + description: |- + MsgAddCodeUploadParamsAddressesResponse defines the response + structure for executing a MsgAddCodeUploadParamsAddresses message. + cosmwasm.wasm.v1.MsgClearAdminResponse: + type: object + title: MsgClearAdminResponse returns empty data + cosmwasm.wasm.v1.MsgExecuteContractResponse: + type: object + properties: + data: + type: string + format: byte + title: Data contains bytes to returned from the contract + description: MsgExecuteContractResponse returns execution result data. + cosmwasm.wasm.v1.MsgInstantiateContract2Response: + type: object + properties: + address: + type: string + description: Address is the bech32 address of the new contract instance. + data: + type: string + format: byte + title: Data contains bytes to returned from the contract + title: MsgInstantiateContract2Response return instantiation result data + cosmwasm.wasm.v1.MsgInstantiateContractResponse: + type: object + properties: + address: + type: string + description: Address is the bech32 address of the new contract instance. + data: + type: string + format: byte + title: Data contains bytes to returned from the contract + title: MsgInstantiateContractResponse return instantiation result data + cosmwasm.wasm.v1.MsgMigrateContractResponse: + type: object + properties: + data: + type: string + format: byte + title: |- + Data contains same raw bytes returned as data from the wasm contract. + (May be empty) + description: MsgMigrateContractResponse returns contract migration result data. + cosmwasm.wasm.v1.MsgPinCodesResponse: + type: object + description: |- + MsgPinCodesResponse defines the response structure for executing a + MsgPinCodes message. + + Since: 0.40 + cosmwasm.wasm.v1.MsgRemoveCodeUploadParamsAddressesResponse: + type: object + description: |- + MsgRemoveCodeUploadParamsAddressesResponse defines the response + structure for executing a MsgRemoveCodeUploadParamsAddresses message. + cosmwasm.wasm.v1.MsgStoreAndInstantiateContractResponse: + type: object + properties: + address: + type: string + description: Address is the bech32 address of the new contract instance. + data: + type: string + format: byte + title: Data contains bytes to returned from the contract + description: |- + MsgStoreAndInstantiateContractResponse defines the response structure + for executing a MsgStoreAndInstantiateContract message. + + Since: 0.40 + cosmwasm.wasm.v1.MsgStoreCodeResponse: + type: object + properties: + code_id: + type: string + format: uint64 + title: CodeID is the reference to the stored WASM code + checksum: + type: string + format: byte + title: Checksum is the sha256 hash of the stored code + description: MsgStoreCodeResponse returns store result data. + cosmwasm.wasm.v1.MsgSudoContractResponse: + type: object + properties: + data: + type: string + format: byte + title: Data contains bytes to returned from the contract + description: |- + MsgSudoContractResponse defines the response structure for executing a + MsgSudoContract message. + + Since: 0.40 + cosmwasm.wasm.v1.MsgUnpinCodesResponse: + type: object + description: |- + MsgUnpinCodesResponse defines the response structure for executing a + MsgUnpinCodes message. + + Since: 0.40 + cosmwasm.wasm.v1.MsgUpdateAdminResponse: + type: object + title: MsgUpdateAdminResponse returns empty data + cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse: + type: object + title: MsgUpdateInstantiateConfigResponse returns empty data + cosmwasm.wasm.v1.MsgUpdateParamsResponse: + type: object + description: |- + MsgUpdateParamsResponse defines the response structure for executing a + MsgUpdateParams message. + + Since: 0.40 + cosmwasm.wasm.v1.Params: + type: object + properties: + code_upload_access: + type: object + properties: + permission: + type: string + enum: + - ACCESS_TYPE_UNSPECIFIED + - ACCESS_TYPE_NOBODY + - ACCESS_TYPE_EVERYBODY + - ACCESS_TYPE_ANY_OF_ADDRESSES + default: ACCESS_TYPE_UNSPECIFIED + description: >- + - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder for + empty value + - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden + - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted + - ACCESS_TYPE_ANY_OF_ADDRESSES: AccessTypeAnyOfAddresses allow any of the addresses + title: AccessType permission types + addresses: + type: array + items: + type: string + description: AccessConfig access control type. + instantiate_default_permission: + type: string + enum: + - ACCESS_TYPE_UNSPECIFIED + - ACCESS_TYPE_NOBODY + - ACCESS_TYPE_EVERYBODY + - ACCESS_TYPE_ANY_OF_ADDRESSES + default: ACCESS_TYPE_UNSPECIFIED + description: >- + - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder for empty + value + - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden + - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted + - ACCESS_TYPE_ANY_OF_ADDRESSES: AccessTypeAnyOfAddresses allow any of the addresses + title: AccessType permission types + description: Params defines the set of wasm parameters. + cosmwasm.wasm.v1.QueryAllContractStateResponse: + type: object + properties: + models: + type: array + items: + type: object + properties: + key: + type: string + format: byte + title: hex-encode key to read it better (this is often ascii) + value: + type: string + format: byte + title: base64-encode raw value + title: Model is a struct that holds a KV pair + 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 + title: |- + QueryAllContractStateResponse is the response type for the + Query/AllContractState RPC method + cosmwasm.wasm.v1.QueryCodeResponse: + type: object + properties: + code_info: + type: object + properties: + code_id: + type: string + format: uint64 + title: id for legacy support + creator: + type: string + data_hash: + type: string + format: byte + instantiate_permission: + type: object + properties: + permission: + type: string + enum: + - ACCESS_TYPE_UNSPECIFIED + - ACCESS_TYPE_NOBODY + - ACCESS_TYPE_EVERYBODY + - ACCESS_TYPE_ANY_OF_ADDRESSES + default: ACCESS_TYPE_UNSPECIFIED + description: >- + - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder + for empty value + - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden + - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted + - ACCESS_TYPE_ANY_OF_ADDRESSES: AccessTypeAnyOfAddresses allow any of the addresses + title: AccessType permission types + addresses: + type: array + items: + type: string + description: AccessConfig access control type. + title: CodeInfoResponse contains code meta data from CodeInfo + data: + type: string + format: byte + title: QueryCodeResponse is the response type for the Query/Code RPC method + cosmwasm.wasm.v1.QueryCodesResponse: + type: object + properties: + code_infos: + type: array + items: + type: object + properties: + code_id: + type: string + format: uint64 + title: id for legacy support + creator: + type: string + data_hash: + type: string + format: byte + instantiate_permission: + type: object + properties: + permission: + type: string + enum: + - ACCESS_TYPE_UNSPECIFIED + - ACCESS_TYPE_NOBODY + - ACCESS_TYPE_EVERYBODY + - ACCESS_TYPE_ANY_OF_ADDRESSES + default: ACCESS_TYPE_UNSPECIFIED + description: >- + - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder + for empty value + - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden + - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted + - ACCESS_TYPE_ANY_OF_ADDRESSES: AccessTypeAnyOfAddresses allow any of the addresses + title: AccessType permission types + addresses: + type: array + items: + type: string + description: AccessConfig access control type. + title: CodeInfoResponse contains code meta data from CodeInfo + 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 + title: QueryCodesResponse is the response type for the Query/Codes RPC method + cosmwasm.wasm.v1.QueryContractHistoryResponse: + type: object + properties: + entries: + type: array + items: + type: object + properties: + operation: + type: string + enum: + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS + default: CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED + description: >- + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED: + ContractCodeHistoryOperationTypeUnspecified placeholder for + empty value + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT: ContractCodeHistoryOperationTypeInit on chain contract instantiation + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE: ContractCodeHistoryOperationTypeMigrate code migration + - CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS: ContractCodeHistoryOperationTypeGenesis based on genesis data + title: >- + ContractCodeHistoryOperationType actions that caused a code + change + code_id: + type: string + format: uint64 + title: CodeID is the reference to the stored WASM code + updated: + description: Updated Tx position when the operation was executed. + type: object + properties: + block_height: + type: string + format: uint64 + title: BlockHeight is the block the contract was created at + tx_index: + type: string + format: uint64 + title: >- + TxIndex is a monotonic counter within the block (actual + transaction index, + + or gas consumed) + msg: + type: string + format: byte + description: ContractCodeHistoryEntry metadata to a contract. + 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 + title: |- + QueryContractHistoryResponse is the response type for the + Query/ContractHistory RPC method + cosmwasm.wasm.v1.QueryContractInfoResponse: + type: object + properties: + address: + type: string + title: address is the address of the contract + contract_info: + type: object + properties: + code_id: + type: string + format: uint64 + title: CodeID is the reference to the stored Wasm code + creator: + type: string + title: Creator address who initially instantiated the contract + admin: + type: string + title: Admin is an optional address that can execute migrations + label: + type: string + description: Label is optional metadata to be stored with a contract instance. + created: + description: Created Tx position when the contract was instantiated. + type: object + properties: + block_height: + type: string + format: uint64 + title: BlockHeight is the block the contract was created at + tx_index: + type: string + format: uint64 + title: >- + TxIndex is a monotonic counter within the block (actual + transaction index, + + or gas consumed) + ibc_port_id: + type: string + extension: + description: >- + Extension is an extension point to store custom metadata within + the + + persistence model. + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + additionalProperties: {} + title: ContractInfo stores a WASM contract instance + title: >- + QueryContractInfoResponse is the response type for the Query/ContractInfo + RPC + + method + cosmwasm.wasm.v1.QueryContractsByCodeResponse: + type: object + properties: + contracts: + type: array + items: + type: string + title: contracts are a set of contract addresses + 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 + title: |- + QueryContractsByCodeResponse is the response type for the + Query/ContractsByCode RPC method + cosmwasm.wasm.v1.QueryContractsByCreatorResponse: + type: object + properties: + contract_addresses: + type: array + items: + type: string + title: ContractAddresses result set + 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 + description: |- + QueryContractsByCreatorResponse is the response type for the + Query/ContractsByCreator RPC method. + cosmwasm.wasm.v1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + code_upload_access: + type: object + properties: + permission: + type: string + enum: + - ACCESS_TYPE_UNSPECIFIED + - ACCESS_TYPE_NOBODY + - ACCESS_TYPE_EVERYBODY + - ACCESS_TYPE_ANY_OF_ADDRESSES + default: ACCESS_TYPE_UNSPECIFIED + description: >- + - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder + for empty value + - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden + - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted + - ACCESS_TYPE_ANY_OF_ADDRESSES: AccessTypeAnyOfAddresses allow any of the addresses + title: AccessType permission types + addresses: + type: array + items: + type: string + description: AccessConfig access control type. + instantiate_default_permission: + type: string + enum: + - ACCESS_TYPE_UNSPECIFIED + - ACCESS_TYPE_NOBODY + - ACCESS_TYPE_EVERYBODY + - ACCESS_TYPE_ANY_OF_ADDRESSES + default: ACCESS_TYPE_UNSPECIFIED + description: >- + - ACCESS_TYPE_UNSPECIFIED: AccessTypeUnspecified placeholder for + empty value + - ACCESS_TYPE_NOBODY: AccessTypeNobody forbidden + - ACCESS_TYPE_EVERYBODY: AccessTypeEverybody unrestricted + - ACCESS_TYPE_ANY_OF_ADDRESSES: AccessTypeAnyOfAddresses allow any of the addresses + title: AccessType permission types + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmwasm.wasm.v1.QueryPinnedCodesResponse: + type: object + properties: + code_ids: + type: array + items: + type: string + format: uint64 + 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 + title: |- + QueryPinnedCodesResponse is the response type for the + Query/PinnedCodes RPC method + cosmwasm.wasm.v1.QueryRawContractStateResponse: + type: object + properties: + data: + type: string + format: byte + title: Data contains the raw store data + title: |- + QueryRawContractStateResponse is the response type for the + Query/RawContractState RPC method + cosmwasm.wasm.v1.QuerySmartContractStateResponse: + type: object + properties: + data: + type: string + format: byte + title: Data contains the json data returned from the smart contract + title: |- + QuerySmartContractStateResponse is the response type for the + Query/SmartContractState RPC method + ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse: + type: object + properties: + channel_id: + type: string + port_id: + type: string + title: >- + MsgRegisterInterchainAccountResponse defines the response for + Msg/RegisterAccount + ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse: + type: object + properties: + sequence: + type: string + format: uint64 + title: MsgSendTxResponse defines the response for MsgSendTx + ibc.applications.interchain_accounts.controller.v1.Params: + type: object + properties: + controller_enabled: + type: boolean + description: controller_enabled enables or disables the controller submodule. + description: |- + Params defines the set of on-chain interchain accounts parameters. + The following parameters may be used to disable the controller submodule. + ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse: + type: object + properties: + address: + type: string + description: >- + QueryInterchainAccountResponse the response type for the + Query/InterchainAccount RPC method. + ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + controller_enabled: + type: boolean + description: controller_enabled enables or disables the controller submodule. + description: QueryParamsResponse is the response type for the Query/Params RPC method. + ibc.applications.interchain_accounts.v1.InterchainAccountPacketData: + type: object + properties: + type: + type: string + enum: + - TYPE_UNSPECIFIED + - TYPE_EXECUTE_TX + default: TYPE_UNSPECIFIED + description: |- + - TYPE_UNSPECIFIED: Default zero value enumeration + - TYPE_EXECUTE_TX: Execute a transaction on an interchain accounts host chain + title: >- + Type defines a classification of message issued from a controller + chain to its associated interchain accounts + + host + data: + type: string + format: byte + memo: + type: string + description: >- + InterchainAccountPacketData is comprised of a raw transaction, type of + transaction and optional memo field. + ibc.applications.interchain_accounts.v1.Type: + type: string + enum: + - TYPE_UNSPECIFIED + - TYPE_EXECUTE_TX + default: TYPE_UNSPECIFIED + description: |- + - TYPE_UNSPECIFIED: Default zero value enumeration + - TYPE_EXECUTE_TX: Execute a transaction on an interchain accounts host chain + title: >- + Type defines a classification of message issued from a controller chain to + its associated interchain accounts + + host + ibc.applications.interchain_accounts.host.v1.Params: + type: object + properties: + host_enabled: + type: boolean + description: host_enabled enables or disables the host submodule. + allow_messages: + type: array + items: + type: string + description: >- + allow_messages defines a list of sdk message typeURLs allowed to be + executed on a host chain. + description: |- + Params defines the set of on-chain interchain accounts parameters. + The following parameters may be used to disable the host submodule. + ibc.applications.interchain_accounts.host.v1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + host_enabled: + type: boolean + description: host_enabled enables or disables the host submodule. + allow_messages: + type: array + items: + type: string + description: >- + allow_messages defines a list of sdk message typeURLs allowed to + be executed on a host chain. + description: QueryParamsResponse is the response type for the Query/Params RPC method. + ibc.applications.transfer.v1.DenomTrace: + type: object + properties: + path: + type: string + description: >- + path defines the chain of port/channel identifiers used for tracing + the + + source of the fungible token. + base_denom: + type: string + description: base denomination of the relayed fungible token. + description: >- + DenomTrace contains the base denomination for ICS20 fungible tokens and + the + + source tracing information path. + ibc.applications.transfer.v1.MsgTransferResponse: + type: object + properties: + sequence: + type: string + format: uint64 + title: sequence number of the transfer packet sent + description: MsgTransferResponse defines the Msg/Transfer response type. + ibc.applications.transfer.v1.Params: + type: object + properties: + send_enabled: + type: boolean + description: >- + send_enabled enables or disables all cross-chain token transfers from + this + + chain. + receive_enabled: + type: boolean + description: >- + receive_enabled enables or disables all cross-chain token transfers to + this + + chain. + description: >- + Params defines the set of IBC transfer parameters. + + NOTE: To prevent a single token from being transferred, set the + + TransfersEnabled parameter to true and then set the bank module's + SendEnabled + + parameter for the denomination to false. + ibc.applications.transfer.v1.QueryDenomHashResponse: + type: object + properties: + hash: + type: string + description: hash (in hex format) of the denomination trace information. + description: |- + QueryDenomHashResponse is the response type for the Query/DenomHash RPC + method. + ibc.applications.transfer.v1.QueryDenomTraceResponse: + type: object + properties: + denom_trace: + description: denom_trace returns the requested denomination trace information. + type: object + properties: + path: + type: string + description: >- + path defines the chain of port/channel identifiers used for + tracing the + + source of the fungible token. + base_denom: + type: string + description: base denomination of the relayed fungible token. + description: |- + QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC + method. + ibc.applications.transfer.v1.QueryDenomTracesResponse: + type: object + properties: + denom_traces: + type: array + items: + type: object + properties: + path: + type: string + description: >- + path defines the chain of port/channel identifiers used for + tracing the + + source of the fungible token. + base_denom: + type: string + description: base denomination of the relayed fungible token. + description: >- + DenomTrace contains the base denomination for ICS20 fungible tokens + and the + + source tracing information path. + description: denom_traces returns all denominations trace information. + 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 + description: >- + QueryConnectionsResponse is the response type for the Query/DenomTraces + RPC + + method. + ibc.applications.transfer.v1.QueryEscrowAddressResponse: + type: object + properties: + escrow_address: + type: string + title: the escrow account address + description: >- + QueryEscrowAddressResponse is the response type of the EscrowAddress RPC + method. + ibc.applications.transfer.v1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + send_enabled: + type: boolean + description: >- + send_enabled enables or disables all cross-chain token transfers + from this + + chain. + receive_enabled: + type: boolean + description: >- + receive_enabled enables or disables all cross-chain token + transfers to this + + chain. + description: QueryParamsResponse is the response type for the Query/Params RPC method. + ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse: + type: object + properties: + amount: + 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: >- + QueryTotalEscrowForDenomResponse is the response type for + TotalEscrowForDenom RPC method. + ibc.core.client.v1.Height: + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: |- + Normally the RevisionHeight is incremented at each height while keeping + RevisionNumber the same. However some consensus algorithms may choose to + reset the height in certain conditions e.g. hard forks, state-machine + breaking changes In these cases, the RevisionNumber is incremented so that + height continues to be monitonically increasing even as the RevisionHeight + gets reset + title: >- + Height is a monotonically increasing data type + + that can be compared against another Height for the purposes of updating + and + + freezing clients + ibc.core.channel.v1.Channel: + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a channel is in one of the following states: + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other end of the + channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: |- + list of connection identifiers, in order, along which packets sent on + this channel will travel + version: + type: string + title: opaque channel version, which is agreed upon during the handshake + description: |- + Channel defines pipeline for exactly-once packet delivery between specific + modules on separate blockchains, which has at least one end capable of + sending packets and one end capable of receiving packets. + ibc.core.channel.v1.Counterparty: + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other end of the + channel. + channel_id: + type: string + title: channel end on the counterparty chain + title: Counterparty defines a channel end counterparty + ibc.core.channel.v1.IdentifiedChannel: + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a channel is in one of the following states: + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other end of the + channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: |- + list of connection identifiers, in order, along which packets sent on + this channel will travel + version: + type: string + title: opaque channel version, which is agreed upon during the handshake + port_id: + type: string + title: port identifier + channel_id: + type: string + title: channel identifier + description: |- + IdentifiedChannel defines a channel with additional port and channel + identifier fields. + ibc.core.channel.v1.MsgAcknowledgementResponse: + type: object + properties: + result: + type: string + enum: + - RESPONSE_RESULT_TYPE_UNSPECIFIED + - RESPONSE_RESULT_TYPE_NOOP + - RESPONSE_RESULT_TYPE_SUCCESS + default: RESPONSE_RESULT_TYPE_UNSPECIFIED + description: |- + - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration + - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) + - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully + title: >- + ResponseResultType defines the possible outcomes of the execution of a + message + description: MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. + ibc.core.channel.v1.MsgChannelCloseConfirmResponse: + type: object + description: >- + MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm + response + + type. + ibc.core.channel.v1.MsgChannelCloseInitResponse: + type: object + description: >- + MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response + type. + ibc.core.channel.v1.MsgChannelOpenAckResponse: + type: object + description: MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. + ibc.core.channel.v1.MsgChannelOpenConfirmResponse: + type: object + description: |- + MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response + type. + ibc.core.channel.v1.MsgChannelOpenInitResponse: + type: object + properties: + channel_id: + type: string + version: + type: string + description: MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. + ibc.core.channel.v1.MsgChannelOpenTryResponse: + type: object + properties: + version: + type: string + channel_id: + type: string + description: MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. + ibc.core.channel.v1.MsgRecvPacketResponse: + type: object + properties: + result: + type: string + enum: + - RESPONSE_RESULT_TYPE_UNSPECIFIED + - RESPONSE_RESULT_TYPE_NOOP + - RESPONSE_RESULT_TYPE_SUCCESS + default: RESPONSE_RESULT_TYPE_UNSPECIFIED + description: |- + - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration + - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) + - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully + title: >- + ResponseResultType defines the possible outcomes of the execution of a + message + description: MsgRecvPacketResponse defines the Msg/RecvPacket response type. + ibc.core.channel.v1.MsgTimeoutOnCloseResponse: + type: object + properties: + result: + type: string + enum: + - RESPONSE_RESULT_TYPE_UNSPECIFIED + - RESPONSE_RESULT_TYPE_NOOP + - RESPONSE_RESULT_TYPE_SUCCESS + default: RESPONSE_RESULT_TYPE_UNSPECIFIED + description: |- + - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration + - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) + - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully + title: >- + ResponseResultType defines the possible outcomes of the execution of a + message + description: MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. + ibc.core.channel.v1.MsgTimeoutResponse: + type: object + properties: + result: + type: string + enum: + - RESPONSE_RESULT_TYPE_UNSPECIFIED + - RESPONSE_RESULT_TYPE_NOOP + - RESPONSE_RESULT_TYPE_SUCCESS + default: RESPONSE_RESULT_TYPE_UNSPECIFIED + description: |- + - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration + - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) + - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully + title: >- + ResponseResultType defines the possible outcomes of the execution of a + message + description: MsgTimeoutResponse defines the Msg/Timeout response type. + ibc.core.channel.v1.Order: + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + title: Order defines if a channel is ORDERED or UNORDERED + ibc.core.channel.v1.Packet: + type: object + properties: + sequence: + type: string + format: uint64 + description: >- + number corresponds to the order of sends and receives, where a Packet + + with an earlier sequence number must be sent and received before a + Packet + + with a later sequence number. + source_port: + type: string + description: identifies the port on the sending chain. + source_channel: + type: string + description: identifies the channel end on the sending chain. + destination_port: + type: string + description: identifies the port on the receiving chain. + destination_channel: + type: string + description: identifies the channel end on the receiving chain. + data: + type: string + format: byte + title: actual opaque bytes transferred directly to the application module + timeout_height: + title: block height after which the packet times out + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + timeout_timestamp: + type: string + format: uint64 + title: block timestamp (in nanoseconds) after which the packet times out + title: >- + Packet defines a type that carries data across different chains through + IBC + ibc.core.channel.v1.PacketState: + type: object + properties: + port_id: + type: string + description: channel port identifier. + channel_id: + type: string + description: channel unique identifier. + sequence: + type: string + format: uint64 + description: packet sequence. + data: + type: string + format: byte + description: embedded data that represents packet state. + description: |- + PacketState defines the generic type necessary to retrieve and store + packet commitments, acknowledgements, and receipts. + Caller is responsible for knowing the context necessary to interpret this + state as a commitment, acknowledgement, or a receipt. + ibc.core.channel.v1.QueryChannelClientStateResponse: + type: object + properties: + identified_client_state: + title: client state associated with the channel + type: object + properties: + client_id: + type: string + title: client identifier + client_state: + title: client state + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: |- + IdentifiedClientState defines a client state with an additional client + identifier field. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryChannelClientStateResponse is the Response type for the + Query/QueryChannelClientState RPC method + ibc.core.channel.v1.QueryChannelConsensusStateResponse: + type: object + properties: + consensus_state: + title: consensus state associated with the channel + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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" + } + client_id: + type: string + title: client ID associated with the consensus state + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryChannelClientStateResponse is the Response type for the + Query/QueryChannelClientState RPC method + ibc.core.channel.v1.QueryChannelResponse: + type: object + properties: + channel: + title: channel associated with the request identifiers + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a channel is in one of the following states: + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other end of the + channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: >- + list of connection identifiers, in order, along which packets sent + on + + this channel will travel + version: + type: string + title: opaque channel version, which is agreed upon during the handshake + description: >- + Channel defines pipeline for exactly-once packet delivery between + specific + + modules on separate blockchains, which has at least one end capable of + + sending packets and one end capable of receiving packets. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryChannelResponse is the response type for the Query/Channel RPC + method. + + Besides the Channel end, it includes a proof and the height from which the + + proof was retrieved. + ibc.core.channel.v1.QueryChannelsResponse: + type: object + properties: + channels: + type: array + items: + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a channel is in one of the following states: + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other end of + the channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: >- + list of connection identifiers, in order, along which packets + sent on + + this channel will travel + version: + type: string + title: >- + opaque channel version, which is agreed upon during the + handshake + port_id: + type: string + title: port identifier + channel_id: + type: string + title: channel identifier + description: |- + IdentifiedChannel defines a channel with additional port and channel + identifier fields. + description: list of stored channels of the chain. + pagination: + title: pagination 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 + 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; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryChannelsResponse is the response type for the Query/Channels RPC + method. + ibc.core.channel.v1.QueryConnectionChannelsResponse: + type: object + properties: + channels: + type: array + items: + type: object + properties: + state: + title: current state of the channel end + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a channel is in one of the following states: + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ordering: + title: whether the channel is ordered or unordered + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + counterparty: + title: counterparty channel end + type: object + properties: + port_id: + type: string + description: >- + port on the counterparty chain which owns the other end of + the channel. + channel_id: + type: string + title: channel end on the counterparty chain + connection_hops: + type: array + items: + type: string + title: >- + list of connection identifiers, in order, along which packets + sent on + + this channel will travel + version: + type: string + title: >- + opaque channel version, which is agreed upon during the + handshake + port_id: + type: string + title: port identifier + channel_id: + type: string + title: channel identifier + description: |- + IdentifiedChannel defines a channel with additional port and channel + identifier fields. + description: list of channels associated with a connection. + pagination: + title: pagination 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 + 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; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryConnectionChannelsResponse is the Response type for the + Query/QueryConnectionChannels RPC method + ibc.core.channel.v1.QueryNextSequenceReceiveResponse: + type: object + properties: + next_sequence_receive: + type: string + format: uint64 + title: next sequence receive number + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QuerySequenceResponse is the request type for the + Query/QueryNextSequenceReceiveResponse RPC method + ibc.core.channel.v1.QueryPacketAcknowledgementResponse: + type: object + properties: + acknowledgement: + type: string + format: byte + title: packet associated with the request fields + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryPacketAcknowledgementResponse defines the client query response for a + packet which also includes a proof and the height from which the + proof was retrieved + ibc.core.channel.v1.QueryPacketAcknowledgementsResponse: + type: object + properties: + acknowledgements: + type: array + items: + type: object + properties: + port_id: + type: string + description: channel port identifier. + channel_id: + type: string + description: channel unique identifier. + sequence: + type: string + format: uint64 + description: packet sequence. + data: + type: string + format: byte + description: embedded data that represents packet state. + description: >- + PacketState defines the generic type necessary to retrieve and store + + packet commitments, acknowledgements, and receipts. + + Caller is responsible for knowing the context necessary to interpret + this + + state as a commitment, acknowledgement, or a receipt. + pagination: + title: pagination 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 + 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; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryPacketAcknowledgemetsResponse is the request type for the + Query/QueryPacketAcknowledgements RPC method + ibc.core.channel.v1.QueryPacketCommitmentResponse: + type: object + properties: + commitment: + type: string + format: byte + title: packet associated with the request fields + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + QueryPacketCommitmentResponse defines the client query response for a + packet + + which also includes a proof and the height from which the proof was + + retrieved + ibc.core.channel.v1.QueryPacketCommitmentsResponse: + type: object + properties: + commitments: + type: array + items: + type: object + properties: + port_id: + type: string + description: channel port identifier. + channel_id: + type: string + description: channel unique identifier. + sequence: + type: string + format: uint64 + description: packet sequence. + data: + type: string + format: byte + description: embedded data that represents packet state. + description: >- + PacketState defines the generic type necessary to retrieve and store + + packet commitments, acknowledgements, and receipts. + + Caller is responsible for knowing the context necessary to interpret + this + + state as a commitment, acknowledgement, or a receipt. + pagination: + title: pagination 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 + 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; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryPacketCommitmentsResponse is the request type for the + Query/QueryPacketCommitments RPC method + ibc.core.channel.v1.QueryPacketReceiptResponse: + type: object + properties: + received: + type: boolean + title: success flag for if receipt exists + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + QueryPacketReceiptResponse defines the client query response for a packet + + receipt which also includes a proof, and the height from which the proof + was + + retrieved + ibc.core.channel.v1.QueryUnreceivedAcksResponse: + type: object + properties: + sequences: + type: array + items: + type: string + format: uint64 + title: list of unreceived acknowledgement sequences + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryUnreceivedAcksResponse is the response type for the + Query/UnreceivedAcks RPC method + ibc.core.channel.v1.QueryUnreceivedPacketsResponse: + type: object + properties: + sequences: + type: array + items: + type: string + format: uint64 + title: list of unreceived packet sequences + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryUnreceivedPacketsResponse is the response type for the + Query/UnreceivedPacketCommitments RPC method + ibc.core.channel.v1.ResponseResultType: + type: string + enum: + - RESPONSE_RESULT_TYPE_UNSPECIFIED + - RESPONSE_RESULT_TYPE_NOOP + - RESPONSE_RESULT_TYPE_SUCCESS + default: RESPONSE_RESULT_TYPE_UNSPECIFIED + description: |- + - RESPONSE_RESULT_TYPE_UNSPECIFIED: Default zero value enumeration + - RESPONSE_RESULT_TYPE_NOOP: The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) + - RESPONSE_RESULT_TYPE_SUCCESS: The message was executed successfully + title: >- + ResponseResultType defines the possible outcomes of the execution of a + message + ibc.core.channel.v1.State: + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + - STATE_CLOSED + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a channel is in one of the following states: + CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A channel has just started the opening handshake. + - STATE_TRYOPEN: A channel has acknowledged the handshake step on the counterparty chain. + - STATE_OPEN: A channel has completed the handshake. Open channels are + ready to send and receive packets. + - STATE_CLOSED: A channel has been closed and can no longer be used to send or receive + packets. + ibc.core.client.v1.IdentifiedClientState: + type: object + properties: + client_id: + type: string + title: client identifier + client_state: + title: client state + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: |- + IdentifiedClientState defines a client state with an additional client + identifier field. + ibc.core.client.v1.ConsensusStateWithHeight: + type: object + properties: + height: + title: consensus state height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + consensus_state: + title: consensus state + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: >- + ConsensusStateWithHeight defines a consensus state with an additional + height + + field. + ibc.core.client.v1.MsgCreateClientResponse: + type: object + description: MsgCreateClientResponse defines the Msg/CreateClient response type. + ibc.core.client.v1.MsgSubmitMisbehaviourResponse: + type: object + description: |- + MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response + type. + ibc.core.client.v1.MsgUpdateClientResponse: + type: object + description: MsgUpdateClientResponse defines the Msg/UpdateClient response type. + ibc.core.client.v1.MsgUpgradeClientResponse: + type: object + description: MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. + ibc.core.client.v1.Params: + type: object + properties: + allowed_clients: + type: array + items: + type: string + description: >- + allowed_clients defines the list of allowed client state types which + can be created + + and interacted with. If a client type is removed from the allowed + clients list, usage + + of this client will be disabled until it is added again to the list. + description: Params defines the set of IBC light client parameters. + ibc.core.client.v1.QueryClientParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + allowed_clients: + type: array + items: + type: string + description: >- + allowed_clients defines the list of allowed client state types + which can be created + + and interacted with. If a client type is removed from the allowed + clients list, usage + + of this client will be disabled until it is added again to the + list. + description: >- + QueryClientParamsResponse is the response type for the Query/ClientParams + RPC + + method. + ibc.core.client.v1.QueryClientStateResponse: + type: object + properties: + client_state: + title: client state associated with the request identifier + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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" + } + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryClientStateResponse is the response type for the Query/ClientState + RPC + + method. Besides the client state, it includes a proof and the height from + + which the proof was retrieved. + ibc.core.client.v1.QueryClientStatesResponse: + type: object + properties: + client_states: + type: array + items: + type: object + properties: + client_id: + type: string + title: client identifier + client_state: + title: client state + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: >- + IdentifiedClientState defines a client state with an additional + client + + identifier field. + description: list of stored ClientStates of the chain. + pagination: + title: pagination 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 + 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; + } + description: >- + QueryClientStatesResponse is the response type for the Query/ClientStates + RPC + + method. + ibc.core.client.v1.QueryClientStatusResponse: + type: object + properties: + status: + type: string + description: >- + QueryClientStatusResponse is the response type for the Query/ClientStatus + RPC + + method. It returns the current status of the IBC client. + ibc.core.client.v1.QueryConsensusStateHeightsResponse: + type: object + properties: + consensus_state_heights: + type: array + items: + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is incremented + so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + Height is a monotonically increasing data type + + that can be compared against another Height for the purposes of + updating and + + freezing clients + title: consensus state heights + pagination: + title: pagination 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 + 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; + } + title: |- + QueryConsensusStateHeightsResponse is the response type for the + Query/ConsensusStateHeights RPC method + ibc.core.client.v1.QueryConsensusStateResponse: + type: object + properties: + consensus_state: + title: >- + consensus state associated with the client identifier at the given + height + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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" + } + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: >- + QueryConsensusStateResponse is the response type for the + Query/ConsensusState + + RPC method + ibc.core.client.v1.QueryConsensusStatesResponse: + type: object + properties: + consensus_states: + type: array + items: + type: object + properties: + height: + title: consensus state height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + consensus_state: + title: consensus state + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: >- + ConsensusStateWithHeight defines a consensus state with an + additional height + + field. + title: consensus states associated with the identifier + pagination: + title: pagination 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 + 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; + } + title: |- + QueryConsensusStatesResponse is the response type for the + Query/ConsensusStates RPC method + ibc.core.client.v1.QueryUpgradedClientStateResponse: + type: object + properties: + upgraded_client_state: + title: client state associated with the request identifier + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: |- + QueryUpgradedClientStateResponse is the response type for the + Query/UpgradedClientState RPC method. + ibc.core.client.v1.QueryUpgradedConsensusStateResponse: + type: object + properties: + upgraded_consensus_state: + title: Consensus state associated with the request identifier + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: |- + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState RPC method. + ibc.core.commitment.v1.MerklePrefix: + type: object + properties: + key_prefix: + type: string + format: byte + title: |- + MerklePrefix is merkle path prefixed to the key. + The constructed key from the Path and the key will be append(Path.KeyPath, + append(Path.KeyPrefix, key...)) + ibc.core.connection.v1.ConnectionEnd: + type: object + properties: + client_id: + type: string + description: client associated with this connection. + versions: + type: array + items: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: >- + Version defines the versioning scheme used to negotiate the IBC + verison in + + the connection handshake. + description: >- + IBC version which can be utilised to determine encodings or protocols + for + + channels or packets utilising this connection. + state: + description: current state of the connection end. + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain associated with a + given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty chain associated + with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: >- + delay period that must pass before a consensus state can be used for + + packet-verification NOTE: delay period logic is only implemented by + some + + clients. + description: |- + ConnectionEnd defines a stateful object on a chain connected to another + separate one. + NOTE: there must only be 2 defined ConnectionEnds to establish + a connection between two chains. + ibc.core.connection.v1.Counterparty: + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain associated with a + given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty chain associated + with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + description: >- + Counterparty defines the counterparty chain associated with a connection + end. + ibc.core.connection.v1.IdentifiedConnection: + type: object + properties: + id: + type: string + description: connection identifier. + client_id: + type: string + description: client associated with this connection. + versions: + type: array + items: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: >- + Version defines the versioning scheme used to negotiate the IBC + verison in + + the connection handshake. + title: >- + IBC version which can be utilised to determine encodings or protocols + for + + channels or packets utilising this connection + state: + description: current state of the connection end. + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain associated with a + given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty chain associated + with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: delay period associated with this connection. + description: |- + IdentifiedConnection defines a connection with additional connection + identifier field. + ibc.core.connection.v1.MsgConnectionOpenAckResponse: + type: object + description: >- + MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response + type. + ibc.core.connection.v1.MsgConnectionOpenConfirmResponse: + type: object + description: |- + MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm + response type. + ibc.core.connection.v1.MsgConnectionOpenInitResponse: + type: object + description: |- + MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response + type. + ibc.core.connection.v1.MsgConnectionOpenTryResponse: + type: object + description: >- + MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response + type. + ibc.core.connection.v1.Params: + type: object + properties: + max_expected_time_per_block: + type: string + format: uint64 + description: >- + maximum expected time per block (in nanoseconds), used to enforce + block delay. This parameter should reflect the + + largest amount of time that the chain might reasonably take to produce + the next block under normal operating + + conditions. A safe choice is 3-5x the expected time per block. + description: Params defines the set of Connection parameters. + ibc.core.connection.v1.QueryClientConnectionsResponse: + type: object + properties: + connection_paths: + type: array + items: + type: string + description: slice of all the connection paths associated with a client. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was generated + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryClientConnectionsResponse is the response type for the + Query/ClientConnections RPC method + ibc.core.connection.v1.QueryConnectionClientStateResponse: + type: object + properties: + identified_client_state: + title: client state associated with the channel + type: object + properties: + client_id: + type: string + title: client identifier + client_state: + title: client state + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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: |- + IdentifiedClientState defines a client state with an additional client + identifier field. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryConnectionClientStateResponse is the response type for the + Query/ConnectionClientState RPC method + ibc.core.connection.v1.QueryConnectionConsensusStateResponse: + type: object + properties: + consensus_state: + title: consensus state associated with the channel + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + 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); + } + + 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": , + "lastName": + } + + 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" + } + client_id: + type: string + title: client ID associated with the consensus state + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + title: |- + QueryConnectionConsensusStateResponse is the response type for the + Query/ConnectionConsensusState RPC method + ibc.core.connection.v1.QueryConnectionParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_expected_time_per_block: + type: string + format: uint64 + description: >- + maximum expected time per block (in nanoseconds), used to enforce + block delay. This parameter should reflect the + + largest amount of time that the chain might reasonably take to + produce the next block under normal operating + + conditions. A safe choice is 3-5x the expected time per block. + description: >- + QueryConnectionParamsResponse is the response type for the + Query/ConnectionParams RPC method. + ibc.core.connection.v1.QueryConnectionResponse: + type: object + properties: + connection: + title: connection associated with the request identifier + type: object + properties: + client_id: + type: string + description: client associated with this connection. + versions: + type: array + items: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: >- + Version defines the versioning scheme used to negotiate the IBC + verison in + + the connection handshake. + description: >- + IBC version which can be utilised to determine encodings or + protocols for + + channels or packets utilising this connection. + state: + description: current state of the connection end. + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain associated + with a given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty chain + associated with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: >- + delay period that must pass before a consensus state can be used + for + + packet-verification NOTE: delay period logic is only implemented + by some + + clients. + description: >- + ConnectionEnd defines a stateful object on a chain connected to + another + + separate one. + + NOTE: there must only be 2 defined ConnectionEnds to establish + + a connection between two chains. + proof: + type: string + format: byte + title: merkle proof of existence + proof_height: + title: height at which the proof was retrieved + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryConnectionResponse is the response type for the Query/Connection RPC + + method. Besides the connection end, it includes a proof and the height + from + + which the proof was retrieved. + ibc.core.connection.v1.QueryConnectionsResponse: + type: object + properties: + connections: + type: array + items: + type: object + properties: + id: + type: string + description: connection identifier. + client_id: + type: string + description: client associated with this connection. + versions: + type: array + items: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: >- + Version defines the versioning scheme used to negotiate the + IBC verison in + + the connection handshake. + title: >- + IBC version which can be utilised to determine encodings or + protocols for + + channels or packets utilising this connection + state: + description: current state of the connection end. + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + counterparty: + description: counterparty chain associated with this connection. + type: object + properties: + client_id: + type: string + description: >- + identifies the client on the counterparty chain associated + with a given + + connection. + connection_id: + type: string + description: >- + identifies the connection end on the counterparty chain + associated with a + + given connection. + prefix: + description: commitment merkle prefix of the counterparty chain. + type: object + properties: + key_prefix: + type: string + format: byte + title: >- + MerklePrefix is merkle path prefixed to the key. + + The constructed key from the Path and the key will be + append(Path.KeyPath, + + append(Path.KeyPrefix, key...)) + delay_period: + type: string + format: uint64 + description: delay period associated with this connection. + description: |- + IdentifiedConnection defines a connection with additional connection + identifier field. + description: list of stored connections of the chain. + pagination: + title: pagination 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 + 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; + } + height: + title: query block height + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + description: >- + QueryConnectionsResponse is the response type for the Query/Connections + RPC + + method. + ibc.core.connection.v1.State: + type: string + enum: + - STATE_UNINITIALIZED_UNSPECIFIED + - STATE_INIT + - STATE_TRYOPEN + - STATE_OPEN + default: STATE_UNINITIALIZED_UNSPECIFIED + description: |- + State defines if a connection is in one of the following states: + INIT, TRYOPEN, OPEN or UNINITIALIZED. + + - STATE_UNINITIALIZED_UNSPECIFIED: Default State + - STATE_INIT: A connection end has just started the opening handshake. + - STATE_TRYOPEN: A connection end has acknowledged the handshake step on the counterparty + chain. + - STATE_OPEN: A connection end has completed the handshake. + ibc.core.connection.v1.Version: + type: object + properties: + identifier: + type: string + title: unique version identifier + features: + type: array + items: + type: string + title: list of features compatible with the specified identifier + description: |- + Version defines the versioning scheme used to negotiate the IBC verison in + the connection handshake. diff --git a/go.mod b/go.mod index 49990886e..4a9fe5d07 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( github.com/spf13/viper v1.16.0 github.com/stretchr/testify v1.8.4 github.com/yoseplee/vrf v0.0.0-20210814110709-d1caf509310b - golang.org/x/crypto v0.11.0 + golang.org/x/crypto v0.14.0 google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e google.golang.org/grpc v1.57.0 gopkg.in/yaml.v2 v2.4.0 @@ -43,9 +43,29 @@ require ( ) require ( + github.com/AlecAivazis/survey/v2 v2.3.7 + github.com/briandowns/spinner v1.23.0 github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401 github.com/cayleygraph/cayley v0.7.7 github.com/cayleygraph/quad v1.1.0 + github.com/charmbracelet/bubbles v0.16.1 + github.com/charmbracelet/bubbletea v0.24.2 + github.com/charmbracelet/lipgloss v0.9.1 + github.com/go-git/go-git/v5 v5.10.0 + github.com/gobuffalo/genny/v2 v2.1.0 + github.com/gobuffalo/logger v1.0.7 + github.com/gobuffalo/packd v1.0.2 + github.com/gobuffalo/plush/v4 v4.1.19 + github.com/goccy/go-yaml v1.11.2 + github.com/hashicorp/go-hclog v1.2.0 + github.com/hashicorp/go-plugin v1.5.2 + github.com/manifoldco/promptui v0.9.0 + github.com/muesli/reflow v0.3.0 + go.etcd.io/bbolt v1.3.7 + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb + golang.org/x/mod v0.12.0 + golang.org/x/sync v0.3.0 + golang.org/x/text v0.13.0 google.golang.org/protobuf v1.31.0 ) @@ -61,26 +81,33 @@ require ( cosmossdk.io/log v1.2.1 // indirect cosmossdk.io/math v1.1.2 // indirect cosmossdk.io/tools/rosetta v0.2.1 // indirect + dario.cat/mergo v1.0.0 // indirect filippo.io/edwards25519 v1.0.0 // indirect git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/gqlgen v0.17.24 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect + github.com/acomagu/bufpipe v1.0.4 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go v1.44.295 // indirect + github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect + github.com/aymerick/douceur v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/bits-and-blooms/bitset v1.7.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect - github.com/bwesterb/go-ristretto v1.2.0 // indirect + github.com/bwesterb/go-ristretto v1.2.3 // indirect github.com/bytedance/sonic v1.9.2 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect github.com/chzyer/readline v1.5.1 // indirect + github.com/cloudflare/circl v1.3.3 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/errors v1.10.0 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect @@ -89,6 +116,7 @@ require ( github.com/confio/ics23/go v0.9.0 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.10.0 // indirect + github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.2 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect @@ -97,6 +125,7 @@ require ( github.com/cosmos/ledger-cosmos-go v0.12.1 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect github.com/creachadair/taskgroup v0.4.2 // indirect + github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect @@ -108,6 +137,9 @@ require ( github.com/docker/distribution v2.8.2+incompatible // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect + github.com/emirpasic/gods v1.18.1 // indirect + github.com/fatih/color v1.13.0 // indirect + github.com/fatih/structs v1.1.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fxamacker/cbor/v2 v2.4.0 // indirect @@ -115,6 +147,8 @@ require ( github.com/getsentry/sentry-go v0.23.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect github.com/gin-contrib/sse v0.1.0 // indirect + github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect + github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect @@ -125,11 +159,15 @@ require ( github.com/go-playground/validator/v10 v10.14.1 // indirect github.com/go-webauthn/x v0.1.4 // indirect github.com/gobuffalo/envy v1.7.1 // indirect - github.com/gobuffalo/logger v1.0.1 // indirect - github.com/gobuffalo/packd v0.3.0 // indirect + github.com/gobuffalo/flect v0.3.0 // indirect + github.com/gobuffalo/github_flavored_markdown v1.1.4 // indirect + github.com/gobuffalo/helpers v0.6.7 // indirect github.com/gobuffalo/packr/v2 v2.7.1 // indirect + github.com/gobuffalo/tags/v3 v3.1.4 // indirect + github.com/gobuffalo/validate/v3 v3.3.3 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gofrs/uuid v4.3.0+incompatible // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.0.0 // indirect @@ -145,6 +183,7 @@ require ( github.com/google/s2a-go v0.1.4 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect github.com/googleapis/gax-go/v2 v2.11.0 // indirect + github.com/gorilla/css v1.0.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect @@ -158,16 +197,20 @@ require ( github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb // indirect github.com/hasura/go-graphql-client v0.9.0 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/holiman/uint256 v1.2.3 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/joho/godotenv v1.3.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/compress v1.16.7 // indirect github.com/klauspost/cpuid/v2 v2.2.5 // indirect github.com/kr/pretty v0.3.1 // indirect @@ -176,11 +219,15 @@ require ( github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect github.com/linxGnu/grocksdb v1.7.16 // indirect + github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/magiconair/properties v1.8.7 // indirect - github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-localereader v0.0.1 // indirect + github.com/mattn/go-runewidth v0.0.15 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect + github.com/microcosm-cc/bluemonday v1.0.23 // indirect github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect @@ -191,11 +238,16 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/mtibben/percent v0.2.1 // indirect + github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect + github.com/muesli/cancelreader v0.2.2 // indirect + github.com/muesli/termenv v0.15.2 // indirect github.com/multiformats/go-base32 v0.1.0 // indirect github.com/multiformats/go-base36 v0.2.0 // indirect + github.com/oklog/run v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect + github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect @@ -203,11 +255,16 @@ require ( github.com/prometheus/procfs v0.10.1 // indirect github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/rivo/uniseg v0.2.0 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/cors v1.8.3 // indirect github.com/rs/zerolog v1.30.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/sergi/go-diff v1.3.1 // indirect github.com/sirupsen/logrus v1.9.3 // indirect + github.com/skeema/knownhosts v1.2.0 // indirect + github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d // indirect + github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/subosito/gotenv v1.4.2 // indirect @@ -219,9 +276,9 @@ require ( github.com/ulikunitz/xz v0.5.11 // indirect github.com/vektah/gqlparser/v2 v2.5.1 // indirect github.com/x448/float16 v0.8.4 // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect - go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel v1.13.0 // indirect go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.13.0 // indirect @@ -231,21 +288,18 @@ require ( go.opentelemetry.io/otel/trace v1.13.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect - golang.org/x/mod v0.11.0 // indirect - golang.org/x/net v0.12.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.11.0 // indirect - golang.org/x/term v0.10.0 // indirect - golang.org/x/text v0.12.0 // indirect - golang.org/x/tools v0.9.3 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/tools v0.13.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.126.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230720185612-659f7aaaa771 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230726155614-23370e0ffb3e // indirect gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.7 // indirect pgregory.net/rapid v0.5.5 // indirect diff --git a/go.sum b/go.sum index dbf2279d6..d4a4a13ef 100644 --- a/go.sum +++ b/go.sum @@ -204,6 +204,8 @@ cosmossdk.io/simapp v0.0.0-20230323161446-0af178d721ff h1:P1ialzTepD1oxdNPYc5N8E cosmossdk.io/simapp v0.0.0-20230323161446-0af178d721ff/go.mod h1:AKzx6Mb544LjJ9RHmGFHjY9rEOLiUAi8I0F727TR0dY= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -216,6 +218,8 @@ github.com/99designs/gqlgen v0.17.24 h1:pcd/HFIoSdRvyADYQG2dHvQN2KZqX/nXzlVm6TMM github.com/99designs/gqlgen v0.17.24/go.mod h1:BMhYIhe4bp7OlCo5I2PnowSK/Wimpv/YlxfNkqZGwLo= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= +github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= +github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= @@ -232,16 +236,23 @@ github.com/CosmWasm/wasmvm v1.3.0/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8 github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.4.12/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= -github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= +github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= +github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= +github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= @@ -255,6 +266,8 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -265,6 +278,8 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= @@ -272,6 +287,10 @@ github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX github.com/aws/aws-sdk-go v1.44.295 h1:SGjU1+MqttXfRiWHD6WU0DRhaanJgAFY+xIhEaugV8Y= github.com/aws/aws-sdk-go v1.44.295/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= +github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= +github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= +github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/badgerodon/peg v0.0.0-20130729175151-9e5f7f4d07ca/go.mod h1:TWe0N2hv5qvpLHT+K16gYcGBllld4h65dQ/5CNuirmk= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -285,6 +304,8 @@ github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsy github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= +github.com/briandowns/spinner v1.23.0 h1:alDF2guRWqa/FOZZYWjlMIx2L6H0wyewPxo/CH4Pt2A= +github.com/briandowns/spinner v1.23.0/go.mod h1:rPG4gmXeN3wQV/TsAY4w8lPdIM6RX3yqeBQJSrbXjuE= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401 h1:0tjUthKCaF8zwF9Qg7lfnep0xdo4n8WiFUfQPaMHX6g= github.com/btcsuite/btcd v0.21.0-beta.0.20201114000516-e9c7a5ac6401/go.mod h1:Sv4JPQ3/M+teHz9Bo5jBpkNcP0x6r7rdihlNL/7tTAs= @@ -304,8 +325,8 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= -github.com/bwesterb/go-ristretto v1.2.0 h1:xxWOVbN5m8NNKiSDZXE1jtZvZnC6JSJ9cYFADiZcWtw= -github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= +github.com/bwesterb/go-ristretto v1.2.3 h1:1w53tCkGhCQ5djbat3+MH0BAQ5Kfgbt56UZQ/JMzngw= +github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.9.2 h1:GDaNjuWSGu09guE9Oql0MSTNhNCLlWwO8y/xM5BzcbM= github.com/bytedance/sonic v1.9.2/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= @@ -326,6 +347,12 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charmbracelet/bubbles v0.16.1 h1:6uzpAAaT9ZqKssntbvZMlksWHruQLNxg49H5WdeuYSY= +github.com/charmbracelet/bubbles v0.16.1/go.mod h1:2QCp9LFlEsBQMvIYERr7Ww2H2bA7xen1idUDIzm/+Xc= +github.com/charmbracelet/bubbletea v0.24.2 h1:uaQIKx9Ai6Gdh5zpTbGiWpytMU+CfsPp06RaW2cx/SY= +github.com/charmbracelet/bubbletea v0.24.2/go.mod h1:XdrNrV4J8GiyshTtx3DNuYkR1FDaJmO3l2nejekbsgg= +github.com/charmbracelet/lipgloss v0.9.1 h1:PNyd3jvaJbg4jRHKWXnCj1akQm4rh8dbEzN1p/u1KWg= +github.com/charmbracelet/lipgloss v0.9.1/go.mod h1:1mPmG4cxScwUQALAAnacHaigiiHB9Pmr+v1VEawJl6I= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= @@ -343,6 +370,8 @@ github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6D github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= +github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -375,6 +404,8 @@ github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/Yj github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.10.0 h1:zRh22SR7o4K35SoNqouS9J/TKHTyU2QWaj5ldehyXtA= github.com/consensys/gnark-crypto v0.10.0/go.mod h1:Iq/P3HHl0ElSjsg2E1gsMwhAyxnxoKK5nVyZKd+/KhU= +github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= +github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/containerd/continuity v0.0.0-20181203112020-004b46473808/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= @@ -421,6 +452,10 @@ github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJF github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI= +github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/cznic/mathutil v0.0.0-20170313102836-1447ad269d64 h1:oad14P7M0/ZAPSMH1nl1vC8zdKVkA3kfHLO59z1l8Eg= github.com/cznic/mathutil v0.0.0-20170313102836-1447ad269d64/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= github.com/d4l3k/messagediff v1.2.1/go.mod h1:Oozbb1TVXFac9FtSIxHBMnBCq2qeH/2KkEQxENCrlLo= @@ -480,6 +515,10 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= +github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -494,6 +533,10 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/ethereum/go-ethereum v1.12.1 h1:1kXDPxhLfyySuQYIfRxVBGYuaHdxNNxevA73vjIwsgk= github.com/ethereum/go-ethereum v1.12.1/go.mod h1:zKetLweqBR8ZS+1O9iJWI8DvmmD2NzD19apjEWDCsnw= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= @@ -526,9 +569,19 @@ github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= +github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/go-echarts/go-echarts v0.0.0-20190915064101-cbb3b43ade5d/go.mod h1:v4lFmU586g/A0xaH1RMDS86YlYrwpj8eHtR+xBReKE8= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= +github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= +github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= +github.com/go-git/go-git/v5 v5.10.0 h1:F0x3xXrAWmhwtzoCokU4IMPcBdncG+HAAqi9FcOOjbQ= +github.com/go-git/go-git/v5 v5.10.0/go.mod h1:1FOZ/pQnqw24ghP2n7cunVl0ON55BsjPYvhWHvZGhoo= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -580,15 +633,33 @@ github.com/go-webauthn/x v0.1.4/go.mod h1:75Ug0oK6KYpANh5hDOanfDI+dvPWHk788naJVG github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= github.com/gobuffalo/envy v1.7.1 h1:OQl5ys5MBea7OGCdvPbBJWRgnhC/fGona6QKfvFeau8= github.com/gobuffalo/envy v1.7.1/go.mod h1:FurDp9+EDPE4aIUS3ZLyD+7/9fpx7YRt/ukY6jIHf0w= +github.com/gobuffalo/flect v0.3.0 h1:erfPWM+K1rFNIQeRPdeEXxo8yFr/PO17lhRnS8FUrtk= +github.com/gobuffalo/flect v0.3.0/go.mod h1:5pf3aGnsvqvCj50AVni7mJJF8ICxGZ8HomberC3pXLE= +github.com/gobuffalo/genny/v2 v2.1.0 h1:cCRBbqzo3GfNvj3UetD16zRgUvWFEyyl0qTqquuIqOM= +github.com/gobuffalo/genny/v2 v2.1.0/go.mod h1:4yoTNk4bYuP3BMM6uQKYPvtP6WsXFGm2w2EFYZdRls8= +github.com/gobuffalo/github_flavored_markdown v1.1.3/go.mod h1:IzgO5xS6hqkDmUh91BW/+Qxo/qYnvfzoz3A7uLkg77I= +github.com/gobuffalo/github_flavored_markdown v1.1.4 h1:WacrEGPXUDX+BpU1GM/Y0ADgMzESKNWls9hOTG1MHVs= +github.com/gobuffalo/github_flavored_markdown v1.1.4/go.mod h1:Vl9686qrVVQou4GrHRK/KOG3jCZOKLUqV8MMOAYtlso= +github.com/gobuffalo/helpers v0.6.7 h1:C9CedoRSfgWg2ZoIkVXgjI5kgmSpL34Z3qdnzpfNVd8= +github.com/gobuffalo/helpers v0.6.7/go.mod h1:j0u1iC1VqlCaJEEVkZN8Ia3TEzfj/zoXANqyJExTMTA= github.com/gobuffalo/logger v1.0.0/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= -github.com/gobuffalo/logger v1.0.1 h1:ZEgyRGgAm4ZAhAO45YXMs5Fp+bzGLESFewzAVBMKuTg= github.com/gobuffalo/logger v1.0.1/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= -github.com/gobuffalo/packd v0.3.0 h1:eMwymTkA1uXsqxS0Tpoop3Lc0u3kTfiMBE6nKtQU4g4= +github.com/gobuffalo/logger v1.0.7 h1:LTLwWelETXDYyqF/ASf0nxaIcdEOIJNxRokPcfI/xbU= +github.com/gobuffalo/logger v1.0.7/go.mod h1:u40u6Bq3VVvaMcy5sRBclD8SXhBYPS0Qk95ubt+1xJM= github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= +github.com/gobuffalo/packd v1.0.2 h1:Yg523YqnOxGIWCp69W12yYBKsoChwI7mtu6ceM9Bwfw= +github.com/gobuffalo/packd v1.0.2/go.mod h1:sUc61tDqGMXON80zpKGp92lDb86Km28jfvX7IAyxFT8= github.com/gobuffalo/packr v1.30.1/go.mod h1:ljMyFO2EcrnzsHsN99cvbq055Y9OhRrIaviy289eRuk= github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWSVlXRN9X1Iw= github.com/gobuffalo/packr/v2 v2.7.1 h1:n3CIW5T17T8v4GGK5sWXLVWJhCz7b5aNLSxW6gYim4o= github.com/gobuffalo/packr/v2 v2.7.1/go.mod h1:qYEvAazPaVxy7Y7KR0W8qYEE+RymX74kETFqjFoFlOc= +github.com/gobuffalo/plush/v4 v4.1.16/go.mod h1:6t7swVsarJ8qSLw1qyAH/KbrcSTwdun2ASEQkOznakg= +github.com/gobuffalo/plush/v4 v4.1.19 h1:o0E5gEJw+ozkAwQoCeiaWC6VOU2lEmX+GhtGkwpqZ8o= +github.com/gobuffalo/plush/v4 v4.1.19/go.mod h1:WiKHJx3qBvfaDVlrv8zT7NCd3dEMaVR/fVxW4wqV17M= +github.com/gobuffalo/tags/v3 v3.1.4 h1:X/ydLLPhgXV4h04Hp2xlbI2oc5MDaa7eub6zw8oHjsM= +github.com/gobuffalo/tags/v3 v3.1.4/go.mod h1:ArRNo3ErlHO8BtdA0REaZxijuWnWzF6PUXngmMXd2I0= +github.com/gobuffalo/validate/v3 v3.3.3 h1:o7wkIGSvZBYBd6ChQoLxkz2y1pfmhbI4jNJYh6PuNJ4= +github.com/gobuffalo/validate/v3 v3.3.3/go.mod h1:YC7FsbJ/9hW/VjQdmXPvFqvRis4vrRYFxr69WiNZw6g= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= @@ -597,9 +668,14 @@ github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/goccy/go-yaml v1.11.2 h1:joq77SxuyIs9zzxEjgyLBugMQ9NEgTWxXfz2wVqwAaQ= +github.com/goccy/go-yaml v1.11.2/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= +github.com/gofrs/uuid v4.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -744,6 +820,8 @@ github.com/gopherjs/gopherjs v0.0.0-20190411002643-bd77b112433e/go.mod h1:wJfORR github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/jsbuiltin v0.0.0-20180426082241-50091555e127/go.mod h1:7X1acUyFRf+oVFTU6SWw9mnb57Vxn+Nbh8iPbKg95hs= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= +github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= +github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= @@ -789,11 +867,15 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= +github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -818,6 +900,8 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS4/qyk21ZsHyb6Mxv/jykxvNTkU4M= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hasura/go-graphql-client v0.9.0 h1:IPL+8CjLrTw4lAJno6qP6e9Nz64+fHSwJTbx4feXI80= github.com/hasura/go-graphql-client v0.9.0/go.mod h1:jlTUQWgTJOI4opQssMlCkzVjpRVSyL+PQsTjkAwcr3w= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= @@ -825,6 +909,8 @@ github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3s github.com/hidal-go/hidalgo v0.0.0-20190814174001-42e03f3b5eaa/go.mod h1:bPkrxDlroXxigw8BMWTEPTv4W5/rQwNgg2BECXsgyX0= github.com/highlight/highlight/sdk/highlight-go v0.9.9 h1:joKICta1t0y4k4j9bxr82UkImkVuDcgBZLED12z0G1Q= github.com/highlight/highlight/sdk/highlight-go v0.9.9/go.mod h1:U+PdcT8fqnnOZGc48O62flvANbZ6x9czxwE3xiunFqU= +github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= +github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o= github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -844,6 +930,8 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= github.com/jackc/pgx v3.3.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= @@ -875,6 +963,10 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kataras/jwt v0.1.8 h1:u71baOsYD22HWeSOg32tCHbczPjdCk7V4MMeJqTtmGk= github.com/kataras/jwt v0.1.8/go.mod h1:Q5j2IkcIHnfwy+oNY3TVWuEBJNw0ADgCcXK9CaZwV4o= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -920,6 +1012,8 @@ github.com/linkeddata/gojsonld v0.0.0-20170418210642-4f5db6791326/go.mod h1:nfqk github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= +github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= +github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -930,24 +1024,42 @@ github.com/mailru/easyjson v0.0.0-20190403194419-1ea4449da983/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= +github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= +github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/matryer/moq v0.2.7/go.mod h1:kITsx543GOENm48TUAQyJ9+SAvFSr7iGQXPoth/VUBk= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= +github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= +github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= +github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= +github.com/microcosm-cc/bluemonday v1.0.20/go.mod h1:yfBmMi8mxvaZut3Yytv+jTXRY8mxyjJ0/kQBTElld50= +github.com/microcosm-cc/bluemonday v1.0.22/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM= +github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY= +github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= @@ -981,6 +1093,14 @@ github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b h1:1XF24mVaiu7u+CFywTdcDo2ie1pzzhwjt6RHqzpMU34= +github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho= +github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= +github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= +github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= +github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= +github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= +github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE= github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI= github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= @@ -1005,6 +1125,7 @@ github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= +github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -1020,8 +1141,8 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= -github.com/onsi/gomega v1.20.0/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -1063,6 +1184,8 @@ github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0 github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= +github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1115,6 +1238,9 @@ github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Ung github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -1140,8 +1266,10 @@ github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71e github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/shengdoushi/base58 v1.0.0 h1:tGe4o6TmdXFJWoI31VoSWvuaKxf0Px3gqa3sUWhAxBs= github.com/shengdoushi/base58 v1.0.0/go.mod h1:m5uIILfzcKMw6238iWAhP4l3s5+uXyF3+bJKUNhAL9I= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= @@ -1151,8 +1279,11 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= +github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -1160,6 +1291,10 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k github.com/sonr-io/kryptology v1.10.0 h1:vZ3S1Ct29SKDH6VwYPa9xUeFfwZ0O20mgPIXknCuPM0= github.com/sonr-io/kryptology v1.10.0/go.mod h1:INzpheY1ROZyPxoLGQenlaxM5uRAoz67XNuScsr39Ys= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d h1:yKm7XZV6j9Ev6lojP2XaIshpT4ymkqhMeSghO5Ps00E= +github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= +github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e h1:qpG93cPwA5f7s/ZPBJnGOYQNK/vKsaDaseuKT5Asee8= +github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -1237,6 +1372,8 @@ github.com/vektah/gqlparser/v2 v2.5.1 h1:ZGu+bquAY23jsxDRcYpWjttRZrUz07LbiY77gUO github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRFZrvOnp3hmCs= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= @@ -1321,9 +1458,12 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= +golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1364,8 +1504,9 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1427,11 +1568,17 @@ golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1474,6 +1621,7 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1487,6 +1635,7 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1503,6 +1652,7 @@ golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191009170203-06d7bd2c5f4f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1535,6 +1685,7 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1579,15 +1730,21 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1599,8 +1756,10 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1671,8 +1830,9 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1939,6 +2099,7 @@ gopkg.in/olivere/elastic.v5 v5.0.81/go.mod h1:uhHoB4o3bvX5sorxBU29rPcmBQdV2Qfg0F gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/pkg/crypto/credential.go b/internal/crypto/credential.go similarity index 100% rename from pkg/crypto/credential.go rename to internal/crypto/credential.go diff --git a/pkg/crypto/crypto.go b/internal/crypto/crypto.go similarity index 100% rename from pkg/crypto/crypto.go rename to internal/crypto/crypto.go diff --git a/pkg/crypto/keys.go b/internal/crypto/keys.go similarity index 100% rename from pkg/crypto/keys.go rename to internal/crypto/keys.go diff --git a/internal/highway/handler/wallet.go b/internal/highway/handler/wallet.go index 5ebac81e5..71d632cdb 100644 --- a/internal/highway/handler/wallet.go +++ b/internal/highway/handler/wallet.go @@ -5,8 +5,8 @@ import ( "fmt" "github.com/cosmos/cosmos-sdk/client" + "github.com/sonr-io/core/internal/crypto" mdw "github.com/sonr-io/core/internal/highway/middleware" - "github.com/sonr-io/core/pkg/crypto" walletpb "github.com/sonr-io/core/types/highway/wallet/v1" ) diff --git a/internal/highway/middleware/verifier.go b/internal/highway/middleware/verifier.go index 2ac4fc658..dca688623 100644 --- a/internal/highway/middleware/verifier.go +++ b/internal/highway/middleware/verifier.go @@ -6,9 +6,10 @@ import ( "github.com/gin-gonic/gin" "github.com/go-webauthn/webauthn/protocol" + "github.com/sonr-io/core/internal/crypto" "github.com/sonr-io/core/internal/highway/types" - "github.com/sonr-io/core/pkg/crypto" - "github.com/sonr-io/core/pkg/did/controller" + "github.com/sonr-io/core/services/did/controller" + "github.com/sonr-io/core/types/webauthn" domaintypes "github.com/sonr-io/core/x/domain/types" identitytypes "github.com/sonr-io/core/x/identity/types" servicetypes "github.com/sonr-io/core/x/service/types" @@ -112,7 +113,7 @@ func UseControllerAccount(token string) (*controller.SonrController, error) { } // PublishControllerAccount creates a new controller account and publishes it to the blockchain -func PublishControllerAccount(alias string, cred *servicetypes.Credential, origin string) (*controller.SonrController, *types.TxResponse, error) { +func PublishControllerAccount(alias string, cred *webauthn.Credential, origin string) (*controller.SonrController, *types.TxResponse, error) { controller, err := controller.New(alias, cred, origin) if err != nil { return nil, nil, fmt.Errorf("failed to create controller: %w", err) diff --git a/internal/highway/types/claims.go b/internal/highway/types/claims.go index 7b31fd466..23e2dfdd3 100644 --- a/internal/highway/types/claims.go +++ b/internal/highway/types/claims.go @@ -9,7 +9,7 @@ import ( "github.com/kataras/jwt" "github.com/spf13/viper" - "github.com/sonr-io/core/pkg/crypto" + "github.com/sonr-io/core/internal/crypto" identitytypes "github.com/sonr-io/core/x/identity/types" ) diff --git a/internal/highway/types/response.go b/internal/highway/types/response.go index 8be3efbf3..3d354253a 100644 --- a/internal/highway/types/response.go +++ b/internal/highway/types/response.go @@ -3,7 +3,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/sonr-io/core/pkg/crypto" + "github.com/sonr-io/core/internal/crypto" identitytypes "github.com/sonr-io/core/x/identity/types" ) diff --git a/pkg/mpc/types/v1/codec.go b/internal/zk/codec.go similarity index 99% rename from pkg/mpc/types/v1/codec.go rename to internal/zk/codec.go index bdcebed77..4c53d9209 100644 --- a/pkg/mpc/types/v1/codec.go +++ b/internal/zk/codec.go @@ -1,4 +1,4 @@ -package types +package zk import ( "crypto/sha256" diff --git a/pkg/mpc/types/v1/zkset.go b/internal/zk/zkset.go similarity index 90% rename from pkg/mpc/types/v1/zkset.go rename to internal/zk/zkset.go index 6491bff91..b067a2b37 100644 --- a/pkg/mpc/types/v1/zkset.go +++ b/internal/zk/zkset.go @@ -1,4 +1,4 @@ -package types +package zk import ( "crypto/aes" @@ -7,11 +7,15 @@ import ( "errors" "io" - "github.com/sonr-io/core/pkg/crypto" + "github.com/sonr-io/core/internal/crypto" "github.com/sonr-io/kryptology/pkg/accumulator" "github.com/sonr-io/kryptology/pkg/core/curves" ) +type Accumulator = accumulator.Accumulator +type SecretKey = accumulator.SecretKey +type Element = accumulator.Element + func (zk ZKEphemeralKey) String() string { return crypto.Base64Encode(zk) } @@ -216,3 +220,13 @@ func (c ZKSet) ValidateMembership(spk PubKey, elem string) bool { } return true } + +// NewZKSet creates a new zero-knowledge set from a list of zero-knowledge proofs. +func NewZKSet(pubKey *crypto.Secp256k1PubKey, initialIds ...string) (ZKSet, error) { + return CreateZkSet(pubKey, initialIds...) +} + +// LoadZKSet loads a zero-knowledge set from a list of zero-knowledge proofs. +func LoadZKSet(str string) (ZKSet, error) { + return OpenZkSet(str) +} diff --git a/internal/zk/zkset_test.go b/internal/zk/zkset_test.go new file mode 100644 index 000000000..c6b85676e --- /dev/null +++ b/internal/zk/zkset_test.go @@ -0,0 +1,112 @@ +package zk_test + +import ( + "testing" + + secp256k1 "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + "github.com/sonr-io/core/pkg/zk" + + "github.com/stretchr/testify/require" + + "github.com/sonr-io/kryptology/pkg/core/curves" + "github.com/stretchr/testify/assert" +) + +func TestZkSet(t *testing.T) { + priv := secp256k1.GenPrivKey() + pub := priv.PubKey() + zkset, err := zk.CreateZkSet(pub) + if err != nil { + t.Fatal(err) + } + t.Log(zkset) + err = zkset.AddElement(pub, "test") + if err != nil { + t.Fatal(err) + } + raw := zkset.String() + t.Log(raw) + + zkset2, err := zk.OpenZkSet(raw) + if err != nil { + t.Fatal(err) + } + t.Log(zkset2) + ok1 := zkset2.ValidateMembership(pub, "test") + assert.True(t, ok1) +} + +func TestNewAccumulator100(t *testing.T) { + curve := curves.BLS12381(&curves.PointBls12381G1{}) + var seed [32]byte + key, err := new(zk.SecretKey).New(curve, seed[:]) + require.NoError(t, err) + require.NotNil(t, key) + acc, err := new(zk.Accumulator).New(curve) + require.NoError(t, err) + require.NotNil(t, acc) +} + +func TestNewAccumulator10K(t *testing.T) { + curve := curves.BLS12381(&curves.PointBls12381G1{}) + var seed [32]byte + key, err := new(zk.SecretKey).New(curve, seed[:]) + require.NoError(t, err) + require.NotNil(t, key) + acc, err := new(zk.Accumulator).New(curve) + require.NoError(t, err) + require.NotNil(t, acc) +} + +func TestNewAccumulator10M(t *testing.T) { + // Initiating 10M values takes time + if testing.Short() { + t.Skip("skipping test in short mode.") + } + curve := curves.BLS12381(&curves.PointBls12381G1{}) + var seed [32]byte + key, err := new(zk.SecretKey).New(curve, seed[:]) + require.NoError(t, err) + require.NotNil(t, key) + acc, err := new(zk.Accumulator).New(curve) + require.NoError(t, err) + require.NotNil(t, acc) +} + +func TestWithElements(t *testing.T) { + curve := curves.BLS12381(&curves.PointBls12381G1{}) + var seed [32]byte + key, _ := new(zk.SecretKey).New(curve, seed[:]) + element1 := curve.Scalar.Hash([]byte("value1")) + element2 := curve.Scalar.Hash([]byte("value2")) + elements := []zk.Element{element1, element2} + newAcc, err := new(zk.Accumulator).WithElements(curve, key, elements) + require.NoError(t, err) + require.NotNil(t, newAcc) + + _, _ = newAcc.Remove(key, element1) + _, _ = newAcc.Remove(key, element2) +} + + +func TestUpdate(t *testing.T) { + curve := curves.BLS12381(&curves.PointBls12381G1{}) + var seed [32]byte + key, err := new(zk.SecretKey).New(curve, seed[:]) + require.NoError(t, err) + require.NotNil(t, key) + acc, err := new(zk.Accumulator).New(curve) + require.NoError(t, err) + require.NotNil(t, acc) + + element1 := curve.Scalar.Hash([]byte("value1")) + element2 := curve.Scalar.Hash([]byte("value2")) + element3 := curve.Scalar.Hash([]byte("value3")) + elements := []zk.Element{element1, element2, element3} + + acc, _, err = acc.Update(key, elements, nil) + require.NoError(t, err) + + acc, _, err = acc.Update(key, nil, elements) + require.NoError(t, err) +} diff --git a/pkg/cache/cache.go b/pkg/cache/cache.go new file mode 100644 index 000000000..ad115d788 --- /dev/null +++ b/pkg/cache/cache.go @@ -0,0 +1,149 @@ +package cache + +import ( + "bytes" + "encoding/gob" + "errors" + "os" + "path/filepath" + "strings" + "time" + + bolt "go.etcd.io/bbolt" +) + +var ErrorNotFound = errors.New("no value was found with the provided key") + +// Storage is meant to be passed around and used by the New function (which provides namespacing and type-safety). +type Storage struct { + storagePath string +} + +// Cache is a namespaced and type-safe key-value store. +type Cache[T any] struct { + storage Storage + namespace string +} + +// NewStorage sets up the storage needed for later cache usage +// path is the full path (including filename) to the database file to use. +// It does not need to be closed as this happens automatically in each call to the cache. +func NewStorage(path string) (Storage, error) { + if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil { + return Storage{}, err + } + + return Storage{path}, nil +} + +// New creates a namespaced and typesafe key-value Cache. +func New[T any](storage Storage, namespace string) Cache[T] { + return Cache[T]{ + storage: storage, + namespace: namespace, + } +} + +// Key creates a single composite key from a list of keyParts. +func Key(keyParts ...string) string { + return strings.Join(keyParts, "") +} + +// Clear deletes all namespaces and cached values. +func (s Storage) Clear() error { + db, err := openDB(s.storagePath) + if err != nil { + return err + } + defer db.Close() + + return db.Update(func(tx *bolt.Tx) error { + return tx.ForEach(func(name []byte, _ *bolt.Bucket) error { + return tx.DeleteBucket(name) + }) + }) +} + +// Put sets key to value within the namespace +// If the key already exists, it will be overwritten. +func (c Cache[T]) Put(key string, value T) error { + db, err := openDB(c.storage.storagePath) + if err != nil { + return err + } + defer db.Close() + + var buf bytes.Buffer + encoder := gob.NewEncoder(&buf) + if err := encoder.Encode(value); err != nil { + return err + } + result := buf.Bytes() + + return db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucketIfNotExists([]byte(c.namespace)) + if err != nil { + return err + } + return b.Put([]byte(key), result) + }) +} + +// Get fetches the value of key within the namespace. +// If no value exists, it will return found == false. +func (c Cache[T]) Get(key string) (val T, err error) { + db, err := openDB(c.storage.storagePath) + if err != nil { + return val, err + } + defer db.Close() + + err = db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte(c.namespace)) + if b == nil { + return ErrorNotFound + } + c := b.Cursor() + if k, v := c.Seek([]byte(key)); bytes.Equal(k, []byte(key)) { + if v == nil { + return ErrorNotFound + } + + var decodedVal T + d := gob.NewDecoder(bytes.NewReader(v)) + if err := d.Decode(&decodedVal); err != nil { + return err + } + + val = decodedVal + } else { + return ErrorNotFound + } + + return nil + }) + + return val, err +} + +// Delete removes a value for key within the namespace. +func (c Cache[T]) Delete(key string) error { + db, err := openDB(c.storage.storagePath) + if err != nil { + return err + } + defer db.Close() + + return db.Update(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte(c.namespace)) + if b == nil { + return nil + } + + return b.Delete([]byte(key)) + }) +} + +func openDB(path string) (*bolt.DB, error) { + return bolt.Open(path, 0o640, &bolt.Options{Timeout: 1 * time.Minute}) +} diff --git a/pkg/cache/cache_test.go b/pkg/cache/cache_test.go new file mode 100644 index 000000000..f8f46d91d --- /dev/null +++ b/pkg/cache/cache_test.go @@ -0,0 +1,170 @@ +package cache_test + +import ( + "path/filepath" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/sonr-io/core/pkg/cache" +) + +type TestStruct struct { + Num int +} + +func TestCreateStorage(t *testing.T) { + tmpDir1 := t.TempDir() + tmpDir2 := t.TempDir() + + _, err := cache.NewStorage(filepath.Join(tmpDir1, "test.db")) + require.NoError(t, err) + + _, err = cache.NewStorage(filepath.Join(tmpDir2, "test.db")) + require.NoError(t, err) +} + +func TestStoreString(t *testing.T) { + tmpDir := t.TempDir() + cacheStorage, err := cache.NewStorage(filepath.Join(tmpDir, "testdbfile.db")) + require.NoError(t, err) + + strNamespace := cache.New[string](cacheStorage, "myNameSpace") + + err = strNamespace.Put("myKey", "myValue") + require.NoError(t, err) + + val, err := strNamespace.Get("myKey") + require.NoError(t, err) + require.Equal(t, "myValue", val) + + strNamespaceAgain := cache.New[string](cacheStorage, "myNameSpace") + + valAgain, err := strNamespaceAgain.Get("myKey") + require.NoError(t, err) + require.Equal(t, "myValue", valAgain) +} + +func TestStoreObjects(t *testing.T) { + tmpDir := t.TempDir() + cacheStorage, err := cache.NewStorage(filepath.Join(tmpDir, "testdbfile.db")) + require.NoError(t, err) + + structCache := cache.New[TestStruct](cacheStorage, "mySimpleNamespace") + + err = structCache.Put("myKey", TestStruct{ + Num: 42, + }) + require.NoError(t, err) + + val, err := structCache.Get("myKey") + require.NoError(t, err) + require.Equal(t, val, TestStruct{ + Num: 42, + }) + + arrayNamespace := cache.New[[]TestStruct](cacheStorage, "myArrayNamespace") + + err = arrayNamespace.Put("myKey", []TestStruct{ + { + Num: 42, + }, + { + Num: 420, + }, + }) + require.NoError(t, err) + + val2, err := arrayNamespace.Get("myKey") + require.NoError(t, err) + require.Equal(t, 2, len(val2)) + require.Equal(t, 42, (val2)[0].Num) + require.Equal(t, 420, (val2)[1].Num) + + empty, err := arrayNamespace.Get("doesNotExists") + require.Equal(t, cache.ErrorNotFound, err) + require.Nil(t, empty) +} + +func TestConflicts(t *testing.T) { + tmpDir := t.TempDir() + tmpDir2 := t.TempDir() + cacheStorage1, err := cache.NewStorage(filepath.Join(tmpDir, "testdbfile.db")) + require.NoError(t, err) + cacheStorage2, err := cache.NewStorage(filepath.Join(tmpDir2, "testdbfile.db")) + require.NoError(t, err) + + sameStorageDifferentNamespaceCache1 := cache.New[int](cacheStorage1, "ns1") + + sameStorageDifferentNamespaceCache2 := cache.New[int](cacheStorage1, "ns2") + + differentStorageSameNamespace := cache.New[int](cacheStorage2, "ns1") + + // Put values in caches + err = sameStorageDifferentNamespaceCache1.Put("myKey", 41) + require.NoError(t, err) + + err = sameStorageDifferentNamespaceCache2.Put("myKey", 1337) + require.NoError(t, err) + + err = differentStorageSameNamespace.Put("myKey", 9001) + require.NoError(t, err) + + // Overwrite a value + err = sameStorageDifferentNamespaceCache1.Put("myKey", 42) + require.NoError(t, err) + + // Check that everything comes back as expected + val1, err := sameStorageDifferentNamespaceCache1.Get("myKey") + require.NoError(t, err) + require.Equal(t, 42, val1) + + val2, err := sameStorageDifferentNamespaceCache2.Get("myKey") + require.NoError(t, err) + require.Equal(t, 1337, val2) + + val3, err := differentStorageSameNamespace.Get("myKey") + require.NoError(t, err) + require.Equal(t, 9001, val3) +} + +func TestDeleteKey(t *testing.T) { + tmpDir := t.TempDir() + cacheStorage, err := cache.NewStorage(filepath.Join(tmpDir, "testdbfile.db")) + require.NoError(t, err) + + strNamespace := cache.New[string](cacheStorage, "myNameSpace") + err = strNamespace.Put("myKey", "someValue") + require.NoError(t, err) + + err = strNamespace.Delete("myKey") + require.NoError(t, err) + + _, err = strNamespace.Get("myKey") + require.Equal(t, cache.ErrorNotFound, err) +} + +func TestClearStorage(t *testing.T) { + tmpDir := t.TempDir() + cacheStorage, err := cache.NewStorage(filepath.Join(tmpDir, "testdbfile.db")) + require.NoError(t, err) + + strNamespace := cache.New[string](cacheStorage, "myNameSpace") + + err = strNamespace.Put("myKey", "myValue") + require.NoError(t, err) + + err = cacheStorage.Clear() + require.NoError(t, err) + + _, err = strNamespace.Get("myKey") + require.Equal(t, cache.ErrorNotFound, err) +} + +func TestKey(t *testing.T) { + singleKey := cache.Key("test1") + require.Equal(t, "test1", singleKey) + + multiKey := cache.Key("test1", "test2", "test3") + require.Equal(t, "test1test2test3", multiKey) +} diff --git a/pkg/clictx/clictx.go b/pkg/clictx/clictx.go new file mode 100755 index 000000000..46b09db8e --- /dev/null +++ b/pkg/clictx/clictx.go @@ -0,0 +1,34 @@ +package clictx + +import ( + "context" + "os" + "os/signal" +) + +// From creates a new context from ctx that is canceled when an exit signal received. +func From(ctx context.Context) context.Context { + var ( + ctxend, cancel = context.WithCancel(ctx) + quit = make(chan os.Signal, 1) + ) + signal.Notify(quit, os.Interrupt) + go func() { + <-quit + cancel() + }() + return ctxend +} + +// Do runs fn and waits for its result unless ctx is canceled. +// Returns fn result or canceled context error. +func Do(ctx context.Context, fn func() error) error { + errc := make(chan error) + go func() { errc <- fn() }() + select { + case err := <-errc: + return err + case <-ctx.Done(): + return ctx.Err() + } +} diff --git a/pkg/cliui/cliquiz/question.go b/pkg/cliui/cliquiz/question.go new file mode 100755 index 000000000..48b38a6bd --- /dev/null +++ b/pkg/cliui/cliquiz/question.go @@ -0,0 +1,210 @@ +// Package cliquiz is a tool to collect answers from the users on cli. +package cliquiz + +import ( + "context" + "errors" + "fmt" + "reflect" + "strings" + + "github.com/AlecAivazis/survey/v2" + "github.com/AlecAivazis/survey/v2/terminal" + "github.com/spf13/pflag" +) + +// ErrConfirmationFailed is returned when second answer is not the same with first one. +var ErrConfirmationFailed = errors.New("failed to confirm, your answers were different") + +// Question holds information on what to ask user and where +// the answer stored at. +type Question struct { + question string + defaultAnswer interface{} + answer interface{} + hidden bool + shouldConfirm bool + required bool +} + +// Option configures Question. +type Option func(*Question) + +// DefaultAnswer sets a default answer to Question. +func DefaultAnswer(answer interface{}) Option { + return func(q *Question) { + q.defaultAnswer = answer + } +} + +// Required marks the answer as required. +func Required() Option { + return func(q *Question) { + q.required = true + } +} + +// HideAnswer hides the answer to prevent secret information being leaked. +func HideAnswer() Option { + return func(q *Question) { + q.hidden = true + } +} + +// GetConfirmation prompts confirmation for the given answer. +func GetConfirmation() Option { + return func(q *Question) { + q.shouldConfirm = true + } +} + +// NewQuestion creates a new question. +func NewQuestion(question string, answer interface{}, options ...Option) Question { + q := Question{ + question: question, + answer: answer, + } + for _, o := range options { + o(&q) + } + return q +} + +func ask(q Question) error { + var prompt survey.Prompt + + if !q.hidden { + input := &survey.Input{ + Message: q.question, + } + if !q.required { + input.Message += " (optional)" + } + if q.defaultAnswer != nil { + input.Default = fmt.Sprintf("%v", q.defaultAnswer) + } + prompt = input + } else { + prompt = &survey.Password{ + Message: q.question, + } + } + + if err := survey.AskOne(prompt, q.answer); err != nil { + return err + } + + isValid := func() bool { + if answer, ok := q.answer.(string); ok { + if strings.TrimSpace(answer) == "" { + return false + } + } + if reflect.ValueOf(q.answer).Elem().IsZero() { + return false + } + return true + } + + if q.required && !isValid() { + fmt.Println("This information is required, please retry:") + + if err := ask(q); err != nil { + return err + } + } + + return nil +} + +// Ask asks questions and collect answers. +func Ask(question ...Question) (err error) { + defer func() { + if errors.Is(err, terminal.InterruptErr) { + err = context.Canceled + } + }() + + for _, q := range question { + if err := ask(q); err != nil { + return err + } + + if q.shouldConfirm { + var secondAnswer string + + var options []Option + if q.required { + options = append(options, Required()) + } + if q.hidden { + options = append(options, HideAnswer()) + } + if err := ask(NewQuestion("Confirm "+q.question, &secondAnswer, options...)); err != nil { + return err + } + + t := reflect.TypeOf(secondAnswer) + compAnswer := reflect.ValueOf(q.answer).Elem().Convert(t).String() + if secondAnswer != compAnswer { + return ErrConfirmationFailed + } + } + } + return nil +} + +// Flag represents a cmd flag. +type Flag struct { + Name string + IsRequired bool +} + +// NewFlag creates a new flag. +func NewFlag(name string, isRequired bool) Flag { + return Flag{name, isRequired} +} + +// ValuesFromFlagsOrAsk returns values of flags within map[string]string where map's +// key is the name of the flag and value is flag's value. +// when provided, values are collected through command otherwise they're asked by prompting user. +// title used as a message while prompting. +func ValuesFromFlagsOrAsk(fset *pflag.FlagSet, title string, flags ...Flag) (values map[string]string, err error) { + values = make(map[string]string) + + answers := make(map[string]*string) + var questions []Question + + for _, f := range flags { + flag := fset.Lookup(f.Name) + if flag == nil { + return nil, fmt.Errorf("flag %q is not defined", f.Name) + } + if value, _ := fset.GetString(f.Name); value != "" { + values[f.Name] = value + continue + } + + var value string + answers[f.Name] = &value + + var options []Option + if f.IsRequired { + options = append(options, Required()) + } + questions = append(questions, NewQuestion(flag.Usage, &value, options...)) + } + + if len(questions) > 0 && title != "" { + fmt.Println(title) + } + if err := Ask(questions...); err != nil { + return values, err + } + + for name, answer := range answers { + values[name] = *answer + } + + return values, nil +} diff --git a/pkg/cliui/clispinner/clispinner.go b/pkg/cliui/clispinner/clispinner.go new file mode 100755 index 000000000..1a5c628a4 --- /dev/null +++ b/pkg/cliui/clispinner/clispinner.go @@ -0,0 +1,118 @@ +package clispinner + +import ( + "io" + "time" + + "github.com/briandowns/spinner" +) + +// DefaultText defines the default spinner text. +const DefaultText = "Initializing..." + +var ( + refreshRate = time.Millisecond * 200 + charset = spinner.CharSets[4] + spinnerColor = "blue" +) + +type Spinner struct { + sp *spinner.Spinner +} + +type ( + Option func(*Options) + + Options struct { + writer io.Writer + text string + } +) + +// WithWriter configures an output for a spinner. +func WithWriter(w io.Writer) Option { + return func(options *Options) { + options.writer = w + } +} + +// WithText configures the spinner text. +func WithText(text string) Option { + return func(options *Options) { + options.text = text + } +} + +// New creates a new spinner. +func New(options ...Option) *Spinner { + o := Options{} + for _, apply := range options { + apply(&o) + } + + text := o.text + if text == "" { + text = DefaultText + } + + spOptions := []spinner.Option{ + spinner.WithColor(spinnerColor), + spinner.WithSuffix(" " + text), + } + + if o.writer != nil { + spOptions = append(spOptions, spinner.WithWriter(o.writer)) + } + + return &Spinner{ + sp: spinner.New(charset, refreshRate, spOptions...), + } +} + +// SetText sets the text for spinner. +func (s *Spinner) SetText(text string) *Spinner { + s.sp.Lock() + s.sp.Suffix = " " + text + s.sp.Unlock() + return s +} + +// SetPrefix sets the prefix for spinner. +func (s *Spinner) SetPrefix(text string) *Spinner { + s.sp.Lock() + s.sp.Prefix = text + " " + s.sp.Unlock() + return s +} + +// SetCharset sets the prefix for spinner. +func (s *Spinner) SetCharset(charset []string) *Spinner { + s.sp.UpdateCharSet(charset) + return s +} + +// SetColor sets the prefix for spinner. +func (s *Spinner) SetColor(color string) *Spinner { + s.sp.Color(color) + return s +} + +// Start starts spinning. +func (s *Spinner) Start() *Spinner { + s.sp.Start() + return s +} + +// Stop stops spinning. +func (s *Spinner) Stop() *Spinner { + s.sp.Stop() + s.sp.Prefix = "" + s.sp.Color(spinnerColor) + s.sp.UpdateCharSet(charset) + s.sp.Stop() + return s +} + +func (s *Spinner) IsActive() bool { + return s.sp.Active() +} diff --git a/pkg/cliui/cliui.go b/pkg/cliui/cliui.go new file mode 100755 index 000000000..8e00ae90a --- /dev/null +++ b/pkg/cliui/cliui.go @@ -0,0 +1,299 @@ +package cliui + +import ( + "fmt" + "io" + "os" + "sync" + + "github.com/manifoldco/promptui" + + "github.com/sonr-io/core/pkg/cliui/cliquiz" + "github.com/sonr-io/core/pkg/cliui/clispinner" + "github.com/sonr-io/core/pkg/cliui/entrywriter" + uilog "github.com/sonr-io/core/pkg/cliui/log" + "github.com/sonr-io/core/pkg/events" +) + +type sessionOptions struct { + stdin io.ReadCloser + stdout io.WriteCloser + stderr io.WriteCloser + + spinnerStart bool + spinnerText string + + ignoreEvents bool + verbosity uilog.Verbosity +} + +// Session controls command line interaction with users. +type Session struct { + options sessionOptions + ev events.Bus + spinner *clispinner.Spinner + out uilog.Output + wg *sync.WaitGroup + ended bool +} + +// Option configures session options. +type Option func(s *Session) + +// WithStdout sets the starndard output for the session. +func WithStdout(stdout io.WriteCloser) Option { + return func(s *Session) { + s.options.stdout = stdout + } +} + +// WithStderr sets base stderr for a Session. +func WithStderr(stderr io.WriteCloser) Option { + return func(s *Session) { + s.options.stderr = stderr + } +} + +// WithStdin sets the starndard input for the session. +func WithStdin(stdin io.ReadCloser) Option { + return func(s *Session) { + s.options.stdin = stdin + } +} + +// WithVerbosity sets a verbosity level for the Session. +func WithVerbosity(v uilog.Verbosity) Option { + return func(s *Session) { + s.options.verbosity = v + } +} + +// IgnoreEvents configures the session to avoid displaying events. +// This is a compatibility option to be able to use the session and +// the events bus when models are used to manage CLI UI. The session +// won't handle the events when this option is present. +func IgnoreEvents() Option { + return func(s *Session) { + s.options.ignoreEvents = true + } +} + +// StartSpinner forces spinner to be spinning right after creation. +func StartSpinner() Option { + return func(s *Session) { + s.options.spinnerStart = true + } +} + +// StartSpinnerWithText forces spinner to be spinning right after creation +// with a custom status text. +func StartSpinnerWithText(text string) Option { + return func(s *Session) { + s.options.spinnerStart = true + s.options.spinnerText = text + } +} + +// New creates a new Session. +func New(options ...Option) *Session { + session := Session{ + ev: events.NewBus(), + wg: &sync.WaitGroup{}, + options: sessionOptions{ + stdin: os.Stdin, + stdout: os.Stdout, + stderr: os.Stderr, + spinnerText: clispinner.DefaultText, + }, + } + + for _, apply := range options { + apply(&session) + } + + logOptions := []uilog.Option{ + uilog.WithStdout(session.options.stdout), + uilog.WithStderr(session.options.stderr), + } + + if session.options.verbosity == uilog.VerbosityVerbose { + logOptions = append(logOptions, uilog.Verbose()) + } + + session.out = uilog.NewOutput(logOptions...) + + if session.options.spinnerStart { + session.StartSpinner(session.options.spinnerText) + } + + // The main loop that prints the events uses a wait group to block + // the session end until all the events are printed. + if !session.options.ignoreEvents { + session.wg.Add(1) + go session.handleEvents() + } + + return &session +} + +// EventBus returns the event bus of the session. +func (s Session) EventBus() events.Bus { + return s.ev +} + +// Verbosity returns the verbosity level for the session output. +func (s Session) Verbosity() uilog.Verbosity { + return s.options.verbosity +} + +// NewOutput returns a new logging output bound to the session. +// The new output will use the session's verbosity, stderr and stdout. +// Label and color arguments are used to prefix the output when the +// session verbosity is verbose. +func (s Session) NewOutput(label, color string) uilog.Output { + options := []uilog.Option{ + uilog.WithStdout(s.options.stdout), + uilog.WithStderr(s.options.stderr), + } + + if s.options.verbosity == uilog.VerbosityVerbose { + options = append(options, uilog.CustomVerbose(label, color)) + } + + return uilog.NewOutput(options...) +} + +// StartSpinner starts the spinner. +func (s *Session) StartSpinner(text string) { + if s.options.ignoreEvents { + return + } + + // Verbose mode must not render the spinner but instead + // it should just print the text to display next to the + // app label otherwise the verbose logs would be printed + // with an invalid format. + if s.options.verbosity == uilog.VerbosityVerbose { + fmt.Fprint(s.out.Stdout(), text) + return + } + + if s.spinner == nil { + s.spinner = clispinner.New(clispinner.WithWriter(s.out.Stdout())) + } + + s.spinner.SetText(text).Start() +} + +// StopSpinner stops the spinner. +func (s Session) StopSpinner() { + if s.spinner == nil { + return + } + + s.spinner.Stop() +} + +// PauseSpinner pauses spinner and returns a function to restart the spinner. +func (s Session) PauseSpinner() (restart func()) { + isActive := s.spinner != nil && s.spinner.IsActive() + if isActive { + s.spinner.Stop() + } + + return func() { + if isActive { + s.spinner.Start() + } + } +} + +// Printf prints formatted arbitrary message. +func (s Session) Printf(format string, a ...interface{}) error { + defer s.PauseSpinner()() + _, err := fmt.Fprintf(s.out.Stdout(), format, a...) + return err +} + +// Println prints arbitrary message with line break. +func (s Session) Println(messages ...interface{}) error { + defer s.PauseSpinner()() + _, err := fmt.Fprintln(s.out.Stdout(), messages...) + return err +} + +// Print prints arbitrary message. +func (s Session) Print(messages ...interface{}) error { + defer s.PauseSpinner()() + _, err := fmt.Fprint(s.out.Stdout(), messages...) + return err +} + +// Ask asks questions in the terminal and collect answers. +func (s Session) Ask(questions ...cliquiz.Question) error { + defer s.PauseSpinner()() + // TODO provide writer from the session + return cliquiz.Ask(questions...) +} + +// AskConfirm asks yes/no question in the terminal. +func (s Session) AskConfirm(message string) error { + defer s.PauseSpinner()() + prompt := promptui.Prompt{ + Label: message, + IsConfirm: true, + Stdout: s.out.Stdout(), + Stdin: s.options.stdin, + } + _, err := prompt.Run() + return err +} + +// PrintTable prints table data. +func (s Session) PrintTable(header []string, entries ...[]string) error { + defer s.PauseSpinner()() + return entrywriter.MustWrite(s.out.Stdout(), header, entries...) +} + +// End finishes the session by stopping the spinner and the event bus. +// Once the session is ended it should not be used anymore. +func (s *Session) End() { + if s.ended { + return + } + + s.StopSpinner() + s.ev.Stop() + s.wg.Wait() + s.ended = true +} + +func (s *Session) handleEvents() { + defer s.wg.Done() + + stdout := s.out.Stdout() + + for e := range s.ev.Events() { + switch e.ProgressIndication { + case events.IndicationStart: + s.StartSpinner(e.String()) + case events.IndicationUpdate: + if s.spinner == nil { + // When the spinner is not initialized print the event + fmt.Fprintf(stdout, "%s\n", e) + } else { + // Otherwise update the spinner with a new text + s.spinner.SetText(e.String()) + } + case events.IndicationFinish: + s.StopSpinner() + fmt.Fprintf(stdout, "%s\n", e) + case events.IndicationNone: + default: + // The text printed here won't be removed when the spinner stops + resume := s.PauseSpinner() + fmt.Fprintf(stdout, "%s\n", e) + resume() + } + } +} diff --git a/pkg/cliui/colors/colors.go b/pkg/cliui/colors/colors.go new file mode 100755 index 000000000..6b53f41c9 --- /dev/null +++ b/pkg/cliui/colors/colors.go @@ -0,0 +1,71 @@ +package colors + +import ( + "fmt" + + "github.com/charmbracelet/lipgloss" +) + +const ( + Yellow = "#c4a000" + Red = "#ef2929" + Green = "#4e9a06" + Magenta = "#75507b" + Cyan = "#34e2e2" + White = "#FFFFFF" + HiBlue = "#729FCF" +) + +var ( + info = lipgloss.NewStyle().Foreground(lipgloss.Color(Yellow)) + infof = lipgloss.NewStyle().Foreground(lipgloss.Color(Yellow)) + err = lipgloss.NewStyle().Foreground(lipgloss.Color(Red)) + success = lipgloss.NewStyle().Foreground(lipgloss.Color(Green)) + modified = lipgloss.NewStyle().Foreground(lipgloss.Color(Magenta)) + name = lipgloss.NewStyle().Bold(true) + mnemonic = lipgloss.NewStyle().Foreground(lipgloss.Color(HiBlue)) + faint = lipgloss.NewStyle().Faint(true) +) + +// SprintFunc returns a function to apply a foreground color to any number of texts. +// The returned function receives strings as arguments with the text that should be colorized. +// Color specifies a color by hex or ANSI value. +func SprintFunc(color string) func(i ...interface{}) string { + return func(i ...interface{}) string { + style := lipgloss.NewStyle().Foreground(lipgloss.Color(color)) + return style.Render(fmt.Sprint(i...)) + } +} + +func Info(i ...interface{}) string { + return info.Render(fmt.Sprint(i...)) +} + +func Infof(format string, i ...interface{}) string { + return infof.Render(fmt.Sprintf(format, i...)) +} + +func Error(i ...interface{}) string { + return err.Render(fmt.Sprint(i...)) +} + +func Success(i ...interface{}) string { + return success.Render(fmt.Sprint(i...)) +} + +func Modified(i ...interface{}) string { + return modified.Render(fmt.Sprint(i...)) +} + +func Name(i ...interface{}) string { + return name.Render(fmt.Sprint(i...)) +} + +func Mnemonic(i ...interface{}) string { + return mnemonic.Render(fmt.Sprint(i...)) +} + +// Faint styles the text using a dimmer shade for the foreground color. +func Faint(i ...interface{}) string { + return faint.Render(fmt.Sprint(i...)) +} diff --git a/pkg/cliui/entrywriter/entrywriter.go b/pkg/cliui/entrywriter/entrywriter.go new file mode 100755 index 000000000..566aaeb66 --- /dev/null +++ b/pkg/cliui/entrywriter/entrywriter.go @@ -0,0 +1,66 @@ +package entrywriter + +import ( + "fmt" + "io" + "text/tabwriter" + + "github.com/pkg/errors" + + "github.com/sonr-io/core/pkg/xstrings" +) + +const ( + None = "-" +) + +var ErrInvalidFormat = errors.New("invalid entry format") + +// MustWrite writes into out the tabulated entries and panic if the entry format is invalid. +func MustWrite(out io.Writer, header []string, entries ...[]string) error { + err := Write(out, header, entries...) + if errors.Is(err, ErrInvalidFormat) { + panic(err) + } + return err +} + +// Write writes into out the tabulated entries. +func Write(out io.Writer, header []string, entries ...[]string) error { + w := &tabwriter.Writer{} + w.Init(out, 0, 8, 0, '\t', 0) + + formatLine := func(line []string, title bool) (formatted string) { + for _, cell := range line { + if title { + cell = xstrings.Title(cell) + } + formatted += fmt.Sprintf("%s \t", cell) + } + return formatted + } + + if len(header) == 0 { + return errors.Wrap(ErrInvalidFormat, "empty header") + } + + // write header + if _, err := fmt.Fprintln(w, formatLine(header, true)); err != nil { + return err + } + + // write entries + for i, entry := range entries { + if len(entry) != len(header) { + return errors.Wrapf(ErrInvalidFormat, "entry %d doesn't match header length", i) + } + if _, err := fmt.Fprintf(w, formatLine(entry, false)+"\n"); err != nil { + return err + } + } + + if _, err := fmt.Fprintln(w); err != nil { + return err + } + return w.Flush() +} diff --git a/pkg/cliui/entrywriter/entrywriter_test.go b/pkg/cliui/entrywriter/entrywriter_test.go new file mode 100755 index 000000000..3193304e6 --- /dev/null +++ b/pkg/cliui/entrywriter/entrywriter_test.go @@ -0,0 +1,40 @@ +package entrywriter_test + +import ( + "errors" + "io" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/sonr-io/core/pkg/cliui/entrywriter" +) + +type WriterWithError struct{} + +func (WriterWithError) Write(_ []byte) (n int, err error) { + return 0, errors.New("writer with error") +} + +func TestWrite(t *testing.T) { + header := []string{"foobar", "bar", "foo"} + + entries := [][]string{ + {"foo", "bar", "foobar"}, + {"bar", "foobar", "foo"}, + {"foobar", "foo", "bar"}, + } + + require.NoError(t, entrywriter.Write(io.Discard, header, entries...)) + require.NoError(t, entrywriter.Write(io.Discard, header), "should allow no entry") + + err := entrywriter.Write(io.Discard, []string{}) + require.ErrorIs(t, err, entrywriter.ErrInvalidFormat, "should prevent no header") + + entries[0] = []string{"foo", "bar"} + err = entrywriter.Write(io.Discard, header, entries...) + require.ErrorIs(t, err, entrywriter.ErrInvalidFormat, "should prevent entry length mismatch") + + var wErr WriterWithError + require.Error(t, entrywriter.Write(wErr, header, entries...), "should catch writer errors") +} diff --git a/pkg/cliui/icons/icon.go b/pkg/cliui/icons/icon.go new file mode 100755 index 000000000..3c613e1e4 --- /dev/null +++ b/pkg/cliui/icons/icon.go @@ -0,0 +1,22 @@ +package icons + +import ( + "github.com/sonr-io/core/pkg/cliui/colors" +) + +var ( + Earth = "๐ŸŒ" + CD = "๐Ÿ’ฟ" + User = "๐Ÿ‘ค" + Command = "โฏโŽฏ" + Hook = "๐Ÿช" + + // OK is an OK mark. + OK = colors.SprintFunc(colors.Green)("โœ”") + // NotOK is a red cross mark. + NotOK = colors.SprintFunc(colors.Red)("โœ˜") + // Bullet is a bullet mark. + Bullet = colors.SprintFunc(colors.Yellow)("โ‹†") + // Info is an info mark. + Info = colors.SprintFunc(colors.Yellow)("๐“ฒ") +) diff --git a/pkg/cliui/lineprefixer/lineprefixer.go b/pkg/cliui/lineprefixer/lineprefixer.go new file mode 100755 index 000000000..578d9de78 --- /dev/null +++ b/pkg/cliui/lineprefixer/lineprefixer.go @@ -0,0 +1,48 @@ +// Package lineprefixer is a helpers to add prefixes to new lines. +package lineprefixer + +import ( + "bytes" + "io" +) + +// Writer is a prefixed line writer. +type Writer struct { + prefix func() string + w io.Writer + shouldPrefix bool +} + +// NewWriter returns a new Writer that adds prefixes to each line +// written. It then writes prefixed data stream into w. +func NewWriter(w io.Writer, prefix func() string) *Writer { + return &Writer{ + prefix: prefix, + w: w, + shouldPrefix: true, + } +} + +// Write implements io.Writer. +func (p *Writer) Write(b []byte) (n int, err error) { + var ( + numBytes = len(b) + lastChar = b[numBytes-1] + newLine = byte('\n') + snewLine = []byte{newLine} + replaceCount = bytes.Count(b, snewLine) + prefix = []byte(p.prefix()) + ) + if lastChar == newLine { + replaceCount-- + } + b = bytes.Replace(b, snewLine, append(snewLine, prefix...), replaceCount) + if p.shouldPrefix { + b = append(prefix, b...) + } + p.shouldPrefix = lastChar == newLine + if _, err := p.w.Write(b); err != nil { + return 0, err + } + return numBytes, nil +} diff --git a/pkg/cliui/lineprefixer/lineprefixer_test.go b/pkg/cliui/lineprefixer/lineprefixer_test.go new file mode 100755 index 000000000..5b5470756 --- /dev/null +++ b/pkg/cliui/lineprefixer/lineprefixer_test.go @@ -0,0 +1,27 @@ +package lineprefixer + +import ( + "bytes" + "io" + "strings" + "testing" + + "github.com/stretchr/testify/require" +) + +func TestWriter(t *testing.T) { + logs := `hello, +this +is +Starport!` + buf := bytes.Buffer{} + w := NewWriter(&buf, func() string { return "[TENDERMINT] " }) + _, err := io.Copy(w, strings.NewReader(logs)) + require.NoError(t, err) + require.Equal(t, `[TENDERMINT] hello, +[TENDERMINT] this +[TENDERMINT] is +[TENDERMINT] Starport!`, + buf.String(), + ) +} diff --git a/pkg/cliui/log/output.go b/pkg/cliui/log/output.go new file mode 100755 index 000000000..b4e0b1d9f --- /dev/null +++ b/pkg/cliui/log/output.go @@ -0,0 +1,146 @@ +package uilog + +import ( + "io" + "os" + + "github.com/sonr-io/core/pkg/cliui/colors" + "github.com/sonr-io/core/pkg/cliui/lineprefixer" + "github.com/sonr-io/core/pkg/cliui/prefixgen" + "github.com/sonr-io/core/pkg/xio" +) + +const ( + defaultVerboseLabel = "ignite" + defaultVerboseLabelColor = colors.Red +) + +// Verbosity enumerates possible verbosity levels for CLI output. +type Verbosity uint8 + +const ( + VerbositySilent = iota + VerbosityDefault + VerbosityVerbose +) + +// Outputer defines an interface for logging output creation. +type Outputer interface { + // NewOutput returns a new logging output. + NewOutput(label, color string) Output + + // Verbosity returns the current verbosity level for the logging output. + Verbosity() Verbosity +} + +// Output stores writers for standard output and error. +type Output struct { + verbosity Verbosity + stdout io.WriteCloser + stderr io.WriteCloser +} + +// Stdout returns the standard output writer. +func (o Output) Stdout() io.WriteCloser { + return o.stdout +} + +// Stderr returns the standard error writer. +func (o Output) Stderr() io.WriteCloser { + return o.stderr +} + +// Verbosity returns the log output verbosity. +func (o Output) Verbosity() Verbosity { + return o.verbosity +} + +type option struct { + stdout io.WriteCloser + stderr io.WriteCloser + verbosity Verbosity + verboseLabel string + verboseLabelColor string +} + +// Option configures log output options. +type Option func(*option) + +// Verbose changes the log output to be prefixed with "ignite". +func Verbose() Option { + return func(o *option) { + o.verbosity = VerbosityVerbose + o.verboseLabel = defaultVerboseLabel + o.verboseLabelColor = defaultVerboseLabelColor + } +} + +// CustomVerbose changes the log output to be prefixed with a custom label. +func CustomVerbose(label, color string) Option { + return func(o *option) { + o.verbosity = VerbosityVerbose + o.verboseLabel = label + o.verboseLabelColor = color + } +} + +// Silent creates a log output that doesn't print any of the written lines. +func Silent() Option { + return func(o *option) { + o.verbosity = VerbositySilent + } +} + +// WithStdout sets a custom writer to use instead of the default `os.Stdout`. +func WithStdout(r io.WriteCloser) Option { + return func(o *option) { + o.stdout = r + } +} + +// WithStderr sets a custom writer to use instead of the default `os.Stderr`. +func WithStderr(r io.WriteCloser) Option { + return func(o *option) { + o.stderr = r + } +} + +// NewOutput creates a new log output. +// By default, the new output uses the default OS stdout and stderr to +// initialize the outputs with a default verbosity that doesn't change +// the output. +func NewOutput(options ...Option) (out Output) { + o := option{ + verbosity: VerbosityDefault, + stdout: os.Stdout, + stderr: os.Stderr, + } + + for _, apply := range options { + apply(&o) + } + + out.verbosity = o.verbosity + + switch o.verbosity { + case VerbositySilent: + out.stdout = xio.NopWriteCloser(io.Discard) + out.stderr = xio.NopWriteCloser(io.Discard) + case VerbosityVerbose: + // Function to add a custom prefix to each log output + prefixer := func(w io.Writer) *lineprefixer.Writer { + options := prefixgen.Common(prefixgen.Color(o.verboseLabelColor)) + prefix := prefixgen.New(o.verboseLabel, options...).Gen() + + return lineprefixer.NewWriter(w, func() string { return prefix }) + } + + out.stdout = xio.NopWriteCloser(prefixer(o.stdout)) + out.stderr = xio.NopWriteCloser(prefixer(o.stderr)) + default: + out.stdout = o.stdout + out.stderr = o.stderr + } + + return out +} diff --git a/pkg/cliui/model/events.go b/pkg/cliui/model/events.go new file mode 100755 index 000000000..e8d6fc50c --- /dev/null +++ b/pkg/cliui/model/events.go @@ -0,0 +1,255 @@ +package cliuimodel + +import ( + "container/list" + "fmt" + "strings" + "time" + + "github.com/charmbracelet/bubbles/spinner" + tea "github.com/charmbracelet/bubbletea" + + "github.com/sonr-io/core/pkg/cliui/colors" + "github.com/sonr-io/core/pkg/cliui/icons" + "github.com/sonr-io/core/pkg/events" +) + +// EventMsg defines a message for events. +type EventMsg struct { + events.Event + + Start time.Time + Duration time.Duration +} + +// NewStatusEvents returns a new events model. +func NewStatusEvents(bus events.Provider, maxHistory int) StatusEvents { + return StatusEvents{ + events: list.New(), + spinner: NewSpinner(), + maxHistory: maxHistory, + bus: bus, + } +} + +// StatusEvents defines a model for status events. +// The model renders a view that can be divided in three sections. +// The first one displays the "static" events which are the ones +// that are not status events. The second section displays a spinner +// with the status event that is in progress, and the third one +// displays a list with the past status events. +type StatusEvents struct { + static []events.Event + events *list.List + spinner spinner.Model + maxHistory int + bus events.Provider +} + +func (m *StatusEvents) ClearEvents() { + m.static = nil + m.events.Init() +} + +func (m StatusEvents) Wait() tea.Cmd { + return tea.Batch(spinner.Tick, m.WaitEvent) +} + +func (m StatusEvents) WaitEvent() tea.Msg { + e := <-m.bus.Events() + + return EventMsg{ + Start: time.Now(), + Event: e, + } +} + +func (m StatusEvents) Update(msg tea.Msg) (StatusEvents, tea.Cmd) { + var cmd tea.Cmd + + switch msg := msg.(type) { + case EventMsg: + if msg.InProgress() { + // Save the duration of the current ongoing event before setting a new one + if e := m.events.Front(); e != nil { + evt := e.Value.(EventMsg) + evt.Duration = time.Since(evt.Start) + e.Value = evt + } + + // Add the event to the queue + m.events.PushFront(msg) + + // Only show a reduced history of events + if m.events.Len() > m.maxHistory { + m.events.Remove(m.events.Back()) + } + } else { + // Events that have no progress status are considered static, + // so they will be printed without the spinner and won't be + // removed from the output until the view is removed. + m.static = append(m.static, msg.Event) + } + + // Return a command to wait for the next event + cmd = m.Wait() + default: + // Update the spinner state and get a new tick command + m.spinner, cmd = m.spinner.Update(msg) + } + + return m, cmd +} + +func (m StatusEvents) View() string { + var view strings.Builder + + // Display static events first + for _, evt := range m.static { + view.WriteString(evt.String()) + + if !strings.HasSuffix(evt.Message, "\n") { + view.WriteRune('\n') + } + } + + // Make sure there is a line between the static and status events + if m.static != nil && m.events.Len() > 0 { + view.WriteRune('\n') + } + + // Display status events + if m.events.Len() > 0 { + for e := m.events.Front(); e != nil; e = e.Next() { + evt := e.Value.(EventMsg) + + // The first event is displayed using a spinner + if e.Prev() == nil { + fmt.Fprintf(&view, "%s%s\n", m.spinner.View(), evt) + + if e.Next() != nil { + view.WriteRune('\n') + } + + continue + } + + // Display finished status event + d := evt.Duration.Round(time.Second) + s := strings.TrimSuffix(evt.String(), "...") + + fmt.Fprintf(&view, "%s %s %s\n", icons.OK, s, colors.Faint(d.String())) + } + } + + return view.String() +} + +// NewEvents returns a new events model. +func NewEvents(bus events.Provider) Events { + return Events{ + events: list.New(), + bus: bus, + spinner: NewSpinner(), + } +} + +// Events defines a model for events. +// The model renders a view that prints all received events one after +// the other. Status events are displayed with a spinner and removed +// from the list once they finish. +type Events struct { + events *list.List + bus events.Provider + spinner spinner.Model +} + +func (m *Events) ClearEvents() { + m.events.Init() +} + +func (m Events) Wait() tea.Cmd { + // Check if the last added event is a status event + // and if so make sure that the spinner is updated. + if e := m.events.Back(); e != nil { + if evt := e.Value.(events.Event); evt.InProgress() { + return tea.Batch(spinner.Tick, m.WaitEvent) + } + } + + // By default, just wait until the next event is received + return m.WaitEvent +} + +func (m Events) WaitEvent() tea.Msg { + e := <-m.bus.Events() + + return EventMsg{ + Event: e, + Start: time.Now(), + } +} + +func (m Events) Update(msg tea.Msg) (Events, tea.Cmd) { + var cmd tea.Cmd + + switch msg := msg.(type) { + case EventMsg: + // Remove the last event if is a status one. + // Status events must always be the last event in the list so the + // spinner is displayed at the bottom and not in between events. + // They are removed when another status event is received. + if e := m.events.Back(); e != nil { + if evt := e.Value.(events.Event); evt.InProgress() { + m.events.Remove(e) + } + } + + // Append event at the end of the list + m.events.PushBack(msg.Event) + + // Return a command to wait for the next event + cmd = m.Wait() + default: + // Update the spinner state and get a new tick command + m.spinner, cmd = m.spinner.Update(msg) + } + + return m, cmd +} + +func (m Events) View() string { + var ( + view strings.Builder + group string + ) + + // Display the list of events + for e := m.events.Front(); e != nil; e = e.Next() { + evt := e.Value.(events.Event) + + // Add an empty line when the event group changes but omit it + // for the first event to avoid adding an initial empty line. + if group != evt.Group && e.Prev() != nil { + // Update the group being displayed + group = evt.Group + + view.WriteRune('\n') + } + + if e.Next() == nil && evt.InProgress() { + // When the event is the last one and is a status event display a spinner... + fmt.Fprintf(&view, "\n%s%s", m.spinner.View(), evt) + } else { + // Otherwise display the event without the spinner + view.WriteString(evt.String()) + } + + // Make sure that events have an EOL, so they are displayed right below each other + if !strings.HasSuffix(evt.Message, "\n") { + view.WriteRune('\n') + } + } + + return view.String() +} diff --git a/pkg/cliui/model/events_test.go b/pkg/cliui/model/events_test.go new file mode 100755 index 000000000..a8ab79f95 --- /dev/null +++ b/pkg/cliui/model/events_test.go @@ -0,0 +1,88 @@ +package cliuimodel_test + +import ( + "fmt" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/sonr-io/core/pkg/cliui/colors" + "github.com/sonr-io/core/pkg/cliui/icons" + cliuimodel "github.com/sonr-io/core/pkg/cliui/model" + "github.com/sonr-io/core/pkg/events" +) + +func TestStatusEventsView(t *testing.T) { + // Arrange + spinner := cliuimodel.NewSpinner() + queue := []string{"Event 1...", "Event 2..."} + model := cliuimodel.NewStatusEvents(dummyEventsProvider{}, len(queue)) + want := fmt.Sprintf( + "Static event\n\n%s%s\n\n%s %s %s\n", + spinner.View(), + queue[1], + icons.OK, + strings.TrimSuffix(queue[0], "..."), + colors.Faint("0s"), + ) + + // Arrange: Update model with status events + for _, s := range queue { + model, _ = model.Update(cliuimodel.EventMsg{ + Event: events.New(s, events.ProgressStart()), + Start: time.Now(), + }) + } + + // Arrange: Add one static event + model, _ = model.Update(cliuimodel.EventMsg{ + Event: events.New("Static event"), + }) + + // Act + view := model.View() + + // Assert + require.Equal(t, want, view) +} + +func TestEventsView(t *testing.T) { + // Arrange + spinner := cliuimodel.NewSpinner() + model := cliuimodel.NewEvents(dummyEventsProvider{}) + queue := []string{"Event 1", "Event 2"} + want := fmt.Sprintf( + "%s\n%s\n\n%sStatus Event...\n", + queue[0], + queue[1], + spinner.View(), + ) + + // Arrange: Update model with events + for _, s := range queue { + model, _ = model.Update(cliuimodel.EventMsg{ + Event: events.New(s), + }) + } + + // Arrange: Add one status event + model, _ = model.Update(cliuimodel.EventMsg{ + Event: events.New("Status Event...", events.ProgressStart()), + }) + + // Act + view := model.View() + + // Assert + require.Equal(t, want, view) +} + +type dummyEventsProvider struct{} + +func (dummyEventsProvider) Events() <-chan events.Event { + c := make(chan events.Event) + close(c) + return c +} diff --git a/pkg/cliui/model/model.go b/pkg/cliui/model/model.go new file mode 100755 index 000000000..ede2681ea --- /dev/null +++ b/pkg/cliui/model/model.go @@ -0,0 +1,29 @@ +package cliuimodel + +import ( + "fmt" + + "github.com/muesli/reflow/indent" +) + +const ( + defaultIndent = 2 +) + +type ( + // ErrorMsg defines a message for errors. + ErrorMsg struct { + Error error + } + + // QuitMsg defines a message for stopping the command. + QuitMsg struct{} +) + +// FormatView formats a model view padding and indentation. +func FormatView(view string) string { + // Indent the view lines + view = indent.String(view, defaultIndent) + // Add top and bottom paddings + return fmt.Sprintf("\n%s\n", view) +} diff --git a/pkg/cliui/model/spinner.go b/pkg/cliui/model/spinner.go new file mode 100755 index 000000000..a65ee2271 --- /dev/null +++ b/pkg/cliui/model/spinner.go @@ -0,0 +1,25 @@ +package cliuimodel + +import ( + "time" + + "github.com/charmbracelet/bubbles/spinner" + "github.com/charmbracelet/lipgloss" +) + +// ColorSpinner defines the foreground color for the spinner. +const ColorSpinner = "#3465A4" + +// Spinner defines the spinner model animation. +var Spinner = spinner.Spinner{ + Frames: []string{"โ—ข ", "โ—ฃ ", "โ—ค ", "โ—ฅ "}, + FPS: time.Second / 5, +} + +// NewSpinner returns a new spinner model. +func NewSpinner() spinner.Model { + s := spinner.New() + s.Spinner = Spinner + s.Style.Foreground(lipgloss.Color(ColorSpinner)) + return s +} diff --git a/pkg/cliui/prefixgen/prefixgen.go b/pkg/cliui/prefixgen/prefixgen.go new file mode 100755 index 000000000..c0c2d3fc3 --- /dev/null +++ b/pkg/cliui/prefixgen/prefixgen.go @@ -0,0 +1,88 @@ +// Package prefixgen is a prefix generation helper for log messages +// and any other kind. +package prefixgen + +import ( + "fmt" + "strings" + + "github.com/sonr-io/core/pkg/cliui/colors" +) + +// Prefixer generates prefixes. +type Prefixer struct { + format string + color string + left, right string + convertUppercase bool +} + +// Option configures Prefixer. +type Option func(p *Prefixer) + +// Color sets color to the prefix. +func Color(color string) Option { + return func(p *Prefixer) { + p.color = color + } +} + +// SquareBrackets adds square brackets to the prefix. +func SquareBrackets() Option { + return func(p *Prefixer) { + p.left = "[" + p.right = "]" + } +} + +// SpaceRight adds rights space to the prefix. +func SpaceRight() Option { + return func(p *Prefixer) { + p.right += " " + } +} + +// Uppercase formats the prefix to uppercase. +func Uppercase() Option { + return func(p *Prefixer) { + p.convertUppercase = true + } +} + +// Common holds some common prefix options and extends those +// options by given options. +func Common(options ...Option) []Option { + return append([]Option{ + SquareBrackets(), + SpaceRight(), + Uppercase(), + }, options...) +} + +// New creates a new Prefixer with format and options. +// Format is an fmt.Sprintf() like format to dynamically create prefix texts +// as needed. +func New(format string, options ...Option) *Prefixer { + p := &Prefixer{ + format: format, + } + for _, o := range options { + o(p) + } + return p +} + +// Gen generates a new prefix by applying s to format given during New(). +func (p *Prefixer) Gen(s ...interface{}) string { + format := p.format + format = p.left + format + format += p.right + prefix := fmt.Sprintf(format, s...) + if p.convertUppercase { + prefix = strings.ToUpper(prefix) + } + if p.color != "" { + return colors.SprintFunc(p.color)(prefix) + } + return prefix +} diff --git a/pkg/cliui/prefixgen/prefixgen_test.go b/pkg/cliui/prefixgen/prefixgen_test.go new file mode 100755 index 000000000..17168aa5d --- /dev/null +++ b/pkg/cliui/prefixgen/prefixgen_test.go @@ -0,0 +1,23 @@ +package prefixgen + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestGen(t *testing.T) { + cases := []struct { + expected string + given string + }{ + {"[TENDERMINT] ", New("Tendermint", Common()...).Gen()}, + {"Tendermint", New("Tendermint").Gen()}, + {"appd", New("%sd").Gen("app")}, + } + for _, tt := range cases { + t.Run(tt.expected, func(t *testing.T) { + require.Equal(t, tt.expected, tt.given) + }) + } +} diff --git a/pkg/cliui/view/accountview/account.go b/pkg/cliui/view/accountview/account.go new file mode 100755 index 000000000..31cd2d95d --- /dev/null +++ b/pkg/cliui/view/accountview/account.go @@ -0,0 +1,82 @@ +package accountview + +import ( + "fmt" + "strings" + + "github.com/muesli/reflow/indent" + "github.com/muesli/reflow/wordwrap" + + "github.com/sonr-io/core/pkg/cliui/colors" + "github.com/sonr-io/core/pkg/cliui/icons" +) + +var ( + fmtExistingAccount = "%s %s's account address: %s\n" + fmtNewAccount = "%s Added account %s with address %s and mnemonic:\n%s\n" +) + +type Option func(*Account) + +type Account struct { + Name string + Address string + Mnemonic string +} + +func WithMnemonic(mnemonic string) Option { + return func(a *Account) { + a.Mnemonic = mnemonic + } +} + +func NewAccount(name, address string, options ...Option) Account { + a := Account{ + Name: name, + Address: address, + } + + for _, apply := range options { + apply(&a) + } + + return a +} + +func (a Account) String() string { + name := colors.Name(a.Name) + + // The account is new when the mnemonic is available + if a.Mnemonic != "" { + m := wordwrap.String(a.Mnemonic, 80) + m = indent.String(m, 2) + + return fmt.Sprintf(fmtNewAccount, icons.OK, name, a.Address, colors.Mnemonic(m)) + } + + return fmt.Sprintf(fmtExistingAccount, icons.User, name, a.Address) +} + +type Accounts []Account + +func (a Accounts) String() string { + b := strings.Builder{} + + for i, acc := range a { + // Make sure accounts are separated by an + // empty line when the mnemonic is available. + if i > 0 && acc.Mnemonic != "" { + b.WriteRune('\n') + } + + b.WriteString(acc.String()) + } + + b.WriteRune('\n') + + return b.String() +} + +func (a Accounts) Append(acc Account) Accounts { + return append(a, acc) +} diff --git a/pkg/cliui/view/errorview/error.go b/pkg/cliui/view/errorview/error.go new file mode 100755 index 000000000..c4ba92f5e --- /dev/null +++ b/pkg/cliui/view/errorview/error.go @@ -0,0 +1,28 @@ +package errorview + +import ( + "strings" + + "github.com/muesli/reflow/wordwrap" + + "github.com/sonr-io/core/pkg/cliui/colors" +) + +func NewError(err error) Error { + return Error{err} +} + +type Error struct { + Err error +} + +func (e Error) String() string { + s := strings.TrimSpace(e.Err.Error()) + + w := wordwrap.NewWriter(80) + w.Breakpoints = []rune{' '} + w.Write([]byte(s)) + w.Close() + + return colors.Error(w.String()) +} diff --git a/pkg/cmdrunner/cmdrunner.go b/pkg/cmdrunner/cmdrunner.go new file mode 100644 index 000000000..b1e6dffe0 --- /dev/null +++ b/pkg/cmdrunner/cmdrunner.go @@ -0,0 +1,262 @@ +package cmdrunner + +import ( + "context" + "fmt" + "io" + "os" + "os/exec" + "strings" + + "golang.org/x/sync/errgroup" + + "github.com/sonr-io/core/pkg/cmdrunner/step" + "github.com/sonr-io/core/pkg/env" + "github.com/sonr-io/core/pkg/goenv" +) + +// Runner is an object to run commands. +type Runner struct { + endSignal os.Signal + stdout io.Writer + stderr io.Writer + stdin io.Reader + workdir string + runParallel bool + debug bool +} + +// Option defines option to run commands. +type Option func(*Runner) + +// DefaultStdout provides the default stdout for the commands to run. +func DefaultStdout(writer io.Writer) Option { + return func(r *Runner) { + r.stdout = writer + } +} + +// DefaultStderr provides the default stderr for the commands to run. +func DefaultStderr(writer io.Writer) Option { + return func(r *Runner) { + r.stderr = writer + } +} + +// DefaultStdin provides the default stdin for the commands to run. +func DefaultStdin(reader io.Reader) Option { + return func(r *Runner) { + r.stdin = reader + } +} + +// DefaultWorkdir provides the default working directory for the commands to run. +func DefaultWorkdir(path string) Option { + return func(r *Runner) { + r.workdir = path + } +} + +// RunParallel allows commands to run concurrently. +func RunParallel() Option { + return func(r *Runner) { + r.runParallel = true + } +} + +// EndSignal configures s to be signaled to the processes to end them. +func EndSignal(s os.Signal) Option { + return func(r *Runner) { + r.endSignal = s + } +} + +func EnableDebug() Option { + return func(r *Runner) { + r.debug = true + } +} + +// New returns a new command runner. +func New(options ...Option) *Runner { + runner := &Runner{ + endSignal: os.Interrupt, + debug: env.DebugEnabled(), + } + for _, apply := range options { + apply(runner) + } + return runner +} + +// Run blocks until all steps have completed their executions. +func (r *Runner) Run(ctx context.Context, steps ...*step.Step) error { + if len(steps) == 0 { + return nil + } + g, ctx := errgroup.WithContext(ctx) + for i, step := range steps { + // copy s to a new variable to allocate a new address, + // so we can safely use it inside goroutines spawned in this loop. + if r.debug { + var cd string + if step.Workdir != "" { + cd = fmt.Sprintf("cd %s;", step.Workdir) + } + fmt.Printf("Step %d: %s%s %s %s\n", i, cd, strings.Join(step.Env, " "), + step.Exec.Command, + strings.Join(step.Exec.Args, " ")) + } + step := step + if err := ctx.Err(); err != nil { + return err + } + if err := step.PreExec(); err != nil { + return err + } + runPostExecs := func(processErr error) error { + // if context is canceled, then we can ignore exit error of the + // process because it should be exited because of the cancellation. + var err error + ctxErr := ctx.Err() + if ctxErr != nil { + err = ctxErr + } else { + err = processErr + } + for _, exec := range step.PostExecs { + if err := exec(err); err != nil { + return err + } + } + if len(step.PostExecs) > 0 { + return nil + } + return err + } + command := r.newCommand(step) + startErr := command.Start() + if startErr != nil { + if err := runPostExecs(startErr); err != nil { + return err + } + continue + } + go func() { + <-ctx.Done() + command.Signal(r.endSignal) + }() + if err := step.InExec(); err != nil { + return err + } + if len(step.WriteData) > 0 { + if _, err := command.Write(step.WriteData); err != nil { + return err + } + } + if r.runParallel { + g.Go(func() error { + return runPostExecs(command.Wait()) + }) + } else if err := runPostExecs(command.Wait()); err != nil { + return err + } + } + return g.Wait() +} + +// Executor represents a command to execute. +type Executor interface { + Wait() error + Start() error + Signal(os.Signal) + Write(data []byte) (n int, err error) +} + +// dummyExecutor is an executor that does nothing. +type dummyExecutor struct{} + +func (e *dummyExecutor) Start() error { return nil } + +func (e *dummyExecutor) Wait() error { return nil } + +func (e *dummyExecutor) Signal(os.Signal) {} + +func (e *dummyExecutor) Write([]byte) (int, error) { return 0, nil } + +// cmdSignal is an executor with signal processing. +type cmdSignal struct { + *exec.Cmd +} + +func (e *cmdSignal) Signal(s os.Signal) { _ = e.Cmd.Process.Signal(s) } + +func (e *cmdSignal) Write([]byte) (n int, err error) { return 0, nil } + +// cmdSignalWithWriter is an executor with signal processing and that can write into stdin. +type cmdSignalWithWriter struct { + *exec.Cmd + w io.WriteCloser +} + +func (e *cmdSignalWithWriter) Signal(s os.Signal) { _ = e.Cmd.Process.Signal(s) } + +func (e *cmdSignalWithWriter) Write(data []byte) (n int, err error) { + defer e.w.Close() + return e.w.Write(data) +} + +// newCommand returns a new command to execute. +func (r *Runner) newCommand(step *step.Step) Executor { + // Return a dummy executor in case of an empty command + if step.Exec.Command == "" { + return &dummyExecutor{} + } + var ( + stdout = step.Stdout + stderr = step.Stderr + stdin = step.Stdin + dir = step.Workdir + ) + + // Define standard input and outputs + if stdout == nil { + stdout = r.stdout + } + if stderr == nil { + stderr = r.stderr + } + if stdin == nil { + stdin = r.stdin + } + if dir == "" { + dir = r.workdir + } + + // Initialize command + command := exec.Command(step.Exec.Command, step.Exec.Args...) + command.Stdout = stdout + command.Stderr = stderr + command.Dir = dir + command.Env = append(os.Environ(), step.Env...) + command.Env = append(command.Env, Env("PATH", goenv.Path())) + + // If a custom stdin is provided it will be as the stdin for the command + if stdin != nil { + command.Stdin = stdin + return &cmdSignal{command} + } + + // If no custom stdin, the executor can write into the stdin of the program + writer, err := command.StdinPipe() + if err != nil { + // TODO do not panic + panic(err) + } + return &cmdSignalWithWriter{command, writer} +} + +// Env returns a new env var value from key and val. +func Env(key, val string) string { + return fmt.Sprintf("%s=%s", key, val) +} diff --git a/pkg/cmdrunner/exec/exec.go b/pkg/cmdrunner/exec/exec.go new file mode 100644 index 000000000..5e588bd4f --- /dev/null +++ b/pkg/cmdrunner/exec/exec.go @@ -0,0 +1,87 @@ +// Package exec provides easy access to command execution for basic uses. +package exec + +import ( + "bytes" + "context" + "fmt" + "os/exec" + "strings" + + "github.com/pkg/errors" + + "github.com/sonr-io/core/pkg/cmdrunner" + "github.com/sonr-io/core/pkg/cmdrunner/step" +) + +// ExitError is an alias to exec.ExitError. +type ExitError = exec.ExitError + +type execConfig struct { + stepOptions []step.Option + includeStdLogsToError bool +} + +type Option func(*execConfig) + +func StepOption(o step.Option) Option { + return func(c *execConfig) { + c.stepOptions = append(c.stepOptions, o) + } +} + +func IncludeStdLogsToError() Option { + return func(c *execConfig) { + c.includeStdLogsToError = true + } +} + +// Exec executes a command with args, it's a shortcut func for basic command executions. +func Exec(ctx context.Context, fullCommand []string, options ...Option) error { + errb := &bytes.Buffer{} + logs := &bytes.Buffer{} + + c := &execConfig{ + stepOptions: []step.Option{ + step.Exec(fullCommand[0], fullCommand[1:]...), + step.Stdout(logs), + step.Stderr(errb), + }, + } + + for _, apply := range options { + apply(c) + } + + err := cmdrunner.New().Run(ctx, step.New(c.stepOptions...)) + if err != nil { + return &Error{ + Err: errors.Wrap(err, errb.String()), + Command: strings.Join(fullCommand, " "), + StdLogs: logs.String(), + includeStdLogsToError: c.includeStdLogsToError, + } + } + + return nil +} + +// Error provides detailed errors from the executed program. +type Error struct { + Err error + Command string + StdLogs string // collected logs from code generation tools. + includeStdLogsToError bool +} + +func (e *Error) Unwrap() error { + return e.Err +} + +func (e *Error) Error() string { + message := fmt.Sprintf("error while running command %s: %s", e.Command, e.Err.Error()) + if e.includeStdLogsToError && strings.TrimSpace(e.StdLogs) != "" { + return fmt.Sprintf("%s\n\n%s", message, e.StdLogs) + } + return message +} diff --git a/pkg/cmdrunner/step/step.go b/pkg/cmdrunner/step/step.go new file mode 100644 index 000000000..b085fb9c9 --- /dev/null +++ b/pkg/cmdrunner/step/step.go @@ -0,0 +1,118 @@ +package step + +import ( + "io" +) + +type Step struct { + Exec Execution + PreExec func() error + InExec func() error + PostExecs []func(error) error + Stdout io.Writer + Stderr io.Writer + Stdin io.Reader + Workdir string + Env []string + WriteData []byte +} + +type Option func(*Step) + +type Options []Option + +func NewOptions() Options { + return Options{} +} + +func (o Options) Add(options ...Option) Options { + return append(o, options...) +} + +func New(options ...Option) *Step { + s := &Step{ + PreExec: func() error { return nil }, + InExec: func() error { return nil }, + PostExecs: make([]func(error) error, 0), + } + for _, o := range options { + o(s) + } + return s +} + +type Execution struct { + Command string + Args []string +} + +func Exec(command string, args ...string) Option { + return func(s *Step) { + s.Exec = Execution{command, args} + } +} + +func PreExec(hook func() error) Option { + return func(s *Step) { + s.PreExec = hook + } +} + +func InExec(hook func() error) Option { + return func(s *Step) { + s.InExec = hook + } +} + +func PostExec(hook func(exitErr error) error) Option { // *os.ExitError + return func(s *Step) { + s.PostExecs = append(s.PostExecs, hook) + } +} + +func Stdout(w io.Writer) Option { + return func(s *Step) { + s.Stdout = w + } +} + +func Stderr(w io.Writer) Option { + return func(s *Step) { + s.Stderr = w + } +} + +func Stdin(r io.Reader) Option { + return func(s *Step) { + s.Stdin = r + } +} + +func Workdir(path string) Option { + return func(s *Step) { + s.Workdir = path + } +} + +func Env(e ...string) Option { + return func(s *Step) { + s.Env = e + } +} + +func Write(data []byte) Option { + return func(s *Step) { + s.WriteData = data + } +} + +type Steps []*Step + +func NewSteps(steps ...*Step) Steps { + return steps +} + +func (s *Steps) Add(steps ...*Step) Steps { + *s = append(*s, steps...) + return *s +} diff --git a/pkg/env/env.go b/pkg/env/env.go new file mode 100644 index 000000000..bbbc479f0 --- /dev/null +++ b/pkg/env/env.go @@ -0,0 +1,37 @@ +package env + +import ( + "fmt" + "os" + "path" + + "github.com/sonr-io/core/pkg/xfilepath" +) + +const ( + debug = "SONR_DEBUG" + configDir = "SONR_CONFIG_DIR" +) + +func DebugEnabled() bool { + return os.Getenv(debug) == "1" +} + +func ConfigDir() xfilepath.PathRetriever { + return func() (string, error) { + if dir := os.Getenv(configDir); dir != "" { + if !path.IsAbs(dir) { + panic(fmt.Sprintf("%s must be an absolute path", configDir)) + } + return dir, nil + } + return xfilepath.JoinFromHome(xfilepath.Path(".sonr"))() + } +} + +func SetConfigDir(dir string) { + err := os.Setenv(configDir, dir) + if err != nil { + panic(fmt.Sprintf("set config dir env: %v", err)) + } +} diff --git a/pkg/events/bus.go b/pkg/events/bus.go new file mode 100644 index 000000000..e82f69ed7 --- /dev/null +++ b/pkg/events/bus.go @@ -0,0 +1,95 @@ +package events + +import ( + "fmt" +) + +// DefaultBufferSize defines the default maximum number +// of events that the bus can cache before they are handled. +const DefaultBufferSize = 50 + +// Provider defines an interface for event providers. +type Provider interface { + // Events returns a read only channel to read the events. + Events() <-chan Event +} + +type ( + // Bus defines a bus to send and receive events. + Bus struct { + evChan chan Event + stopped bool + } + + // BusOption configures the Bus. + BusOption func(*Bus) +) + +// WithBufferSize assigns the size of the buffer to use for buffering events. +func WithBufferSize(size int) BusOption { + return func(bus *Bus) { + bus.evChan = make(chan Event, size) + } +} + +// NewBus creates a new event bus. +func NewBus(options ...BusOption) Bus { + bus := Bus{ + evChan: make(chan Event, DefaultBufferSize), + } + + for _, apply := range options { + apply(&bus) + } + + return bus +} + +// Send sends a new event to bus. +// This method will block if the event bus buffer is full. +func (b Bus) Send(message string, options ...Option) { + if b.evChan == nil || b.stopped { + return + } + + b.evChan <- New(message, options...) +} + +// Sendf sends a new event with a formatted message to bus. +func (b Bus) Sendf(format string, a ...any) { + b.Send(fmt.Sprintf(format, a...)) +} + +// SendInfo sends an info event to the bus. +func (b Bus) SendInfo(message string, options ...Option) { + b.Send(message, options...) +} + +// SendError sends an error event to the bus. +func (b Bus) SendError(err error, options ...Option) { + b.Send(err.Error(), options...) +} + +// SendView sends a new event for a view to the bus. +// Views are types that implement the `fmt.Stringer` interface +// which allow events with complex message formats. +func (b Bus) SendView(s fmt.Stringer, options ...Option) { + b.Send(s.String(), options...) +} + +// Events returns a read only channel to read the events. +func (b Bus) Events() <-chan Event { + return b.evChan +} + +// Stop stops the event bus. +// All new events are ignored once the event bus is stopped. +func (b *Bus) Stop() { + if b.evChan == nil { + return + } + + b.stopped = true + + close(b.evChan) +} diff --git a/pkg/events/events.go b/pkg/events/events.go new file mode 100644 index 000000000..d5a47d79c --- /dev/null +++ b/pkg/events/events.go @@ -0,0 +1,116 @@ +// Package events provides functionalities for packages to log their states as events +// for others to consume and display to end users in meaningful ways. +package events + +import ( + "fmt" + + "github.com/muesli/reflow/indent" +) + +// ProgressIndication enumerates possible states of progress indication for an Event. +type ProgressIndication uint8 + +const ( + GroupError = "error" +) + +const ( + IndicationNone ProgressIndication = iota + IndicationStart + IndicationUpdate + IndicationFinish +) + +type ( + // Event represents a state. + Event struct { + ProgressIndication ProgressIndication + Icon string + Indent uint + Message string + Verbose bool + Group string + } + + // Option event options. + Option func(*Event) +) + +// ProgressStart indicates that a status event starts the progress indicator. +func ProgressStart() Option { + return func(e *Event) { + e.ProgressIndication = IndicationStart + } +} + +// ProgressUpdate indicates that a status event updated the current progress. +func ProgressUpdate() Option { + return func(e *Event) { + e.ProgressIndication = IndicationUpdate + } +} + +// ProgressFinish indicates that a status event finished the ongoing task. +func ProgressFinish() Option { + return func(e *Event) { + e.ProgressIndication = IndicationFinish + } +} + +// Verbose sets high verbosity for the Event. +func Verbose() Option { + return func(e *Event) { + e.Verbose = true + } +} + +// Icon sets the text icon prefix. +func Icon(icon string) Option { + return func(e *Event) { + e.Icon = icon + } +} + +// Indent sets the text indentation. +func Indent(indent uint) Option { + return func(e *Event) { + e.Indent = indent + } +} + +// Group sets a group name for the event. +func Group(name string) Option { + return func(e *Event) { + e.Group = name + } +} + +// New creates a new event with given config. +func New(message string, options ...Option) Event { + ev := Event{Message: message} + + for _, applyOption := range options { + applyOption(&ev) + } + + return ev +} + +func (e Event) String() string { + s := e.Message + if e.Icon != "" { + s = fmt.Sprintf("%s %s", e.Icon, s) + } + + if e.Indent > 0 { + s = indent.String(s, e.Indent) + } + + return s +} + +// InProgress returns true when the event is in progress. +func (e Event) InProgress() bool { + return e.ProgressIndication == IndicationStart || e.ProgressIndication == IndicationUpdate +} diff --git a/pkg/events/events_test.go b/pkg/events/events_test.go new file mode 100644 index 000000000..977031b82 --- /dev/null +++ b/pkg/events/events_test.go @@ -0,0 +1,54 @@ +package events_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/sonr-io/core/pkg/events" +) + +func TestNew(t *testing.T) { + msg := "message" + cases := []struct { + name, message string + inProgress, hasIcon bool + options []events.Option + event events.Event + }{ + { + name: "event", + event: events.Event{}, + }, + { + name: "event start", + message: msg, + inProgress: true, + options: []events.Option{events.ProgressStart()}, + event: events.New(msg, events.ProgressStart()), + }, + { + name: "event update", + message: msg, + inProgress: true, + options: []events.Option{events.ProgressUpdate()}, + event: events.New(msg, events.ProgressUpdate()), + }, + { + name: "event finish", + message: msg, + options: []events.Option{events.ProgressFinish()}, + event: events.New(msg, events.ProgressFinish()), + }, + } + for _, tt := range cases { + t.Run(tt.name, func(t *testing.T) { + // Act + e := events.New(tt.message, tt.options...) + + // Assert + require.Equal(t, tt.event, e) + require.Equal(t, tt.inProgress, e.InProgress()) + }) + } +} diff --git a/pkg/gocmd/gocmd.go b/pkg/gocmd/gocmd.go new file mode 100644 index 000000000..e5d7b0f1e --- /dev/null +++ b/pkg/gocmd/gocmd.go @@ -0,0 +1,230 @@ +package gocmd + +import ( + "bytes" + "context" + "errors" + "fmt" + "os" + "path/filepath" + "strings" + + "github.com/sonr-io/core/pkg/cmdrunner/exec" + "github.com/sonr-io/core/pkg/cmdrunner/step" + "github.com/sonr-io/core/pkg/goenv" +) + +const ( + // CommandInstall represents go "install" command. + CommandInstall = "install" + + // CommandGet represents go "get" command. + CommandGet = "get" + + // CommandBuild represents go "build" command. + CommandBuild = "build" + + // CommandMod represents go "mod" command. + CommandMod = "mod" + + // CommandModTidy represents go mod "tidy" command. + CommandModTidy = "tidy" + + // CommandModVerify represents go mod "verify" command. + CommandModVerify = "verify" + + // CommandFmt represents go "fmt" command. + CommandFmt = "fmt" + + // CommandEnv represents go "env" command. + CommandEnv = "env" + + // CommandList represents go "list" command. + CommandList = "list" + + // EnvGOARCH represents GOARCH variable. + EnvGOARCH = "GOARCH" + // EnvGOMOD represents GOMOD variable. + EnvGOMOD = "GOMOD" + // EnvGOOS represents GOOS variable. + EnvGOOS = "GOOS" + + // FlagGcflags represents gcflags go flag. + FlagGcflags = "-gcflags" + // FlagGcflagsValueDebug represents debug go flags. + FlagGcflagsValueDebug = "all=-N -l" + // FlagLdflags represents ldflags go flag. + FlagLdflags = "-ldflags" + // FlagTags represents tags go flag. + FlagTags = "-tags" + // FlagMod represents mod go flag. + FlagMod = "-mod" + // FlagModValueReadOnly represents readonly go flag. + FlagModValueReadOnly = "readonly" + // FlagOut represents out go flag. + FlagOut = "-o" +) + +// Env returns the value of `go env name`. +func Env(name string) (string, error) { + var b bytes.Buffer + err := exec.Exec(context.Background(), []string{Name(), CommandEnv, name}, exec.StepOption(step.Stdout(&b))) + return b.String(), err +} + +// Name returns the name of Go binary to use. +func Name() string { + custom := os.Getenv("GONAME") + if custom != "" { + return custom + } + return "go" +} + +// Fmt runs go fmt on path. +func Fmt(ctx context.Context, path string, options ...exec.Option) error { + return exec.Exec(ctx, []string{Name(), CommandFmt, "./..."}, append(options, exec.StepOption(step.Workdir(path)))...) +} + +// ModTidy runs go mod tidy on path with options. +func ModTidy(ctx context.Context, path string, options ...exec.Option) error { + return exec.Exec(ctx, []string{Name(), CommandMod, CommandModTidy}, + append(options, + exec.StepOption(step.Workdir(path)), + // FIXME(tb) untagged version of ignite/cli triggers a 404 not found when go + // mod tidy requests the sumdb, until we understand why, we disable sumdb. + // related issue: https://github.com/golang/go/issues/56174 + // Also disable Go toolchain download because it doesn't work without a valid + // GOSUMDB value: https://go.dev/doc/toolchain#download + exec.StepOption(step.Env("GOSUMDB=off", "GOTOOLCHAIN=local+path")), + )...) +} + +// ModVerify runs go mod verify on path with options. +func ModVerify(ctx context.Context, path string, options ...exec.Option) error { + return exec.Exec(ctx, []string{Name(), CommandMod, CommandModVerify}, append(options, exec.StepOption(step.Workdir(path)))...) +} + +// BuildPath runs go install on cmd folder with options. +func BuildPath(ctx context.Context, output, binary, path string, flags []string, options ...exec.Option) error { + binaryOutput, err := binaryPath(output, binary) + if err != nil { + return err + } + command := []string{ + Name(), + CommandBuild, + FlagOut, binaryOutput, + } + command = append(command, flags...) + command = append(command, ".") + return exec.Exec(ctx, command, append(options, exec.StepOption(step.Workdir(path)))...) +} + +// Build runs go build on path with options. +func Build(ctx context.Context, out, path string, flags []string, options ...exec.Option) error { + command := []string{ + Name(), + CommandBuild, + FlagOut, out, + } + command = append(command, flags...) + return exec.Exec(ctx, command, append(options, exec.StepOption(step.Workdir(path)))...) +} + +// InstallAll runs go install ./... on path with options. +func InstallAll(ctx context.Context, path string, flags []string, options ...exec.Option) error { + command := []string{ + Name(), + CommandInstall, + } + command = append(command, flags...) + command = append(command, "./...") + return exec.Exec(ctx, command, append(options, exec.StepOption(step.Workdir(path)))...) +} + +// Install runs go install pkgs on path with options. +func Install(ctx context.Context, path string, pkgs []string, options ...exec.Option) error { + command := []string{ + Name(), + CommandInstall, + } + command = append(command, pkgs...) + return exec.Exec(ctx, command, append(options, exec.StepOption(step.Workdir(path)))...) +} + +// IsInstallError returns true if err is interpreted as a go install error. +func IsInstallError(err error) bool { + if err == nil { + return false + } + return strings.Contains(err.Error(), "no required module provides package") +} + +// Get runs go get pkgs on path with options. +func Get(ctx context.Context, path string, pkgs []string, options ...exec.Option) error { + command := []string{ + Name(), + CommandGet, + } + command = append(command, pkgs...) + return exec.Exec(ctx, command, append(options, exec.StepOption(step.Workdir(path)))...) +} + +// List returns the list of packages in path. +func List(ctx context.Context, path string, flags []string, options ...exec.Option) ([]string, error) { + command := []string{ + Name(), + CommandList, + } + command = append(command, flags...) + var b bytes.Buffer + err := exec.Exec(ctx, command, + append(options, exec.StepOption(step.Workdir(path)), exec.StepOption(step.Stdout(&b)))...) + if err != nil { + return nil, err + } + return strings.Fields(b.String()), nil +} + +// Ldflags returns a combined ldflags set from flags. +func Ldflags(flags ...string) string { + return strings.Join(flags, " ") +} + +// Tags returns a combined tags set from flags. +func Tags(tags ...string) string { + return strings.Join(tags, " ") +} + +// BuildTarget builds a GOOS:GOARCH pair. +func BuildTarget(goos, goarch string) string { + return fmt.Sprintf("%s:%s", goos, goarch) +} + +// ParseTarget parses GOOS:GOARCH pair. +func ParseTarget(t string) (goos, goarch string, err error) { + parsed := strings.Split(t, ":") + if len(parsed) != 2 { + return "", "", errors.New("invalid Go target, expected in GOOS:GOARCH format") + } + + return parsed[0], parsed[1], nil +} + +// PackageLiteral returns the string representation of package part of go get [package]. +func PackageLiteral(path, version string) string { + return fmt.Sprintf("%s@%s", path, version) +} + +// binaryPath determines the path where binary will be located at. +func binaryPath(output, binary string) (string, error) { + if output != "" { + outputAbs, err := filepath.Abs(output) + if err != nil { + return "", err + } + return filepath.Join(outputAbs, binary), nil + } + return filepath.Join(goenv.Bin(), binary), nil +} diff --git a/pkg/goenv/goenv.go b/pkg/goenv/goenv.go new file mode 100644 index 000000000..17bc30428 --- /dev/null +++ b/pkg/goenv/goenv.go @@ -0,0 +1,57 @@ +// Package goenv defines env variables known by Go and some utilities around it. +package goenv + +import ( + "fmt" + "go/build" + "os" + "path/filepath" +) + +const ( + // GOBIN is the env var for GOBIN. + GOBIN = "GOBIN" + + // GOPATH is the env var for GOPATH. + GOPATH = "GOPATH" + + // GOMODCACHE is the env var for GOMODCACHE. + GOMODCACHE = "GOMODCACHE" +) + +const ( + binDir = "bin" + modDir = "pkg/mod" +) + +// Bin returns the path of where Go binaries are installed. +func Bin() string { + if binPath := os.Getenv(GOBIN); binPath != "" { + return binPath + } + if goPath := os.Getenv(GOPATH); goPath != "" { + return filepath.Join(goPath, binDir) + } + return filepath.Join(build.Default.GOPATH, binDir) +} + +// Path returns $PATH with correct go bin configuration set. +func Path() string { + return os.ExpandEnv(fmt.Sprintf("$PATH:%s", Bin())) +} + +// ConfigurePath configures the env with correct $PATH that has go bin setup. +func ConfigurePath() error { + return os.Setenv("PATH", Path()) +} + +// GoModCache returns the path to Go's module cache. +func GoModCache() string { + if path := os.Getenv(GOMODCACHE); path != "" { + return path + } + if path := os.Getenv(GOPATH); path != "" { + return filepath.Join(path, modDir) + } + return filepath.Join(build.Default.GOPATH, modDir) +} diff --git a/pkg/gomodule/gomodule.go b/pkg/gomodule/gomodule.go new file mode 100644 index 000000000..456559ada --- /dev/null +++ b/pkg/gomodule/gomodule.go @@ -0,0 +1,136 @@ +package gomodule + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "io/fs" + "os" + "path/filepath" + + "golang.org/x/mod/modfile" + "golang.org/x/mod/module" + + "github.com/sonr-io/core/pkg/cache" + "github.com/sonr-io/core/pkg/cmdrunner" + "github.com/sonr-io/core/pkg/cmdrunner/step" +) + +const pathCacheNamespace = "gomodule.path" + +// ErrGoModNotFound returned when go.mod file cannot be found for an app. +var ErrGoModNotFound = errors.New("go.mod not found") + +// ParseAt finds and parses go.mod at app's path. +func ParseAt(path string) (*modfile.File, error) { + gomod, err := os.ReadFile(filepath.Join(path, "go.mod")) + if err != nil { + if errors.Is(err, fs.ErrNotExist) { + return nil, ErrGoModNotFound + } + return nil, err + } + return modfile.Parse("", gomod, nil) +} + +// FilterVersions filters dependencies under require section by their paths. +func FilterVersions(dependencies []module.Version, paths ...string) []module.Version { + var filtered []module.Version + + for _, dep := range dependencies { + for _, path := range paths { + if dep.Path == path { + filtered = append(filtered, dep) + break + } + } + } + + return filtered +} + +func ResolveDependencies(f *modfile.File, includeIndirect bool) ([]module.Version, error) { + var versions []module.Version + + isReplacementAdded := func(rv module.Version) bool { + for _, rep := range f.Replace { + if rv.Path == rep.Old.Path { + versions = append(versions, rep.New) + + return true + } + } + + return false + } + + for _, req := range f.Require { + if req.Indirect && !includeIndirect { + continue + } + if !isReplacementAdded(req.Mod) { + versions = append(versions, req.Mod) + } + } + + return versions, nil +} + +// LocatePath locates pkg's absolute path managed by 'go mod' on the local filesystem. +func LocatePath(ctx context.Context, cacheStorage cache.Storage, src string, pkg module.Version) (path string, err error) { + // can be a local package. + if pkg.Version == "" { // indicates that this is a local package. + if filepath.IsAbs(pkg.Path) { + return pkg.Path, nil + } + return filepath.Join(src, pkg.Path), nil + } + + pathCache := cache.New[string](cacheStorage, pathCacheNamespace) + cacheKey := cache.Key(pkg.Path, pkg.Version) + path, err = pathCache.Get(cacheKey) + if err != nil && !errors.Is(err, cache.ErrorNotFound) { + return "", err + } + if !errors.Is(err, cache.ErrorNotFound) { + return path, nil + } + + // otherwise, it is hosted. + out := &bytes.Buffer{} + + if err := cmdrunner. + New(). + Run(ctx, step.New( + step.Exec("go", "mod", "download", "-json"), + step.Workdir(src), + step.Stdout(out), + )); err != nil { + return "", err + } + + d := json.NewDecoder(out) + + for { + var mod struct { + Path, Version, Dir string + } + if err := d.Decode(&mod); err != nil { + if errors.Is(err, io.EOF) { + break + } + return "", err + } + if mod.Path == pkg.Path && mod.Version == pkg.Version { + if err := pathCache.Put(cacheKey, mod.Dir); err != nil { + return "", err + } + return mod.Dir, nil + } + } + + return "", fmt.Errorf("module %q not found", pkg.Path) +} diff --git a/pkg/mpc/types/v1/zkset_test.go b/pkg/mpc/types/v1/zkset_test.go deleted file mode 100644 index 1a21ba9c2..000000000 --- a/pkg/mpc/types/v1/zkset_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package types_test - -import ( - "testing" - - secp256k1 "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - "github.com/sonr-io/core/pkg/mpc/types/v1" - "github.com/stretchr/testify/assert" -) - -func TestZkSet(t *testing.T) { - priv := secp256k1.GenPrivKey() - pub := priv.PubKey() - zkset, err := types.CreateZkSet(pub) - if err != nil { - t.Fatal(err) - } - t.Log(zkset) - err = zkset.AddElement(pub, "test") - if err != nil { - t.Fatal(err) - } - raw := zkset.String() - t.Log(raw) - - zkset2, err := types.OpenZkSet(raw) - if err != nil { - t.Fatal(err) - } - t.Log(zkset2) - ok1 := zkset2.ValidateMembership(pub, "test") - assert.True(t, ok1) -} diff --git a/pkg/placeholder/error.go b/pkg/placeholder/error.go new file mode 100755 index 000000000..6afbbd795 --- /dev/null +++ b/pkg/placeholder/error.go @@ -0,0 +1,87 @@ +package placeholder + +import ( + "fmt" + "strings" + + "github.com/sonr-io/core/pkg/validation" +) + +var _ validation.Error = (*MissingPlaceholdersError)(nil) + +// MissingPlaceholdersError is used as an error when a source file is missing placeholder. +type MissingPlaceholdersError struct { + missing iterableStringSet + additionalInfo string + additionalErrors error +} + +// Is true if both errors have the same list of missing placeholders. +func (e *MissingPlaceholdersError) Is(err error) bool { + other, ok := err.(*MissingPlaceholdersError) //nolint:errorlint + if !ok { + return false + } + if len(other.missing) != len(e.missing) { + return false + } + for i := range e.missing { + if e.missing[i] != other.missing[i] { + return false + } + } + return true +} + +// Error implements error interface. +func (e *MissingPlaceholdersError) Error() string { + var b strings.Builder + b.WriteString("missing placeholders: ") + e.missing.Iterate(func(i int, element string) bool { + if i > 0 { + b.WriteString(", ") + } + b.WriteString(element) + return true + }) + return b.String() +} + +// ValidationInfo implements validation.Error interface. +func (e *MissingPlaceholdersError) ValidationInfo() string { + var b strings.Builder + b.WriteString("Missing placeholders:\n\n") + e.missing.Iterate(func(i int, element string) bool { + if i > 0 { + b.WriteString("\n") + } + b.WriteString(element) + return true + }) + if e.additionalInfo != "" { + b.WriteString("\n\n") + b.WriteString(e.additionalInfo) + } + if e.additionalErrors != nil { + b.WriteString("\n\nAdditional errors: ") + b.WriteString(e.additionalErrors.Error()) + } + return b.String() +} + +var _ validation.Error = (*ValidationMiscError)(nil) + +// ValidationMiscError is used as a miscellaneous error related to validation. +type ValidationMiscError struct { + errors []string +} + +// Error implements error interface. +func (e *ValidationMiscError) Error() string { + return fmt.Sprintf("validation errors: %v", e.errors) +} + +// ValidationInfo implements validation.Error interface. +func (e *ValidationMiscError) ValidationInfo() string { + return fmt.Sprintf("Validation errors:\n\n%v", strings.Join(e.errors, "\n")) +} diff --git a/pkg/placeholder/tracer.go b/pkg/placeholder/tracer.go new file mode 100755 index 000000000..c5f2e6924 --- /dev/null +++ b/pkg/placeholder/tracer.go @@ -0,0 +1,113 @@ +package placeholder + +import ( + "strings" +) + +type iterableStringSet map[string]struct{} + +func (set iterableStringSet) Iterate(f func(i int, element string) bool) { + i := 0 + for key := range set { + if !f(i, key) { + return + } + i++ + } +} + +func (set iterableStringSet) Add(item string) { + set[item] = struct{}{} +} + +// Option for configuring session. +type Option func(*Tracer) + +// WithAdditionalInfo will append info to the validation error. +func WithAdditionalInfo(info string) Option { + return func(s *Tracer) { + s.additionalInfo = info + } +} + +// New instantiates Session with provided options. +func New(opts ...Option) *Tracer { + s := &Tracer{missing: iterableStringSet{}} + for _, opt := range opts { + opt(s) + } + return s +} + +type Replacer interface { + Replace(content, placeholder, replacement string) string + ReplaceAll(content, placeholder, replacement string) string + ReplaceOnce(content, placeholder, replacement string) string + AppendMiscError(miscError string) +} + +// Tracer keeps track of missing placeholders or other issues related to file modification. +type Tracer struct { + missing iterableStringSet + miscErrors []string + additionalInfo string +} + +// ReplaceAll replace all placeholders in content with replacement string. +func (t *Tracer) ReplaceAll(content, placeholder, replacement string) string { + if strings.Count(content, placeholder) == 0 { + t.missing.Add(placeholder) + return content + } + return strings.ReplaceAll(content, placeholder, replacement) +} + +// Replace placeholder in content with replacement string once. +func (t *Tracer) Replace(content, placeholder, replacement string) string { + // NOTE(dshulyak) we will count twice. once here and second time in strings.Replace + // if it turns out to be an issue, copy the code from strings.Replace. + if strings.Count(content, placeholder) == 0 { + t.missing.Add(placeholder) + return content + } + return strings.Replace(content, placeholder, replacement, 1) +} + +// ReplaceOnce will replace placeholder in content only if replacement is not already found in content. +func (t *Tracer) ReplaceOnce(content, placeholder, replacement string) string { + if !strings.Contains(content, replacement) { + return t.Replace(content, placeholder, replacement) + } + return content +} + +// AppendMiscError allows to track errors not related to missing placeholders during file modification. +func (t *Tracer) AppendMiscError(miscError string) { + t.miscErrors = append(t.miscErrors, miscError) +} + +// Err if any of the placeholders were missing during execution. +func (t *Tracer) Err() error { + // miscellaneous errors represent errors preventing source modification not related to missing placeholder + var miscErrors error + if len(t.miscErrors) > 0 { + miscErrors = &ValidationMiscError{ + errors: t.miscErrors, + } + } + + if len(t.missing) > 0 { + missing := iterableStringSet{} + for key := range t.missing { + missing.Add(key) + } + return &MissingPlaceholdersError{ + missing: missing, + additionalInfo: t.additionalInfo, + additionalErrors: miscErrors, + } + } + + // if not missing placeholder but still miscellaneous errors, return them + return miscErrors +} diff --git a/pkg/placeholder/tracer_test.go b/pkg/placeholder/tracer_test.go new file mode 100755 index 000000000..69daef1f3 --- /dev/null +++ b/pkg/placeholder/tracer_test.go @@ -0,0 +1,99 @@ +package placeholder + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func newErrMissingPlaceholder(missing []string) *MissingPlaceholdersError { + err := &MissingPlaceholdersError{missing: iterableStringSet{}} + for _, placeholder := range missing { + err.missing[placeholder] = struct{}{} + } + return err +} + +func TestReplace(t *testing.T) { + tests := []struct { + desc string + content string + replace []string + missing []string + }{ + { + desc: "FoundAll", + content: "#one #two", + replace: []string{"#one", "#two"}, + }, + { + desc: "MissingAll", + content: "", + replace: []string{"#one", "#two"}, + missing: []string{"#one", "#two"}, + }, + { + desc: "MissingOne", + content: "#two", + replace: []string{"#one", "#two"}, + missing: []string{"#one"}, + }, + } + for _, tc := range tests { + t.Run(tc.desc, func(t *testing.T) { + tr := New() + content := tc.content + for _, placeholder := range tc.replace { + content = tr.Replace(content, placeholder, "") + } + err := tr.Err() + if err != nil { + require.ErrorIs(t, err, newErrMissingPlaceholder(tc.missing)) + } else { + require.Empty(t, tc.missing) + } + }) + } +} + +func TestReplaceAll(t *testing.T) { + tests := []struct { + desc string + content string + replace []string + missing []string + }{ + { + desc: "FoundAll", + content: "#one #one #two", + replace: []string{"#one", "#two"}, + }, + { + desc: "MissingAll", + content: "", + replace: []string{"#one", "#two"}, + missing: []string{"#one", "#two"}, + }, + { + desc: "MissingOne", + content: "#two #two", + replace: []string{"#one", "#two"}, + missing: []string{"#one"}, + }, + } + for _, tc := range tests { + t.Run(tc.desc, func(t *testing.T) { + tr := New() + content := tc.content + for _, placeholder := range tc.replace { + content = tr.ReplaceAll(content, placeholder, "") + } + err := tr.Err() + if err != nil { + require.ErrorIs(t, err, newErrMissingPlaceholder(tc.missing)) + } else { + require.Empty(t, tc.missing) + } + }) + } +} diff --git a/pkg/randstr/randstr.go b/pkg/randstr/randstr.go new file mode 100644 index 000000000..df2e27f23 --- /dev/null +++ b/pkg/randstr/randstr.go @@ -0,0 +1,16 @@ +package randstr + +import ( + "math/rand" +) + +var letterRunes = []rune("abcdefghijklmnopqrstuvwxyz") + +// Runes generates a random string with n length from runes. +func Runes(n int) string { + b := make([]rune, n) + for i := range b { + b[i] = letterRunes[rand.Intn(len(letterRunes))] + } + return string(b) +} diff --git a/pkg/tarball/tarball.go b/pkg/tarball/tarball.go new file mode 100755 index 000000000..02f15abe7 --- /dev/null +++ b/pkg/tarball/tarball.go @@ -0,0 +1,57 @@ +package tarball + +import ( + "archive/tar" + "compress/gzip" + "errors" + "io" + "path/filepath" +) + +var ( + // ErrGzipFileNotFound the file not found in the gzip. + ErrGzipFileNotFound = errors.New("file not found in the gzip") + // ErrNotGzipType the file is not a gzip. + ErrNotGzipType = errors.New("file is not a gzip type") + // ErrInvalidFileName the file name is invalid. + ErrInvalidFileName = errors.New("invalid file name") +) + +// ExtractFile founds and reads a specific file into a gzip file and folders recursively. +func ExtractFile(reader io.Reader, out io.Writer, fileName string) (string, error) { + if fileName == "" { + return "", ErrInvalidFileName + } + archive, err := gzip.NewReader(reader) + // Verify if is a GZIP file + if errors.Is(err, io.EOF) || errors.Is(err, gzip.ErrHeader) { + return "", ErrNotGzipType + } else if err != nil { + return "", err + } + defer archive.Close() + + tarReader := tar.NewReader(archive) + // Read the tarball files and find only the necessary file + for { + header, err := tarReader.Next() + if errors.Is(err, io.EOF) { + return "", ErrGzipFileNotFound + } else if err != nil { + return header.Name, err + } + + switch header.Typeflag { + case tar.TypeDir: + continue + case tar.TypeReg: + name := filepath.Base(header.Name) + if fileName == name { + _, err := io.Copy(out, tarReader) + return header.Name, err + } + default: + continue + } + } +} diff --git a/pkg/txs/export.go b/pkg/txs/export.go deleted file mode 100644 index 8249d134f..000000000 --- a/pkg/txs/export.go +++ /dev/null @@ -1,59 +0,0 @@ -package txs - -import ( - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - grouptypes "github.com/cosmos/cosmos-sdk/x/group" - domaintypes "github.com/sonr-io/core/x/domain/types" - identitytypes "github.com/sonr-io/core/x/identity/types" - servicetypes "github.com/sonr-io/core/x/service/types" -) - -// ! ||--------------------------------------------------------------------------------|| -// ! || Cosmos: x/bank || -// ! ||--------------------------------------------------------------------------------|| -type MsgSend = banktypes.MsgSend -type MsgMultiSend = banktypes.MsgMultiSend - -// ! ||--------------------------------------------------------------------------------|| -// ! || Cosmos: x/group || -// ! ||--------------------------------------------------------------------------------|| -type MsgCreateGroup = grouptypes.MsgCreateGroup -type MsgUpdateGroupMembers = grouptypes.MsgUpdateGroupMembers -type MsgUpdateGroupAdmin = grouptypes.MsgUpdateGroupAdmin -type MsgUpdateGroupMetadata = grouptypes.MsgUpdateGroupMetadata -type MsgCreateGroupPolicy = grouptypes.MsgCreateGroupPolicy -type MsgUpdateGroupPolicyAdmin = grouptypes.MsgUpdateGroupPolicyAdmin -type MsgCreateGroupWithPolicy = grouptypes.MsgCreateGroupWithPolicy -type MsgUpdateGroupPolicyDecisionPolicy = grouptypes.MsgUpdateGroupPolicyDecisionPolicy -type MsgUpdateGroupPolicyMetadata = grouptypes.MsgUpdateGroupPolicyMetadata -type MsgSubmitProposal = grouptypes.MsgSubmitProposal -type MsgWithdrawProposal = grouptypes.MsgWithdrawProposal -type MsgVote = grouptypes.MsgVote -type MsgExec = grouptypes.MsgExec -type MsgLeaveGroup = grouptypes.MsgLeaveGroup - -// ! ||--------------------------------------------------------------------------------|| -// ! || Sonr: x/domain || -// ! ||--------------------------------------------------------------------------------|| -type MsgCreateUsernameRecords = domaintypes.MsgCreateUsernameRecords -type MsgUpdateUsernameRecords = domaintypes.MsgUpdateUsernameRecords -type MsgDeleteUsernameRecords = domaintypes.MsgDeleteUsernameRecords - -// ! ||--------------------------------------------------------------------------------|| -// ! || Sonr: x/service || -// ! ||--------------------------------------------------------------------------------|| -type MsgCreateServiceRecord = servicetypes.MsgCreateServiceRecord -type MsgUpdateServiceRecord = servicetypes.MsgUpdateServiceRecord -type MsgDeleteServiceRecord = servicetypes.MsgDeleteServiceRecord - -// ! ||--------------------------------------------------------------------------------|| -// ! || Sonr: x/identity || -// ! ||--------------------------------------------------------------------------------|| -type MsgCreateControllerAccount = identitytypes.MsgCreateControllerAccount -type MsgUpdateControllerAccount = identitytypes.MsgUpdateControllerAccount -type MsgDeleteControllerAccount = identitytypes.MsgDeleteControllerAccount -type MsgCreateEscrowAccount = identitytypes.MsgCreateEscrowAccount -type MsgUpdateEscrowAccount = identitytypes.MsgUpdateEscrowAccount -type MsgDeleteEscrowAccount = identitytypes.MsgDeleteEscrowAccount -type MsgRegisterIdentity = identitytypes.MsgRegisterIdentity - diff --git a/pkg/validation/errors.go b/pkg/validation/errors.go new file mode 100755 index 000000000..345ad9de5 --- /dev/null +++ b/pkg/validation/errors.go @@ -0,0 +1,7 @@ +package validation + +// Error must be implemented by errors that provide validation info. +type Error interface { + error + ValidationInfo() string +} diff --git a/pkg/xfilepath/xfilepath.go b/pkg/xfilepath/xfilepath.go new file mode 100644 index 000000000..19dfe14ff --- /dev/null +++ b/pkg/xfilepath/xfilepath.go @@ -0,0 +1,88 @@ +// Package xfilepath defines functions to define path retrievers that support error handling +package xfilepath + +import ( + "os" + "path/filepath" +) + +// PathRetriever is a function that retrieves the contained path or an error. +type PathRetriever func() (path string, err error) + +// PathsRetriever is a function that retrieves the contained list of paths or an error. +type PathsRetriever func() (path []string, err error) + +// MustInvoke invokes the PathsRetriever func and panics if it returns an error. +func MustInvoke(p PathRetriever) string { + path, err := p() + if err != nil { + panic(err) + } + return path +} + +// Path returns a path retriever from the provided path. +func Path(path string) PathRetriever { + return func() (string, error) { return path, nil } +} + +// PathWithError returns a path retriever from the provided path and error. +func PathWithError(path string, err error) PathRetriever { + return func() (string, error) { return path, err } +} + +// Join returns a path retriever from the join of the provided path retrievers. +// The returned path retriever eventually returns the error from the first provided path retrievers +// that returns a non-nil error. +func Join(paths ...PathRetriever) PathRetriever { + return func() (string, error) { + var components []string + var err error + for _, path := range paths { + var component string + component, err = path() + if err != nil { + break + } + components = append(components, component) + } + path := filepath.Join(components...) + return path, err + } +} + +// JoinFromHome returns a path retriever from the join of the user home and the provided path retrievers. +// The returned path retriever eventually returns the error from the first provided path retrievers that returns a non-nil error. +func JoinFromHome(paths ...PathRetriever) PathRetriever { + return Join(append([]PathRetriever{os.UserHomeDir}, paths...)...) +} + +// List returns a paths retriever from a list of path retrievers. +// The returned paths retriever eventually returns the error from the first provided path retrievers that returns a non-nil error. +func List(paths ...PathRetriever) PathsRetriever { + return func() ([]string, error) { + var list []string + var err error + for _, path := range paths { + var resolved string + resolved, err = path() + if err != nil { + break + } + list = append(list, resolved) + } + + return list, err + } +} + +// Mkdir ensure path exists before returning it. +func Mkdir(path PathRetriever) PathRetriever { + return func() (string, error) { + p, err := path() + if err != nil { + return "", err + } + return p, os.MkdirAll(p, 0o755) + } +} diff --git a/pkg/xfilepath/xfilepath_test.go b/pkg/xfilepath/xfilepath_test.go new file mode 100644 index 000000000..b4395dc3d --- /dev/null +++ b/pkg/xfilepath/xfilepath_test.go @@ -0,0 +1,101 @@ +package xfilepath_test + +import ( + "errors" + "os" + "path" + "path/filepath" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/sonr-io/core/pkg/xfilepath" +) + +func TestJoin(t *testing.T) { + retriever := xfilepath.Join( + xfilepath.Path("foo"), + xfilepath.PathWithError("bar", nil), + xfilepath.Path("foobar/barfoo"), + ) + p, err := retriever() + require.NoError(t, err) + require.Equal(t, filepath.Join( + "foo", + "bar", + "foobar", + "barfoo", + ), p) + + retriever = xfilepath.Join( + xfilepath.Path("foo"), + xfilepath.PathWithError("bar", errors.New("foo")), + xfilepath.Path("foobar/barfoo"), + ) + _, err = retriever() + require.Error(t, err) +} + +func TestJoinFromHome(t *testing.T) { + home, err := os.UserHomeDir() + require.NoError(t, err) + + retriever := xfilepath.JoinFromHome( + xfilepath.Path("foo"), + xfilepath.PathWithError("bar", nil), + xfilepath.Path("foobar/barfoo"), + ) + p, err := retriever() + require.NoError(t, err) + require.Equal(t, filepath.Join( + home, + "foo", + "bar", + "foobar", + "barfoo", + ), p) + + retriever = xfilepath.JoinFromHome( + xfilepath.Path("foo"), + xfilepath.PathWithError("bar", errors.New("foo")), + xfilepath.Path("foobar/barfoo"), + ) + _, err = retriever() + require.Error(t, err) +} + +func TestList(t *testing.T) { + retriever := xfilepath.List() + list, err := retriever() + require.NoError(t, err) + require.Equal(t, []string(nil), list) + + retriever1 := xfilepath.Join( + xfilepath.Path("foo/bar"), + ) + retriever2 := xfilepath.Join( + xfilepath.Path("bar/foo"), + ) + retriever = xfilepath.List(retriever1, retriever2) + list, err = retriever() + require.NoError(t, err) + require.Equal(t, []string{ + filepath.Join("foo", "bar"), + filepath.Join("bar", "foo"), + }, list) + + retrieverError := xfilepath.PathWithError("foo", errors.New("foo")) + retriever = xfilepath.List(retriever1, retrieverError, retriever2) + _, err = retriever() + require.Error(t, err) +} + +func TestMkdir(t *testing.T) { + newdir := path.Join(t.TempDir(), "hey") + + dir, err := xfilepath.Mkdir(xfilepath.Path(newdir))() + + require.NoError(t, err) + require.Equal(t, newdir, dir) + require.DirExists(t, dir) +} diff --git a/pkg/xgenny/run.go b/pkg/xgenny/run.go new file mode 100755 index 000000000..c34153df8 --- /dev/null +++ b/pkg/xgenny/run.go @@ -0,0 +1,104 @@ +package xgenny + +import ( + "context" + "errors" + "os" + "strings" + + "github.com/gobuffalo/genny/v2" + "github.com/gobuffalo/logger" + "github.com/gobuffalo/packd" + + "github.com/sonr-io/core/pkg/placeholder" + "github.com/sonr-io/core/pkg/validation" +) + +var _ validation.Error = (*dryRunError)(nil) + +type dryRunError struct { + error +} + +// ValidationInfo returns validation info. +func (d *dryRunError) ValidationInfo() string { + return d.Error() +} + +// DryRunner is a genny DryRunner with a logger. +func DryRunner(ctx context.Context) *genny.Runner { + runner := genny.DryRunner(ctx) + runner.Logger = logger.New(genny.DefaultLogLvl) + return runner +} + +// RunWithValidation checks the generators with a dry run and then execute the wet runner to the generators. +func RunWithValidation( + tracer *placeholder.Tracer, + gens ...*genny.Generator, +) (sm SourceModification, err error) { + // run executes the provided runner with the provided generator + run := func(runner *genny.Runner, gen *genny.Generator) error { + err := runner.With(gen) + if err != nil { + return err + } + return runner.Run() + } + for _, gen := range gens { + // check with a dry runner the generators + dryRunner := DryRunner(context.Background()) + if err := run(dryRunner, gen); err != nil { + if errors.Is(err, os.ErrNotExist) { + return sm, &dryRunError{err} + } + return sm, err + } + if err := tracer.Err(); err != nil { + return sm, err + } + + // fetch the source modification + sm = NewSourceModification() + for _, file := range dryRunner.Results().Files { + fileName := file.Name() + _, err := os.Stat(fileName) + + //nolint:gocritic + if os.IsNotExist(err) { + // if the file doesn't exist in the source, it means it has been created by the runner + sm.AppendCreatedFiles(fileName) + } else if err != nil { + return sm, err + } else { + // the file has been modified by the runner + sm.AppendModifiedFiles(fileName) + } + } + + // execute the modification with a wet runner + if err := run(genny.WetRunner(context.Background()), gen); err != nil { + return sm, err + } + } + return sm, nil +} + +// Box will mount each file in the Box and wrap it, already existing files are ignored. +func Box(g *genny.Generator, box packd.Walker) error { + return box.Walk(func(path string, bf packd.File) error { + f := genny.NewFile(path, bf) + f, err := g.Transform(f) + if err != nil { + return err + } + filePath := strings.TrimSuffix(f.Name(), ".plush") + _, err = os.Stat(filePath) + if os.IsNotExist(err) { + // path doesn't exist. move on. + g.File(f) + return nil + } + return err + }) +} diff --git a/pkg/xgenny/sourcemodification.go b/pkg/xgenny/sourcemodification.go new file mode 100755 index 000000000..f74bb90fd --- /dev/null +++ b/pkg/xgenny/sourcemodification.go @@ -0,0 +1,58 @@ +package xgenny + +// SourceModification describes modified and created files in the source code after a run. +type SourceModification struct { + modified map[string]struct{} + created map[string]struct{} +} + +func NewSourceModification() SourceModification { + return SourceModification{ + make(map[string]struct{}), + make(map[string]struct{}), + } +} + +// ModifiedFiles returns the modified files of the source modification. +func (sm SourceModification) ModifiedFiles() (modifiedFiles []string) { + for modified := range sm.modified { + modifiedFiles = append(modifiedFiles, modified) + } + return +} + +// CreatedFiles returns the created files of the source modification. +func (sm SourceModification) CreatedFiles() (createdFiles []string) { + for created := range sm.created { + createdFiles = append(createdFiles, created) + } + return +} + +// AppendModifiedFiles appends modified files in the source modification that are not already documented. +func (sm *SourceModification) AppendModifiedFiles(modifiedFiles ...string) { + for _, modifiedFile := range modifiedFiles { + _, alreadyModified := sm.modified[modifiedFile] + _, alreadyCreated := sm.created[modifiedFile] + if !alreadyModified && !alreadyCreated { + sm.modified[modifiedFile] = struct{}{} + } + } +} + +// AppendCreatedFiles appends a created files in the source modification that are not already documented. +func (sm *SourceModification) AppendCreatedFiles(createdFiles ...string) { + for _, createdFile := range createdFiles { + _, alreadyModified := sm.modified[createdFile] + _, alreadyCreated := sm.created[createdFile] + if !alreadyModified && !alreadyCreated { + sm.created[createdFile] = struct{}{} + } + } +} + +// Merge merges new source modification to an existing one. +func (sm *SourceModification) Merge(newSm SourceModification) { + sm.AppendModifiedFiles(newSm.ModifiedFiles()...) + sm.AppendCreatedFiles(newSm.CreatedFiles()...) +} diff --git a/pkg/xgenny/sourcemodification_test.go b/pkg/xgenny/sourcemodification_test.go new file mode 100755 index 000000000..18d8887ac --- /dev/null +++ b/pkg/xgenny/sourcemodification_test.go @@ -0,0 +1,83 @@ +package xgenny_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/sonr-io/core/pkg/xgenny" +) + +var ( + modifiedExample = []string{"mfoo", "mbar", "mfoobar"} + createdExample = []string{"cfoo", "cbar", "cfoobar"} +) + +func sourceModificationExample() xgenny.SourceModification { + sourceModification := xgenny.NewSourceModification() + sourceModification.AppendModifiedFiles(modifiedExample...) + sourceModification.AppendCreatedFiles(createdExample...) + return sourceModification +} + +func TestNewSourceModification(t *testing.T) { + sm := xgenny.NewSourceModification() + require.Empty(t, sm.ModifiedFiles()) + require.Empty(t, sm.CreatedFiles()) +} + +func TestModifiedFiles(t *testing.T) { + sm := sourceModificationExample() + require.Len(t, sm.ModifiedFiles(), len(modifiedExample)) + require.Subset(t, sm.ModifiedFiles(), modifiedExample) +} + +func TestCreatedFiles(t *testing.T) { + sm := sourceModificationExample() + require.Len(t, sm.CreatedFiles(), len(createdExample)) + require.Subset(t, sm.CreatedFiles(), createdExample) +} + +func TestAppendModifiedFiles(t *testing.T) { + sm := sourceModificationExample() + sm.AppendModifiedFiles("foo1") + require.Len(t, sm.ModifiedFiles(), len(modifiedExample)+1) + require.Contains(t, sm.ModifiedFiles(), "foo1") + + // Do not append a existing element + sm.AppendModifiedFiles("foo1") + require.Len(t, sm.ModifiedFiles(), len(modifiedExample)+1) + sm.AppendCreatedFiles("foo2") + sm.AppendModifiedFiles("foo2") + require.Len(t, sm.ModifiedFiles(), len(modifiedExample)+1) +} + +func TestAppendCreatedFiles(t *testing.T) { + sm := sourceModificationExample() + sm.AppendCreatedFiles("foo1") + require.Len(t, sm.CreatedFiles(), len(createdExample)+1) + require.Contains(t, sm.CreatedFiles(), "foo1") + + // Do not append a existing element + sm.AppendCreatedFiles("foo1") + require.Len(t, sm.CreatedFiles(), len(createdExample)+1) + sm.AppendModifiedFiles("foo2") + sm.AppendCreatedFiles("foo2") + require.Len(t, sm.ModifiedFiles(), len(modifiedExample)+1) +} + +func TestMerge(t *testing.T) { + sm1 := xgenny.NewSourceModification() + sm2 := xgenny.NewSourceModification() + + sm1.AppendModifiedFiles("foo1", "foo2", "foo3") + sm2.AppendModifiedFiles("foo3", "foo4", "foo5") + sm1.AppendCreatedFiles("bar1", "bar2", "bar3") + sm2.AppendCreatedFiles("foo1", "bar2", "bar3") + + sm1.Merge(sm2) + require.Len(t, sm1.ModifiedFiles(), 5) + require.Len(t, sm1.CreatedFiles(), 3) + require.Subset(t, sm1.ModifiedFiles(), []string{"foo1", "foo2", "foo3", "foo4", "foo5"}) + require.Subset(t, sm1.CreatedFiles(), []string{"bar1", "bar2", "bar3"}) +} diff --git a/pkg/xgenny/xgenny.go b/pkg/xgenny/xgenny.go new file mode 100755 index 000000000..4338a58c7 --- /dev/null +++ b/pkg/xgenny/xgenny.go @@ -0,0 +1,77 @@ +package xgenny + +import ( + "bytes" + "embed" + "path/filepath" + "strings" + + "github.com/gobuffalo/genny/v2" + "github.com/gobuffalo/plush/v4" + "github.com/pkg/errors" + + "github.com/gobuffalo/packd" +) + +// Walker implements packd.Walker for Go embed's fs.FS. +type Walker struct { + fs embed.FS + trimPrefix string + path string +} + +// NewEmbedWalker returns a new Walker for fs. +// trimPrefix is used to trim parent paths from the paths of found files. +func NewEmbedWalker(fs embed.FS, trimPrefix, path string) Walker { + return Walker{fs: fs, trimPrefix: trimPrefix, path: path} +} + +// Walk implements packd.Walker. +func (w Walker) Walk(wl packd.WalkFunc) error { + return w.walkDir(wl, ".") +} + +func (w Walker) walkDir(wl packd.WalkFunc, path string) error { + entries, err := w.fs.ReadDir(path) + if err != nil { + return err + } + + for _, entry := range entries { + if entry.IsDir() { + w.walkDir(wl, filepath.Join(path, entry.Name())) + continue + } + + entryPath := filepath.Join(path, entry.Name()) + + data, err := w.fs.ReadFile(entryPath) + if err != nil { + return err + } + + trimPath := strings.TrimPrefix(entryPath, w.trimPrefix) + trimPath = filepath.Join(w.path, trimPath) + f, err := packd.NewFile(trimPath, bytes.NewReader(data)) + if err != nil { + return err + } + + wl(trimPath, f) + } + + return nil +} + +// Transformer will plush-ify any file that has a ".plush" extension. +func Transformer(ctx *plush.Context) genny.Transformer { + t := genny.NewTransformer(".plush", func(f genny.File) (genny.File, error) { + s, err := plush.RenderR(f, ctx) + if err != nil { + return f, errors.Wrap(err, f.Name()) + } + return genny.NewFileS(f.Name(), s), nil + }) + t.StripExt = true + return t +} diff --git a/pkg/xgenny/xgenny_test.go b/pkg/xgenny/xgenny_test.go new file mode 100755 index 000000000..153101922 --- /dev/null +++ b/pkg/xgenny/xgenny_test.go @@ -0,0 +1,47 @@ +package xgenny_test + +import ( + "io" + "strings" + "testing" + + "github.com/gobuffalo/genny/v2" + "github.com/gobuffalo/plush/v4" + "github.com/stretchr/testify/require" + + "github.com/sonr-io/core/pkg/xgenny" +) + +func Test_Transformer(t *testing.T) { + r := require.New(t) + + ctx := plush.NewContext() + ctx.Set("name", "mark") + f := genny.NewFile("foo.plush.txt", strings.NewReader("Hello <%= name %>")) + + tr := xgenny.Transformer(ctx) + f, err := tr.Transform(f) + r.NoError(err) + r.Equal("foo.txt", f.Name()) + + b, err := io.ReadAll(f) + r.NoError(err) + r.Equal("Hello mark", string(b)) +} + +func Test_Transformer_No_Ext(t *testing.T) { + r := require.New(t) + + ctx := plush.NewContext() + ctx.Set("name", "mark") + f := genny.NewFile("foo.txt", strings.NewReader("Hello <%= name %>")) + + tr := xgenny.Transformer(ctx) + f, err := tr.Transform(f) + r.NoError(err) + r.Equal("foo.txt", f.Name()) + + b, err := io.ReadAll(f) + r.NoError(err) + r.Equal("Hello <%= name %>", string(b)) +} diff --git a/pkg/xgit/xgit.go b/pkg/xgit/xgit.go new file mode 100644 index 000000000..919889c98 --- /dev/null +++ b/pkg/xgit/xgit.go @@ -0,0 +1,156 @@ +package xgit + +import ( + "context" + "errors" + "fmt" + "os" + "path/filepath" + "strings" + "time" + + "github.com/go-git/go-git/v5" + "github.com/go-git/go-git/v5/plumbing" + "github.com/go-git/go-git/v5/plumbing/object" +) + +var ( + commitMsg = "Initialized with Ignite CLI" + defaultOpenOpts = git.PlainOpenOptions{DetectDotGit: true} + devXAuthor = &object.Signature{ + Name: "Developer Experience team at Ignite", + Email: "hello@ignite.com", + When: time.Now(), + } +) + +// InitAndCommit creates a git repo in path if path isn't already inside a git +// repository, then commits path content. +func InitAndCommit(path string) error { + repo, err := git.PlainOpenWithOptions(path, &defaultOpenOpts) + if err != nil { + if !errors.Is(err, git.ErrRepositoryNotExists) { + return fmt.Errorf("open git repo %s: %w", path, err) + } + // not a git repo, creates a new one + repo, err = git.PlainInit(path, false) + if err != nil { + return fmt.Errorf("init git repo %s: %w", path, err) + } + } + wt, err := repo.Worktree() + if err != nil { + return fmt.Errorf("worktree %s: %w", path, err) + } + // wt.Add(path) takes only relative path, we need to turn path relative to + // repo path. + repoPath := wt.Filesystem.Root() + path, err = filepath.Rel(repoPath, path) + if err != nil { + return fmt.Errorf("find relative path %s %s: %w", repoPath, path, err) + } + if _, err := wt.Add(path); err != nil { + return fmt.Errorf("git add %s: %w", path, err) + } + _, err = wt.Commit(commitMsg, &git.CommitOptions{ + All: true, + Author: devXAuthor, + }) + if err != nil { + return fmt.Errorf("git commit %s: %w", path, err) + } + return nil +} + +// AreChangesCommitted returns true if dir is a clean git repository with no +// pending changes. It returns also true if dir is NOT a git repository. +func AreChangesCommitted(dir string) (bool, error) { + dir, err := filepath.Abs(dir) + if err != nil { + return false, err + } + + repository, err := git.PlainOpen(dir) + if err != nil { + if errors.Is(err, git.ErrRepositoryNotExists) { + return true, nil + } + return false, err + } + + w, err := repository.Worktree() + if err != nil { + return false, err + } + + ws, err := w.Status() + if err != nil { + return false, err + } + return ws.IsClean(), nil +} + +// Clone clones a git repository represented by urlRef, into dir. +// urlRef is the URL of the repository, with an optional ref, suffixed to the +// URL with a `@`. Ref can be a tag, a branch or a hash. +// Valid examples of urlRef: github.com/org/repo, github.com/org/repo@v1, +// github.com/org/repo@develop, github.com/org/repo@ab88cdf. +func Clone(ctx context.Context, urlRef, dir string) error { + // Ensure dir is empty if it exists (if it doesn't exist, the call to + // git.PlainCloneContext below will create it). + files, _ := os.ReadDir(dir) + if len(files) > 0 { + return fmt.Errorf("clone: target directory %q is not empty", dir) + } + // Split urlRef + var ( + parts = strings.Split(urlRef, "@") + url = parts[0] + ref string + ) + if len(parts) > 1 { + ref = parts[1] + } + // First clone the repo + repo, err := git.PlainCloneContext(ctx, dir, false, &git.CloneOptions{ + URL: url, + }) + if err != nil { + return err + } + if ref == "" { + // if ref is not provided, job is done + return nil + } + // Reference provided, try to resolve + wt, err := repo.Worktree() + if err != nil { + return err + } + var h *plumbing.Hash + for _, ref := range []string{ref, "origin/" + ref} { + h, err = repo.ResolveRevision(plumbing.Revision(ref)) + if err == nil { + break + } + } + if err != nil { + // Ref not found, clean up dir and return error + os.RemoveAll(dir) + return err + } + return wt.Checkout(&git.CheckoutOptions{ + Hash: *h, + }) +} + +// IsRepository checks if a path contains a Git repository. +func IsRepository(path string) (bool, error) { + if _, err := git.PlainOpenWithOptions(path, &defaultOpenOpts); err != nil { + if errors.Is(err, git.ErrRepositoryNotExists) { + return false, nil + } + return false, err + } + return true, nil +} diff --git a/pkg/xgit/xgit_test.go b/pkg/xgit/xgit_test.go new file mode 100644 index 000000000..62b1dac54 --- /dev/null +++ b/pkg/xgit/xgit_test.go @@ -0,0 +1,434 @@ +package xgit_test + +import ( + "context" + "fmt" + "os" + "path" + "testing" + "time" + + "github.com/go-git/go-git/v5" + "github.com/go-git/go-git/v5/plumbing" + "github.com/go-git/go-git/v5/plumbing/object" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/sonr-io/core/pkg/randstr" + "github.com/sonr-io/core/pkg/xgit" +) + +func TestInitAndCommit(t *testing.T) { + tests := []struct { + name string + dirFunc func(*testing.T) string + expectDotGitFolder bool + expectedNumCommits int + expectedFilesInCommit []string + }{ + { + name: "dir is not inside an existing repo", + dirFunc: func(t *testing.T) string { + dir := t.TempDir() + err := os.WriteFile(path.Join(dir, "foo"), []byte("hello"), 0o755) + require.NoError(t, err) + return dir + }, + expectDotGitFolder: true, + expectedNumCommits: 1, + expectedFilesInCommit: []string{"foo"}, + }, + { + name: "dir is inside an existing repo", + // In this repo, there's no existing commit but a standalone uncommitted + // foo file that shouldn't be included in the xgit.InitAndCommit's commit. + dirFunc: func(t *testing.T) string { + dir := t.TempDir() + _, err := git.PlainInit(dir, false) + require.NoError(t, err) + err = os.WriteFile(path.Join(dir, "foo"), []byte("hello"), 0o755) + require.NoError(t, err) + dirInsideRepo := path.Join(dir, "bar") + err = os.Mkdir(dirInsideRepo, 0o0755) + require.NoError(t, err) + err = os.WriteFile(path.Join(dirInsideRepo, "baz"), []byte("hello"), 0o755) + require.NoError(t, err) + return dirInsideRepo + }, + expectDotGitFolder: false, + expectedNumCommits: 1, + expectedFilesInCommit: []string{"bar/baz"}, + }, + { + name: "dir is an existing repo", + dirFunc: func(t *testing.T) string { + // In this repo, there's one existing commit, and an uncommitted baz file + // that must be included in the xgit.InitAndCommit's commit. + dir := t.TempDir() + _, err := git.PlainInit(dir, false) + require.NoError(t, err) + err = os.WriteFile(path.Join(dir, "foo"), []byte("hello"), 0o755) + require.NoError(t, err) + repo, err := git.PlainOpenWithOptions(dir, &git.PlainOpenOptions{}) + require.NoError(t, err) + wt, err := repo.Worktree() + require.NoError(t, err) + _, err = wt.Add(".") + require.NoError(t, err) + _, err = wt.Commit("First commit", &git.CommitOptions{ + Author: &object.Signature{}, + }) + require.NoError(t, err) + err = os.WriteFile(path.Join(dir, "bar"), []byte("hello"), 0o755) + require.NoError(t, err) + return dir + }, + expectDotGitFolder: true, + expectedNumCommits: 2, + expectedFilesInCommit: []string{"bar"}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + dir := tt.dirFunc(t) + + err := xgit.InitAndCommit(dir) + + require.NoError(t, err) + _, err = os.Stat(path.Join(dir, ".git")) + require.Equal(t, tt.expectDotGitFolder, !os.IsNotExist(err)) + // Assert repository commits. For that we need to open the repo and + // iterate over existing commits. + repo, err := git.PlainOpenWithOptions(dir, &git.PlainOpenOptions{ + DetectDotGit: true, + }) + require.NoError(t, err) + logs, err := repo.Log(&git.LogOptions{}) + require.NoError(t, err) + var ( + numCommits int + lastCommit *object.Commit + ) + err = logs.ForEach(func(c *object.Commit) error { + if numCommits == 0 { + lastCommit = c + } + numCommits++ + return nil + }) + require.NoError(t, err) + require.Equal(t, tt.expectedNumCommits, numCommits) + if assert.NotNil(t, lastCommit) { + require.Equal(t, "Initialized with Ignite CLI", lastCommit.Message) + require.WithinDuration(t, time.Now(), lastCommit.Committer.When, 10*time.Second) + require.Equal(t, "Developer Experience team at Ignite", lastCommit.Author.Name) + require.Equal(t, "hello@ignite.com", lastCommit.Author.Email) + stats, err := lastCommit.Stats() + require.NoError(t, err) + var files []string + for _, s := range stats { + files = append(files, s.Name) + } + require.Equal(t, tt.expectedFilesInCommit, files) + } + }) + } +} + +func TestAreChangesCommitted(t *testing.T) { + tests := []struct { + name string + dirFunc func(*testing.T) string + expectedResult bool + }{ + { + name: "dir is not a git repo", + dirFunc: func(t *testing.T) string { + return t.TempDir() + }, + expectedResult: true, + }, + { + name: "dir is a empty git repo", + dirFunc: func(t *testing.T) string { + dir := t.TempDir() + _, err := git.PlainInit(dir, false) + require.NoError(t, err) + return dir + }, + expectedResult: true, + }, + { + name: "dir is a dirty empty git repo", + dirFunc: func(t *testing.T) string { + dir := t.TempDir() + _, err := git.PlainInit(dir, false) + require.NoError(t, err) + err = os.WriteFile(path.Join(dir, "foo"), []byte("hello"), 0o755) + require.NoError(t, err) + return dir + }, + expectedResult: false, + }, + { + name: "dir is a cleaned git repo", + dirFunc: func(t *testing.T) string { + dir := t.TempDir() + _, err := git.PlainInit(dir, false) + require.NoError(t, err) + err = os.WriteFile(path.Join(dir, "foo"), []byte("hello"), 0o755) + require.NoError(t, err) + repo, err := git.PlainOpenWithOptions(dir, &git.PlainOpenOptions{}) + require.NoError(t, err) + wt, err := repo.Worktree() + require.NoError(t, err) + _, err = wt.Add(".") + require.NoError(t, err) + _, err = wt.Commit("First commit", &git.CommitOptions{ + Author: &object.Signature{}, + }) + require.NoError(t, err) + return dir + }, + expectedResult: true, + }, + { + name: "dir is a dirty git repo", + dirFunc: func(t *testing.T) string { + dir := t.TempDir() + _, err := git.PlainInit(dir, false) + require.NoError(t, err) + err = os.WriteFile(path.Join(dir, "foo"), []byte("hello"), 0o755) + require.NoError(t, err) + repo, err := git.PlainOpenWithOptions(dir, &git.PlainOpenOptions{}) + require.NoError(t, err) + wt, err := repo.Worktree() + require.NoError(t, err) + _, err = wt.Add(".") + require.NoError(t, err) + _, err = wt.Commit("First commit", &git.CommitOptions{ + Author: &object.Signature{}, + }) + require.NoError(t, err) + err = os.WriteFile(path.Join(dir, "bar"), []byte("hello"), 0o755) + require.NoError(t, err) + return dir + }, + expectedResult: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + dir := tt.dirFunc(t) + + res, err := xgit.AreChangesCommitted(dir) + + require.NoError(t, err) + assert.Equal(t, tt.expectedResult, res) + }) + } +} + +func TestClone(t *testing.T) { + // Create a folder with content + notEmptyDir := t.TempDir() + err := os.WriteFile(path.Join(notEmptyDir, ".foo"), []byte("hello"), 0o755) + require.NoError(t, err) + // Create a local git repo for all the test cases + repoDir := t.TempDir() + repo, err := git.PlainInit(repoDir, false) + require.NoError(t, err) + err = os.WriteFile(path.Join(repoDir, "foo"), []byte("hello"), 0o755) + require.NoError(t, err) + // Add a first commit + w, err := repo.Worktree() + require.NoError(t, err) + _, err = w.Add(".") + require.NoError(t, err) + commit1, err := w.Commit("commit1", &git.CommitOptions{ + Author: &object.Signature{ + Name: "bob", + Email: "bob@example.com", + When: time.Now(), + }, + }) + // Add a branch on commit1 + require.NoError(t, err) + err = w.Checkout(&git.CheckoutOptions{ + Branch: plumbing.NewBranchReferenceName("my-branch"), + Create: true, + }) + require.NoError(t, err) + // Back to master + err = w.Checkout(&git.CheckoutOptions{Branch: plumbing.NewBranchReferenceName("master")}) + require.NoError(t, err) + // Add a tag on commit1 + _, err = repo.CreateTag("v1", commit1, &git.CreateTagOptions{ + Tagger: &object.Signature{Name: "me"}, + Message: "v1", + }) + require.NoError(t, err) + // Add a second commit + err = os.WriteFile(path.Join(repoDir, "bar"), []byte("hello"), 0o755) + require.NoError(t, err) + _, err = w.Add(".") + require.NoError(t, err) + commit2, err := w.Commit("commit2", &git.CommitOptions{ + Author: &object.Signature{ + Name: "bob", + Email: "bob@example.com", + When: time.Now(), + }, + }) + require.NoError(t, err) + + tests := []struct { + name string + dir string + urlRef string + expectedError string + expectedRef plumbing.Hash + }{ + { + name: "fail: repo doesn't exist", + dir: t.TempDir(), + urlRef: "/tmp/not/exists", + expectedError: "repository not found", + }, + { + name: "fail: target dir isn't empty", + dir: notEmptyDir, + urlRef: repoDir, + expectedError: fmt.Sprintf(`clone: target directory "%s" is not empty`, notEmptyDir), + }, + { + name: "ok: target dir doesn't exists", + dir: "/tmp/not/exists/" + randstr.Runes(6), + urlRef: repoDir, + expectedRef: commit2, + }, + { + name: "ok: no ref", + dir: t.TempDir(), + urlRef: repoDir, + expectedRef: commit2, + }, + { + name: "ok: empty ref", + dir: t.TempDir(), + urlRef: repoDir + "@", + expectedRef: commit2, + }, + { + name: "ok: with tag ref", + dir: t.TempDir(), + urlRef: repoDir + "@v1", + expectedRef: commit1, + }, + { + name: "ok: with branch ref", + dir: t.TempDir(), + urlRef: repoDir + "@my-branch", + expectedRef: commit1, + }, + { + name: "ok: with commit1 hash ref", + dir: t.TempDir(), + urlRef: repoDir + "@" + commit1.String(), + expectedRef: commit1, + }, + { + name: "ok: with commit2 hash ref", + dir: t.TempDir(), + urlRef: repoDir + "@" + commit2.String(), + expectedRef: commit2, + }, + { + name: "fail: ref not found", + dir: t.TempDir(), + urlRef: repoDir + "@what", + expectedError: "reference not found", + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + var ( + files, _ = os.ReadDir(tt.dir) + dirWasEmpty = len(files) == 0 + ) + + err := xgit.Clone(context.Background(), tt.urlRef, tt.dir) + + if tt.expectedError != "" { + require.EqualError(t, err, tt.expectedError) + if dirWasEmpty { + // If it was empty, ensure target dir is still clean + files, _ := os.ReadDir(tt.dir) + require.Empty(t, files, "target dir should be empty in case of error") + } + return + } + require.NoError(t, err) + _, err = os.Stat(tt.dir) + require.False(t, os.IsNotExist(err), "dir %s should exist", tt.dir) + repo, err := git.PlainOpen(tt.dir) + require.NoError(t, err) + h, err := repo.Head() + require.NoError(t, err) + require.Equal(t, tt.expectedRef, h.Hash()) + }) + } +} + +func TestIsRepository(t *testing.T) { + tests := []struct { + name string + dirFunc func(*testing.T) string + shouldFail bool + expected bool + }{ + { + name: "path is a repository", + dirFunc: func(t *testing.T) string { + dir := t.TempDir() + _, err := git.PlainInit(dir, false) + require.NoError(t, err) + return dir + }, + expected: true, + }, + { + name: "path is not a repository", + dirFunc: func(t *testing.T) string { + return t.TempDir() + }, + expected: false, + }, + { + name: "repository error", + dirFunc: func(t *testing.T) string { + dir := t.TempDir() + err := os.Chmod(dir, 0) + require.NoError(t, err) + return dir + }, + shouldFail: true, + expected: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + // Act + exists, err := xgit.IsRepository(tt.dirFunc(t)) + + // Assert + require.Equal(t, tt.expected, exists) + + if tt.shouldFail { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/pkg/xio/xio.go b/pkg/xio/xio.go new file mode 100755 index 000000000..4d0b7e067 --- /dev/null +++ b/pkg/xio/xio.go @@ -0,0 +1,16 @@ +package xio + +import "io" + +type nopWriteCloser struct { + io.Writer +} + +func (w *nopWriteCloser) Close() error { + return nil +} + +// NopWriteCloser returns a WriteCloser. +func NopWriteCloser(w io.Writer) io.WriteCloser { + return &nopWriteCloser{w} +} diff --git a/pkg/xnet/xnet.go b/pkg/xnet/xnet.go new file mode 100755 index 000000000..62c784846 --- /dev/null +++ b/pkg/xnet/xnet.go @@ -0,0 +1,55 @@ +package xnet + +import ( + "fmt" + "net" + "strconv" +) + +// LocalhostIPv4Address returns a localhost IPv4 address with a port +// that represents the localhost IP address listening on that port. +func LocalhostIPv4Address(port int) string { + return fmt.Sprintf("localhost:%d", port) +} + +// AnyIPv4Address returns an IPv4 meta address "0.0.0.0" with a port +// that represents any IP address listening on that port. +func AnyIPv4Address(port int) string { + return fmt.Sprintf("0.0.0.0:%d", port) +} + +// IncreasePort increases a port number by 1. +// This can be useful to generate port ranges or consecutive +// port numbers for the same address. +func IncreasePort(addr string) (string, error) { + return IncreasePortBy(addr, 1) +} + +// IncreasePortBy increases a port number by a factor of "inc". +// This can be useful to generate port ranges or consecutive +// port numbers for the same address. +func IncreasePortBy(addr string, inc uint64) (string, error) { + host, port, err := net.SplitHostPort(addr) + if err != nil { + return "", err + } + + v, err := strconv.ParseUint(port, 10, 0) + if err != nil { + return "", err + } + + port = strconv.FormatUint(v+inc, 10) + + return net.JoinHostPort(host, port), nil +} + +// MustIncreasePortBy calls IncreasePortBy and panics on error. +func MustIncreasePortBy(addr string, inc uint64) string { + s, err := IncreasePortBy(addr, inc) + if err != nil { + panic(err) + } + + return s +} diff --git a/pkg/xnet/xnet_test.go b/pkg/xnet/xnet_test.go new file mode 100755 index 000000000..99810a1cc --- /dev/null +++ b/pkg/xnet/xnet_test.go @@ -0,0 +1,55 @@ +package xnet_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/sonr-io/core/pkg/xnet" +) + +func TestLocalhostIPv4Address(t *testing.T) { + require.Equal(t, "localhost:42", xnet.LocalhostIPv4Address(42)) +} + +func TestAnyIPv4Address(t *testing.T) { + require.Equal(t, "0.0.0.0:42", xnet.AnyIPv4Address(42)) +} + +func TestIncreasePort(t *testing.T) { + addr, err := xnet.IncreasePort("localhost:41") + + require.NoError(t, err) + require.Equal(t, "localhost:42", addr) +} + +func TestIncreasePortWithInvalidAddress(t *testing.T) { + _, err := xnet.IncreasePort("localhost:x:41") + + require.Error(t, err) +} + +func TestIncreasePortWithInvalidPort(t *testing.T) { + _, err := xnet.IncreasePort("localhost:x") + + require.Error(t, err) +} + +func TestIncreasePortBy(t *testing.T) { + addr, err := xnet.IncreasePortBy("localhost:32", 10) + + require.NoError(t, err) + require.Equal(t, "localhost:42", addr) +} + +func TestIncreasePortByWithInvalidAddress(t *testing.T) { + _, err := xnet.IncreasePortBy("localhost:x:32", 10) + + require.Error(t, err) +} + +func TestIncreasePortByWithInvalidPort(t *testing.T) { + _, err := xnet.IncreasePortBy("localhost:x", 10) + + require.Error(t, err) +} diff --git a/pkg/xos/cp.go b/pkg/xos/cp.go new file mode 100755 index 000000000..9004208a5 --- /dev/null +++ b/pkg/xos/cp.go @@ -0,0 +1,63 @@ +package xos + +import ( + "io" + "os" + "path/filepath" +) + +// CopyFolder copy the source folder to the destination folder. +func CopyFolder(srcPath, dstPath string) error { + return filepath.Walk(srcPath, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + + // Skip the root folder + if path == srcPath { + return nil + } + + // Get the relative path within the source folder + relativePath, err := filepath.Rel(srcPath, path) + if err != nil { + return err + } + + // Create the corresponding destination path + destPath := filepath.Join(dstPath, relativePath) + + if info.IsDir() { + // Create the directory in the destination + err = os.MkdirAll(destPath, 0o755) + if err != nil { + return err + } + } else { + // Copy the file content + err = CopyFile(path, destPath) + if err != nil { + return err + } + } + return nil + }) +} + +// CopyFile copy the source file to the destination file. +func CopyFile(srcPath, dstPath string) error { + srcFile, err := os.OpenFile(srcPath, os.O_RDONLY, 0o666) + if err != nil { + return err + } + defer srcFile.Close() + + destFile, err := os.Create(dstPath) + if err != nil { + return err + } + defer destFile.Close() + + _, err = io.Copy(destFile, srcFile) + return err +} diff --git a/pkg/xos/cp_test.go b/pkg/xos/cp_test.go new file mode 100755 index 000000000..9a830ace9 --- /dev/null +++ b/pkg/xos/cp_test.go @@ -0,0 +1,168 @@ +package xos_test + +import ( + "os" + "path/filepath" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/sonr-io/core/pkg/xos" +) + +func TestCopyFolder(t *testing.T) { + tempDir, err := os.MkdirTemp("", "TestCopyFile") + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, os.RemoveAll(tempDir)) + }) + + // Create temporary source and destination directories + srcDir := filepath.Join(tempDir, "source") + err = os.MkdirAll(srcDir, 0o755) + require.NoError(t, err) + + dstDir := filepath.Join(tempDir, "destination") + err = os.MkdirAll(dstDir, 0o755) + require.NoError(t, err) + + emptyDir := filepath.Join(tempDir, "empty") + err = os.MkdirAll(emptyDir, 0o755) + require.NoError(t, err) + + // Create a temporary source file + srcFile1 := filepath.Join(srcDir, "file_1.txt") + err = os.WriteFile(srcFile1, []byte("File content 1"), 0o644) + require.NoError(t, err) + + srcFile2 := filepath.Join(srcDir, "file_2.txt") + err = os.WriteFile(srcFile2, []byte("File content 2"), 0o644) + require.NoError(t, err) + + tests := []struct { + name string + srcPath string + dstPath string + expectedErr error + expectedFileCount int + }{ + { + name: "valid paths", + srcPath: srcDir, + dstPath: dstDir, + expectedFileCount: 2, + }, + { + name: "non existent destination", + srcPath: srcDir, + dstPath: filepath.Join(dstDir, "non-existent-destination"), + expectedErr: os.ErrNotExist, + }, + { + name: "non existent source", + srcPath: filepath.Join(dstDir, "non-existent-source"), + dstPath: dstDir, + expectedErr: os.ErrNotExist, + }, + { + name: "same source and destination", + srcPath: srcDir, + dstPath: srcDir, + expectedFileCount: 2, + }, + { + name: "empty source", + srcPath: emptyDir, + dstPath: filepath.Join(tempDir, "empty"), + expectedFileCount: 0, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := xos.CopyFolder(tt.srcPath, tt.dstPath) + if tt.expectedErr != nil { + require.ErrorIs(t, err, tt.expectedErr) + return + } + require.NoError(t, err) + + // Check the number of files in the destination directory + files, err := os.ReadDir(tt.dstPath) + require.NoError(t, err) + require.Equal(t, tt.expectedFileCount, len(files)) + }) + } +} + +func TestCopyFile(t *testing.T) { + tempDir, err := os.MkdirTemp("", "TestCopyFile") + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, os.RemoveAll(tempDir)) + }) + + // Create temporary source and destination directories + srcDir := filepath.Join(tempDir, "source") + dstDir := filepath.Join(tempDir, "destination") + err = os.MkdirAll(srcDir, 0o755) + require.NoError(t, err) + err = os.MkdirAll(dstDir, 0o755) + require.NoError(t, err) + + // Create a temporary source file + srcFile := filepath.Join(srcDir, "file.txt") + err = os.WriteFile(srcFile, []byte("File content"), 0o644) + require.NoError(t, err) + + tests := []struct { + name string + srcPath string + dstPath string + expectedErr error + expectedBytes int64 // Provide the expected number of bytes copied + }{ + { + name: "valid path", + srcPath: srcFile, + dstPath: filepath.Join(dstDir, "test_1.txt"), + expectedBytes: 12, + }, + { + name: "non existent file", + srcPath: filepath.Join(srcDir, "non_existent_file.txt"), + dstPath: filepath.Join(dstDir, "test_2.txt"), + expectedErr: os.ErrNotExist, + }, + { + name: "non existent destination", + srcPath: srcFile, + dstPath: "/path/to/nonexistent/file.txt", + expectedErr: os.ErrNotExist, + }, + { + name: "same source and destination", + srcPath: srcFile, + dstPath: srcFile, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := xos.CopyFile(tt.srcPath, tt.dstPath) + if tt.expectedErr != nil { + require.ErrorIs(t, err, tt.expectedErr) + return + } + require.NoError(t, err) + + destFile, err := os.Open(tt.dstPath) + require.NoError(t, err) + + destFileInfo, err := destFile.Stat() + require.NoError(t, err) + require.NoError(t, destFile.Close()) + require.Equal(t, tt.expectedBytes, destFileInfo.Size()) + }) + } +} diff --git a/pkg/xos/files.go b/pkg/xos/files.go new file mode 100755 index 000000000..60eb6e4a0 --- /dev/null +++ b/pkg/xos/files.go @@ -0,0 +1,37 @@ +package xos + +import ( + "fmt" + "os" + "path/filepath" +) + +const ( + JSONFile = "json" + ProtoFile = "proto" +) + +func FindFiles(directory, extension string) ([]string, error) { + files := make([]string, 0) + return files, filepath.Walk(directory, func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + + if !info.IsDir() { + if filepath.Ext(path) == fmt.Sprintf(".%s", extension) { + files = append(files, path) + } + } + return nil + }) +} + +// FileExists check if a file from a given path exists. +func FileExists(filename string) bool { + info, err := os.Stat(filename) + if os.IsNotExist(err) { + return false + } + return !info.IsDir() +} diff --git a/pkg/xos/files_test.go b/pkg/xos/files_test.go new file mode 100755 index 000000000..164ccd6bd --- /dev/null +++ b/pkg/xos/files_test.go @@ -0,0 +1,132 @@ +package xos_test + +import ( + "os" + "path/filepath" + "strings" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/sonr-io/core/pkg/xos" +) + +func TestFindFiles(t *testing.T) { + tests := []struct { + name string + files []string + extension string + want []string + err error + }{ + { + name: "test 3 json files", + files: []string{"file1.json", "file2.txt", "file3.json", "file4.json"}, + extension: "json", + want: []string{"file1.json", "file3.json", "file4.json"}, + err: nil, + }, + { + name: "test 1 txt files", + files: []string{"file1.json", "file2.txt", "file3.json", "file4.json"}, + extension: "txt", + want: []string{"file2.txt"}, + err: nil, + }, + { + name: "test 1 json files", + files: []string{"file1.json"}, + extension: "json", + want: []string{"file1.json"}, + err: nil, + }, + { + name: "test no files", + files: []string{"file1.json", "file2.json", "file3.json", "file4.json"}, + extension: "txt", + want: []string{}, + err: nil, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + dirName := strings.ReplaceAll(t.Name(), "/", "_") + tempDir, err := os.MkdirTemp("", dirName) + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, os.RemoveAll(tempDir)) + }) + + for _, filename := range tt.files { + filePath := filepath.Join(tempDir, filename) + file, err := os.Create(filePath) + require.NoError(t, err) + require.NoError(t, file.Close()) + } + + gotFiles, err := xos.FindFiles(tempDir, tt.extension) + if tt.err != nil { + require.Error(t, err) + require.ErrorIs(t, err, tt.err) + return + } + require.NoError(t, err) + + want := make([]string, len(tt.want)) + for i, filename := range tt.want { + want[i] = filepath.Join(tempDir, filename) + } + require.EqualValues(t, want, gotFiles) + }) + } +} + +func TestFileExists(t *testing.T) { + tempDir, err := os.MkdirTemp("", "TestCopyFile") + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, os.RemoveAll(tempDir)) + }) + + srcDir := filepath.Join(tempDir, "source") + err = os.MkdirAll(srcDir, 0o755) + require.NoError(t, err) + + srcFile := filepath.Join(srcDir, "file.txt") + err = os.WriteFile(srcFile, []byte("File content"), 0o644) + require.NoError(t, err) + + tests := []struct { + name string + filename string + want bool + }{ + { + name: "existing file", + filename: srcFile, + want: true, + }, + { + name: "non existing file", + filename: "non_existing_file.txt", + want: false, + }, + { + name: "directory", + filename: srcDir, + want: false, + }, + { + name: "empty filename", + filename: "", + want: false, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := xos.FileExists(tt.filename) + require.EqualValues(t, tt.want, got) + }) + } +} diff --git a/pkg/xos/mv.go b/pkg/xos/mv.go new file mode 100755 index 000000000..801af7bf3 --- /dev/null +++ b/pkg/xos/mv.go @@ -0,0 +1,33 @@ +package xos + +import ( + "fmt" + "io" + "os" +) + +// Rename copy oldPath to newPath and then delete oldPath. +// Unlike os.Rename, it doesn't fail when the oldPath and newPath are in +// different partitions (error: invalid cross-device link). +func Rename(oldPath, newPath string) error { + inputFile, err := os.Open(oldPath) + if err != nil { + return fmt.Errorf("rename %s %s: couldn't open oldpath: %w", oldPath, newPath, err) + } + defer inputFile.Close() + outputFile, err := os.Create(newPath) + if err != nil { + return fmt.Errorf("rename %s %s: couldn't open dest file: %w", oldPath, newPath, err) + } + defer outputFile.Close() + _, err = io.Copy(outputFile, inputFile) + if err != nil { + return fmt.Errorf("rename %s %s: writing to output file failed: %w", oldPath, newPath, err) + } + // The copy was successful, so now delete the original file + err = os.Remove(oldPath) + if err != nil { + return fmt.Errorf("rename %s %s: failed removing original file: %w", oldPath, newPath, err) + } + return nil +} diff --git a/pkg/xos/mv_test.go b/pkg/xos/mv_test.go new file mode 100755 index 000000000..1c5839ac4 --- /dev/null +++ b/pkg/xos/mv_test.go @@ -0,0 +1,32 @@ +package xos_test + +import ( + "fmt" + "os" + "path" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/sonr-io/core/pkg/xos" +) + +func TestRename(t *testing.T) { + var ( + dir = t.TempDir() + oldpath = path.Join(dir, "old") + newpath = path.Join(dir, "new") + require = require.New(t) + ) + err := os.WriteFile(oldpath, []byte("foo"), os.ModePerm) + require.NoError(err) + + err = xos.Rename(oldpath, newpath) + + require.NoError(err) + bz, err := os.ReadFile(newpath) + require.NoError(err) + require.Equal([]byte("foo"), bz) + _, err = os.Open(oldpath) + require.EqualError(err, fmt.Sprintf("open %s: no such file or directory", oldpath)) +} diff --git a/pkg/xos/rm.go b/pkg/xos/rm.go new file mode 100755 index 000000000..993e3456b --- /dev/null +++ b/pkg/xos/rm.go @@ -0,0 +1,14 @@ +package xos + +import ( + "os" + "path/filepath" +) + +func RemoveAllUnderHome(path string) error { + home, err := os.UserHomeDir() + if err != nil { + return err + } + return os.RemoveAll(filepath.Join(home, path)) +} diff --git a/pkg/xstrings/xstrings.go b/pkg/xstrings/xstrings.go new file mode 100755 index 000000000..ff038a95d --- /dev/null +++ b/pkg/xstrings/xstrings.go @@ -0,0 +1,72 @@ +package xstrings + +import ( + "strings" + "unicode" + + "golang.org/x/exp/slices" // TODO: replace with slices.Contains when it will be available in stdlib (1.21) + "golang.org/x/text/cases" + "golang.org/x/text/language" +) + +// AllOrSomeFilter filters elems out from the list as they present in filterList and +// returns the remaining ones. +// if filterList is empty, all elems from list returned. +func AllOrSomeFilter(list, filterList []string) []string { + if len(filterList) == 0 { + return list + } + + var elems []string + + for _, elem := range list { + if !slices.Contains(filterList, elem) { + elems = append(elems, elem) + } + } + + return elems +} + +// List returns a slice of strings captured after the value returned by do which is +// called n times. +func List(n int, do func(i int) string) []string { + var list []string + + for i := 0; i < n; i++ { + list = append(list, do(i)) + } + + return list +} + +// FormatUsername formats a username to make it usable as a variable. +func FormatUsername(s string) string { + return NoDash(NoNumberPrefix(s)) +} + +// NoDash removes dash from the string. +func NoDash(s string) string { + return strings.ReplaceAll(s, "-", "") +} + +// NoNumberPrefix adds an underscore at the beginning of the string if it stars with a number +// this is used for package of proto files template because the package name can't start with a number. +func NoNumberPrefix(s string) string { + // Check if it starts with a digit + if unicode.IsDigit(rune(s[0])) { + return "_" + s + } + return s +} + +// Title returns a copy of the string s with all Unicode letters that begin words +// mapped to their Unicode title case. +func Title(s string) string { + return cases.Title(language.English).String(s) +} + +// ToUpperFirst returns a copy of the string with the first unicode letter in upper case. +func ToUpperFirst(s string) string { + return strings.ToUpper(s[:1]) + s[1:] +} diff --git a/pkg/xstrings/xstrings_test.go b/pkg/xstrings/xstrings_test.go new file mode 100755 index 000000000..6557ecea4 --- /dev/null +++ b/pkg/xstrings/xstrings_test.go @@ -0,0 +1,20 @@ +package xstrings_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/sonr-io/core/pkg/xstrings" +) + +func TestNoDash(t *testing.T) { + require.Equal(t, "foo", xstrings.NoDash("foo")) + require.Equal(t, "foo", xstrings.NoDash("-f-o-o---")) +} + +func TestNoNumberPrefix(t *testing.T) { + require.Equal(t, "foo", xstrings.NoNumberPrefix("foo")) + require.Equal(t, "_0foo", xstrings.NoNumberPrefix("0foo")) + require.Equal(t, "_999foo", xstrings.NoNumberPrefix("999foo")) +} diff --git a/pkg/xtime/clock.go b/pkg/xtime/clock.go new file mode 100755 index 000000000..ca9fa8792 --- /dev/null +++ b/pkg/xtime/clock.go @@ -0,0 +1,49 @@ +package xtime + +import "time" + +// Clock represents a clock that can retrieve current time. +type Clock interface { + Now() time.Time + Add(duration time.Duration) +} + +// ClockSystem is a clock that retrieves system time. +type ClockSystem struct{} + +// NewClockSystem returns a new ClockSystem. +func NewClockSystem() ClockSystem { + return ClockSystem{} +} + +// Now implements Clock. +func (ClockSystem) Now() time.Time { + return time.Now() +} + +// Add implements Clock. +func (ClockSystem) Add(_ time.Duration) { + panic("Add can't be called for ClockSystem") +} + +// ClockMock is a clock mocking time with an internal counter. +type ClockMock struct { + t time.Time +} + +// NewClockMock returns a new ClockMock. +func NewClockMock(originalTime time.Time) *ClockMock { + return &ClockMock{ + t: originalTime, + } +} + +// Now implements Clock. +func (c ClockMock) Now() time.Time { + return c.t +} + +// Add implements Clock. +func (c *ClockMock) Add(duration time.Duration) { + c.t = c.t.Add(duration) +} diff --git a/pkg/xtime/clock_test.go b/pkg/xtime/clock_test.go new file mode 100755 index 000000000..b9b1def6a --- /dev/null +++ b/pkg/xtime/clock_test.go @@ -0,0 +1,24 @@ +package xtime_test + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/sonr-io/core/pkg/xtime" +) + +func TestClockSystem(t *testing.T) { + c := xtime.NewClockSystem() + require.False(t, c.Now().IsZero()) + require.Panics(t, func() { c.Add(time.Second) }) +} + +func TestClockMock(t *testing.T) { + timeSample := time.Now() + c := xtime.NewClockMock(timeSample) + require.True(t, c.Now().Equal(timeSample)) + c.Add(time.Second) + require.True(t, c.Now().Equal(timeSample.Add(time.Second))) +} diff --git a/pkg/xtime/unix.go b/pkg/xtime/unix.go new file mode 100755 index 000000000..a10b4b2d7 --- /dev/null +++ b/pkg/xtime/unix.go @@ -0,0 +1,26 @@ +package xtime + +import ( + "time" +) + +// Seconds creates a time.Duration based on the seconds parameter. +func Seconds(seconds int64) time.Duration { + return time.Duration(seconds) * time.Second +} + +// NowAfter returns a unix date string from now plus the duration. +func NowAfter(unix time.Duration) string { + date := time.Now().Add(unix) + return FormatUnix(date) +} + +// FormatUnix formats the time.Time to unix date string. +func FormatUnix(date time.Time) string { + return date.Format(time.UnixDate) +} + +// FormatUnixInt formats the int timestamp to unix date string. +func FormatUnixInt(unix int64) string { + return FormatUnix(time.Unix(unix, 0)) +} diff --git a/pkg/xtime/unix_test.go b/pkg/xtime/unix_test.go new file mode 100755 index 000000000..c64d0242c --- /dev/null +++ b/pkg/xtime/unix_test.go @@ -0,0 +1,68 @@ +package xtime_test + +import ( + "fmt" + "testing" + "time" + + "github.com/sonr-io/core/pkg/xtime" + + "github.com/stretchr/testify/require" +) + +func TestSeconds(t *testing.T) { + tests := []int64{ + 9999999999, + 10000, + 100, + 0, + } + for _, tt := range tests { + t.Run(fmt.Sprintf("test %d value", tt), func(t *testing.T) { + got := xtime.Seconds(tt) + require.Equal(t, time.Duration(tt)*time.Second, got) + }) + } +} + +func TestNowAfter(t *testing.T) { + tests := []int64{ + 9999999999, + 10000, + 100, + 0, + } + for _, tt := range tests { + t.Run(fmt.Sprintf("test %d value", tt), func(t *testing.T) { + got := xtime.NowAfter(xtime.Seconds(tt)) + date := time.Now().Add(time.Duration(tt) * time.Second) + require.Equal(t, date.Format(time.UnixDate), got) + }) + } +} + +func TestFormatUnix(t *testing.T) { + tests := []struct { + date time.Time + want string + }{ + { + date: time.Time{}, + want: "Mon Jan 1 00:00:00 UTC 0001", + }, + { + date: time.Unix(10000000000, 100).In(time.UTC), + want: "Sat Nov 20 17:46:40 UTC 2286", + }, + { + date: time.Date(2020, 10, 11, 12, 30, 50, 0, time.FixedZone("Europe/Berlin", 3*60*60)), + want: "Sun Oct 11 12:30:50 Europe/Berlin 2020", + }, + } + for _, tt := range tests { + t.Run("test date "+tt.date.String(), func(t *testing.T) { + got := xtime.FormatUnix(tt.date) + require.Equal(t, tt.want, got) + }) + } +} diff --git a/pkg/xurl/xurl.go b/pkg/xurl/xurl.go new file mode 100644 index 000000000..49d0f9685 --- /dev/null +++ b/pkg/xurl/xurl.go @@ -0,0 +1,138 @@ +package xurl + +import ( + "errors" + "fmt" + "net" + "net/url" + "strings" +) + +const ( + schemeTCP = "tcp" + schemeHTTP = "http" + schemeHTTPS = "https" + schemeWS = "ws" +) + +// TCP ensures that a URL contains a TCP scheme. +func TCP(s string) (string, error) { + u, err := parseURL(s) + if err != nil { + return "", err + } + + u.Scheme = schemeTCP + + return u.String(), nil +} + +// HTTP ensures that a URL contains an HTTP scheme. +func HTTP(s string) (string, error) { + u, err := parseURL(s) + if err != nil { + return "", err + } + + u.Scheme = schemeHTTP + + return u.String(), nil +} + +// HTTPS ensures that a URL contains an HTTPS scheme. +func HTTPS(s string) (string, error) { + u, err := parseURL(s) + if err != nil { + return "", err + } + + u.Scheme = schemeHTTPS + + return u.String(), nil +} + +// MightHTTPS ensures that a URL contains an HTTPS scheme when the current scheme is not HTTP. +// When the URL contains an HTTP scheme it is not modified. +func MightHTTPS(s string) (string, error) { + if strings.HasPrefix(strings.ToLower(s), "http://") { + return s, nil + } + + return HTTPS(s) +} + +// WS ensures that a URL contains a WS scheme. +func WS(s string) (string, error) { + u, err := parseURL(s) + if err != nil { + return "", err + } + + u.Scheme = schemeWS + + return u.String(), nil +} + +// HTTPEnsurePort ensures that url has a port number suits with the connection type. +func HTTPEnsurePort(s string) string { + u, err := url.Parse(s) + if err != nil || u.Port() != "" { + return s + } + + port := "80" + + if u.Scheme == schemeHTTPS { + port = "443" + } + + u.Host = fmt.Sprintf("%s:%s", u.Hostname(), port) + + return u.String() +} + +// Address ensures that address contains localhost as host if non specified. +func Address(address string) string { + if strings.HasPrefix(address, ":") { + return "localhost" + address + } + return address +} + +func IsHTTP(address string) bool { + return strings.HasPrefix(address, "http") +} + +func parseURL(s string) (*url.URL, error) { + if s == "" { + return nil, errors.New("url is empty") + } + + // Handle the case where the URI is an IP:PORT or HOST:PORT + // without scheme prefix because that case can't be URL parsed. + // When the URI has no scheme it is parsed as a path by "url.Parse" + // placing the colon within the path, which is invalid. + if host, isAddrPort := addressPort(s); isAddrPort { + return &url.URL{Host: host}, nil + } + + p, err := url.Parse(Address(s)) + return p, err +} + +func addressPort(s string) (string, bool) { + // Check that the value doesn't contain a URI path + if strings.Contains(s, "/") { + return "", false + } + + // Use the net split function to support IPv6 addresses + host, port, err := net.SplitHostPort(s) + if err != nil { + return "", false + } + if host == "" { + host = "0.0.0.0" + } + return net.JoinHostPort(host, port), true +} diff --git a/pkg/xurl/xurl_test.go b/pkg/xurl/xurl_test.go new file mode 100644 index 000000000..9032c45fc --- /dev/null +++ b/pkg/xurl/xurl_test.go @@ -0,0 +1,378 @@ +package xurl + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestHTTPEnsurePort(t *testing.T) { + cases := []struct { + name string + addr string + want string + }{ + { + name: "http", + addr: "http://localhost", + want: "http://localhost:80", + }, + { + name: "https", + addr: "https://localhost", + want: "https://localhost:443", + }, + { + name: "custom", + addr: "http://localhost:4000", + want: "http://localhost:4000", + }, + } + + for _, tt := range cases { + t.Run(tt.name, func(t *testing.T) { + addr := HTTPEnsurePort(tt.addr) + require.Equal(t, tt.want, addr) + }) + } +} + +func TestTCP(t *testing.T) { + cases := []struct { + name string + addr string + want string + error bool + }{ + { + name: "with scheme", + addr: "tcp://github.com/ignite/cli", + want: "tcp://github.com/ignite/cli", + }, + { + name: "without scheme", + addr: "github.com/ignite/cli", + want: "tcp://github.com/ignite/cli", + }, + { + name: "with invalid scheme", + addr: "ftp://github.com/ignite/cli", + want: "tcp://github.com/ignite/cli", + }, + { + name: "with ip and port", + addr: "0.0.0.0:4500", + want: "tcp://0.0.0.0:4500", + }, + { + name: "with localhost and port", + addr: "localhost:4500", + want: "tcp://localhost:4500", + }, + { + name: "with invalid url", + addr: "tcp://github.com:x", + error: true, + }, + { + name: "empty", + addr: "", + error: true, + }, + } + + for _, tt := range cases { + t.Run(tt.name, func(t *testing.T) { + addr, err := TCP(tt.addr) + if tt.error { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tt.want, addr) + } + }) + } +} + +func TestHTTP(t *testing.T) { + cases := []struct { + name string + addr string + want string + error bool + }{ + { + name: "with scheme", + addr: "http://github.com/ignite/cli", + want: "http://github.com/ignite/cli", + }, + { + name: "without scheme", + addr: "github.com/ignite/cli", + want: "http://github.com/ignite/cli", + }, + { + name: "with invalid scheme", + addr: "ftp://github.com/ignite/cli", + want: "http://github.com/ignite/cli", + }, + { + name: "with ip and port", + addr: "0.0.0.0:4500", + want: "http://0.0.0.0:4500", + }, + { + name: "with localhost and port", + addr: "localhost:4500", + want: "http://localhost:4500", + }, + { + name: "with invalid url", + addr: "http://github.com:x", + error: true, + }, + { + name: "empty", + addr: "", + error: true, + }, + } + + for _, tt := range cases { + t.Run(tt.name, func(t *testing.T) { + addr, err := HTTP(tt.addr) + if tt.error { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tt.want, addr) + } + }) + } +} + +func TestHTTPS(t *testing.T) { + cases := []struct { + name string + addr string + want string + error bool + }{ + { + name: "with scheme", + addr: "https://github.com/ignite/cli", + want: "https://github.com/ignite/cli", + }, + { + name: "without scheme", + addr: "github.com/ignite/cli", + want: "https://github.com/ignite/cli", + }, + { + name: "with invalid scheme", + addr: "ftp://github.com/ignite/cli", + want: "https://github.com/ignite/cli", + }, + { + name: "with ip and port", + addr: "0.0.0.0:4500", + want: "https://0.0.0.0:4500", + }, + { + name: "with localhost and port", + addr: "localhost:4500", + want: "https://localhost:4500", + }, + { + name: "with invalid url", + addr: "https://github.com:x", + error: true, + }, + { + name: "empty", + addr: "", + error: true, + }, + } + + for _, tt := range cases { + t.Run(tt.name, func(t *testing.T) { + addr, err := HTTPS(tt.addr) + if tt.error { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tt.want, addr) + } + }) + } +} + +func TestWS(t *testing.T) { + cases := []struct { + name string + addr string + want string + error bool + }{ + { + name: "with scheme", + addr: "ws://github.com/ignite/cli", + want: "ws://github.com/ignite/cli", + }, + { + name: "without scheme", + addr: "github.com/ignite/cli", + want: "ws://github.com/ignite/cli", + }, + { + name: "with invalid scheme", + addr: "ftp://github.com/ignite/cli", + want: "ws://github.com/ignite/cli", + }, + { + name: "with ip and port", + addr: "0.0.0.0:4500", + want: "ws://0.0.0.0:4500", + }, + { + name: "with localhost and port", + addr: "localhost:4500", + want: "ws://localhost:4500", + }, + { + name: "with invalid url", + addr: "ws://github.com:x", + error: true, + }, + { + name: "empty", + addr: "", + error: true, + }, + } + + for _, tt := range cases { + t.Run(tt.name, func(t *testing.T) { + addr, err := WS(tt.addr) + if tt.error { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tt.want, addr) + } + }) + } +} + +func TestMightHTTPS(t *testing.T) { + cases := []struct { + name string + addr string + want string + error bool + }{ + { + name: "with http scheme", + addr: "http://github.com/ignite/cli", + want: "http://github.com/ignite/cli", + }, + { + name: "with https scheme", + addr: "https://github.com/ignite/cli", + want: "https://github.com/ignite/cli", + }, + { + name: "without scheme", + addr: "github.com/ignite/cli", + want: "https://github.com/ignite/cli", + }, + { + name: "with invalid scheme", + addr: "ftp://github.com/ignite/cli", + want: "https://github.com/ignite/cli", + }, + { + name: "with ip and port", + addr: "0.0.0.0:4500", + want: "https://0.0.0.0:4500", + }, + { + name: "with localhost and port", + addr: "localhost:4500", + want: "https://localhost:4500", + }, + { + name: "with invalid url", + addr: "https://github.com:x", + error: true, + }, + { + name: "empty", + addr: "", + error: true, + }, + } + + for _, tt := range cases { + t.Run(tt.name, func(t *testing.T) { + addr, err := MightHTTPS(tt.addr) + if tt.error { + require.Error(t, err) + } else { + require.NoError(t, err) + require.Equal(t, tt.want, addr) + } + }) + } +} + +func Test_addressPort(t *testing.T) { + tests := []struct { + name string + arg string + wantHost string + want bool + }{ + { + name: "URI path", + arg: "/test/false", + want: false, + }, + { + name: "invalid address", + arg: "aeihf3/aef/f..//", + want: false, + }, + { + name: "host and port", + arg: "102.33.3.43:10000", + wantHost: "102.33.3.43:10000", + want: true, + }, + { + name: "local port", + arg: "0.0.0.0:10000", + wantHost: "0.0.0.0:10000", + want: true, + }, + { + name: "only port", + arg: ":10000", + wantHost: "0.0.0.0:10000", + want: true, + }, + { + name: "only host", + arg: "102.33.3.43", + want: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + gotHost, got := addressPort(tt.arg) + require.Equal(t, tt.want, got) + require.Equal(t, tt.wantHost, gotHost) + }) + } +} diff --git a/pkg/yaml/map.go b/pkg/yaml/map.go new file mode 100755 index 000000000..5385f0e64 --- /dev/null +++ b/pkg/yaml/map.go @@ -0,0 +1,53 @@ +package yaml + +// Map defines a map type that uses strings as key value. +// The map implements the Unmarshaller interface to convert +// the unmarshalled map keys type from interface{} to string. +type Map map[string]interface{} + +func (m *Map) UnmarshalYAML(unmarshal func(interface{}) error) error { + var raw map[interface{}]interface{} + + if err := unmarshal(&raw); err != nil { + return err + } + + *m = convertMapKeys(raw) + + return nil +} + +func convertSlice(raw []interface{}) []interface{} { + if len(raw) == 0 { + return raw + } + + if _, ok := raw[0].(map[interface{}]interface{}); !ok { + return raw + } + + values := make([]interface{}, len(raw)) + for i, v := range raw { + values[i] = convertMapKeys(v.(map[interface{}]interface{})) + } + + return values +} + +func convertMapKeys(raw map[interface{}]interface{}) map[string]interface{} { + m := make(map[string]interface{}) + + for k, v := range raw { + if value, _ := v.(map[interface{}]interface{}); value != nil { + // Convert map keys to string + v = convertMapKeys(value) + } else if values, _ := v.([]interface{}); values != nil { + // Make sure that maps inside slices also use strings as key + v = convertSlice(values) + } + + m[k.(string)] = v + } + + return m +} diff --git a/pkg/yaml/map_test.go b/pkg/yaml/map_test.go new file mode 100755 index 000000000..b8ff34da2 --- /dev/null +++ b/pkg/yaml/map_test.go @@ -0,0 +1,44 @@ +package yaml_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + "gopkg.in/yaml.v2" + + xyaml "github.com/sonr-io/core/pkg/yaml" +) + +func TestUnmarshalWithCustomMapType(t *testing.T) { + // Arrange + input := ` + foo: + bar: baz + ` + output := xyaml.Map{} + + // Act + err := yaml.Unmarshal([]byte(input), &output) + + // Assert + require.NoError(t, err) + require.NotNil(t, output["foo"]) + require.IsType(t, (map[string]interface{})(nil), output["foo"]) +} + +func TestUnmarshalWithNativeMapType(t *testing.T) { + // Arrange + input := ` + foo: + bar: baz + ` + output := make(map[string]interface{}) + + // Act + err := yaml.Unmarshal([]byte(input), &output) + + // Assert + require.NoError(t, err) + require.NotNil(t, output["foo"]) + require.IsType(t, (map[interface{}]interface{})(nil), output["foo"]) +} diff --git a/pkg/yaml/yaml.go b/pkg/yaml/yaml.go new file mode 100755 index 000000000..9bb156944 --- /dev/null +++ b/pkg/yaml/yaml.go @@ -0,0 +1,43 @@ +package yaml + +import ( + "context" + "errors" + "strings" + + "github.com/goccy/go-yaml" + "github.com/goccy/go-yaml/parser" +) + +// Marshal converts an object to a string in a YAML format and transforms +// the byte slice fields from the path to string to be more readable. +func Marshal(ctx context.Context, obj interface{}, paths ...string) (string, error) { + requestYaml, err := yaml.MarshalContext(ctx, obj) + if err != nil { + return "", err + } + file, err := parser.ParseBytes(requestYaml, 0) + if err != nil { + return "", err + } + + // normalize the structure converting the byte slice fields to string + for _, path := range paths { + pathString, err := yaml.PathString(path) + if err != nil { + return "", err + } + var byteSlice []byte + err = pathString.Read(strings.NewReader(string(requestYaml)), &byteSlice) + if err != nil && !errors.Is(err, yaml.ErrNotFoundNode) { + return "", err + } + if err := pathString.ReplaceWithReader(file, + strings.NewReader(string(byteSlice)), + ); err != nil { + return "", err + } + } + + return file.String(), nil +} diff --git a/proto/Taskfile.yml b/proto/Taskfile.yml new file mode 100644 index 000000000..e83c84e87 --- /dev/null +++ b/proto/Taskfile.yml @@ -0,0 +1,51 @@ +version: "3" +vars: + CGO_ENABLED: 1 + WASMVM_URL: https://github.com/CosmWasm/wasmvm/releases/download + VERSION: + sh: echo $(git describe --tags --abbrev=0) + default: v0.0.0 + COMMIT: + sh: git log -n 1 --format=%h + default: 0000000 + DATE: + sh: date -u '+%m/%d/%y %I:%M:%S%p' + default: "1970-01-01_00:00:00AM" + COSMWASM_VERSION: + sh: go list -m github.com/CosmWasm/wasmvm | sed 's/.* //' + default: v1.3.0 + GO_VERSION: + sh: cat go.mod | grep -E 'go [0-9].[0-9]+' | cut -d ' ' -f 2 + default: 1.21 + GITHUB_TOKEN: + sh: echo $GITHUB_TOKEN + default: "" + GORELEASER_IMAGE: ghcr.io/goreleaser/goreleaser-cross:v{{.GO_VERSION}} +tasks: + # ---------------------------------------------------------------------------- + # -- Run Tasks --------------------------------------------------------------- + # ---------------------------------------------------------------------------- + proto: + desc: Print the version + silent: true + cmds: + - task -l + buf-mod: + silent: true + desc: Update the buf.lock file + cmds: + - buf mod update + + buf-build: + silent: true + desc: Build the protobuf files + deps: [buf-mod] + cmds: + - buf build + + buf-push: + silent: true + desc: Push the protobuf files to the registry + deps: [buf-build] + cmds: + - buf push diff --git a/proto/buf.gen.gogo.yaml b/proto/buf.gen.gogo.yaml index 9c8ba0a4b..33dd193c8 100644 --- a/proto/buf.gen.gogo.yaml +++ b/proto/buf.gen.gogo.yaml @@ -6,3 +6,9 @@ plugins: - name: grpc-gateway out: .. opt: logtostderr=true,allow_colon_final_segments=true + - name: swagger + out: ../docs/static/swagger + opt: + - fqn_for_swagger_name=true + - simple_operation_ids=true + - logtostderr=true diff --git a/proto/buf.gen.pulsar.yaml b/proto/buf.gen.pulsar.yaml index dee9f7b4c..ed9c0c9b0 100644 --- a/proto/buf.gen.pulsar.yaml +++ b/proto/buf.gen.pulsar.yaml @@ -2,12 +2,9 @@ version: v1 managed: enabled: true go_package_prefix: - default: cosmossdk.io/api - except: - - buf.build/googleapis/googleapis - - buf.build/cosmos/gogo-proto - - buf.build/cosmos/cosmos-proto + default: github.com/sonr-io/api override: + buf.build/cosmos/cosmos-sdk: cosmossdk.io/api plugins: - name: go-pulsar out: ../api @@ -16,3 +13,5 @@ plugins: out: ../api opt: paths=source_relative - name: go-cosmos-orm + out: . + opt: paths=source_relative diff --git a/proto/core/crypto/coin.proto b/proto/common/crypto/coin.proto similarity index 97% rename from proto/core/crypto/coin.proto rename to proto/common/crypto/coin.proto index 58776614b..648c51066 100644 --- a/proto/core/crypto/coin.proto +++ b/proto/common/crypto/coin.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package core.crypto; +package common.crypto; option go_package = "github.com/sonr-io/core/types/crypto"; diff --git a/proto/core/crypto/ssi.proto b/proto/common/crypto/ssi.proto similarity index 99% rename from proto/core/crypto/ssi.proto rename to proto/common/crypto/ssi.proto index eb2437e35..b8361b1bd 100644 --- a/proto/core/crypto/ssi.proto +++ b/proto/common/crypto/ssi.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package core.crypto; +package common.crypto; option go_package = "github.com/sonr-io/core/types/crypto"; diff --git a/proto/core/crypto/vc.proto b/proto/common/crypto/vc.proto similarity index 91% rename from proto/core/crypto/vc.proto rename to proto/common/crypto/vc.proto index 9f2fa85df..b1bff1526 100644 --- a/proto/core/crypto/vc.proto +++ b/proto/common/crypto/vc.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package core.crypto; +package common.crypto; // this line is used by starport scaffolding # proto/tx/import diff --git a/proto/core/crypto/webauthn/credential.proto b/proto/common/webauthn/credential.proto similarity index 95% rename from proto/core/crypto/webauthn/credential.proto rename to proto/common/webauthn/credential.proto index 672d5264b..2fc66575b 100644 --- a/proto/core/crypto/webauthn/credential.proto +++ b/proto/common/webauthn/credential.proto @@ -1,8 +1,8 @@ // The core.service package contains all the core services. syntax = "proto3"; -package core.crypto.webauthn; +package common.webauthn; -option go_package = "github.com/sonr-io/core/x/service/types"; +option go_package = "github.com/sonr-io/core/types/webauthn"; // Credential is a message type that contains all needed information // about a WebAuthn credential for storage. diff --git a/proto/core/domain/genesis.proto b/proto/core/domain/genesis.proto index 504aa5ca6..e6bb2e64f 100644 --- a/proto/core/domain/genesis.proto +++ b/proto/core/domain/genesis.proto @@ -2,9 +2,9 @@ syntax = "proto3"; package core.domain; -import "gogoproto/gogo.proto"; import "core/domain/params.proto"; import "core/domain/record.proto"; +import "gogoproto/gogo.proto"; option go_package = "github.com/sonr-io/core/x/domain/types"; diff --git a/proto/core/domain/query.proto b/proto/core/domain/query.proto index d813a1747..9cfe92137 100644 --- a/proto/core/domain/query.proto +++ b/proto/core/domain/query.proto @@ -2,18 +2,17 @@ syntax = "proto3"; package core.domain; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; import "core/domain/params.proto"; import "core/domain/record.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; option go_package = "github.com/sonr-io/core/x/domain/types"; // Query defines the gRPC querier service. // It provides methods to query parameters and UsernameRecords. service Query { - // Params queries the parameters of the module. // It returns the parameters of the module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { @@ -41,7 +40,6 @@ message QueryParamsRequest {} // QueryParamsResponse is response type for the Query/Params RPC method. // It holds all the parameters of this module. message QueryParamsResponse { - // params holds all the parameters of this module. Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/proto/core/identity/account.proto b/proto/core/identity/account.proto index 0e26ae820..88b55480a 100644 --- a/proto/core/identity/account.proto +++ b/proto/core/identity/account.proto @@ -3,14 +3,6 @@ package core.identity; option go_package = "github.com/sonr-io/core/x/identity/types"; -message EscrowAccount { - uint64 id = 1; - string address = 2; - string publicKey = 3; - string lockupUsdBalance = 4; - string creator = 5; -} - message ControllerAccount { string address = 1; string publicKey = 2; diff --git a/proto/core/identity/genesis.proto b/proto/core/identity/genesis.proto index 377a919f1..5cb372a73 100644 --- a/proto/core/identity/genesis.proto +++ b/proto/core/identity/genesis.proto @@ -2,21 +2,18 @@ syntax = "proto3"; package core.identity; -import "gogoproto/gogo.proto"; -import "core/identity/params.proto"; -import "core/identity/did.proto"; import "core/identity/account.proto"; +import "core/identity/did.proto"; +import "core/identity/params.proto"; +import "gogoproto/gogo.proto"; option go_package = "github.com/sonr-io/core/x/identity/types"; // GenesisState defines the identity module's genesis state. message GenesisState { Params params = 1 [ (gogoproto.nullable) = false ]; - string port_id = 2; - repeated DIDDocument dIDDocumentList = 3 [ (gogoproto.nullable) = false ]; - repeated ControllerAccount controllerAccountList = 4 + repeated DIDDocument dIDDocumentList = 2 [ (gogoproto.nullable) = false ]; + repeated ControllerAccount controllerAccountList = 3 [ (gogoproto.nullable) = false ]; - uint64 controllerAccountCount = 5; - repeated EscrowAccount escrowAccountList = 6 [ (gogoproto.nullable) = false ]; - uint64 escrowAccountCount = 7; + uint64 controllerAccountCount = 4; } diff --git a/proto/core/identity/packet.proto b/proto/core/identity/packet.proto deleted file mode 100644 index f929d8224..000000000 --- a/proto/core/identity/packet.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; -package core.identity; - -option go_package = "github.com/sonr-io/core/x/identity/types"; - -message IdentityPacketData { - oneof packet { NoData noData = 1; } -} - -message NoData {} diff --git a/proto/core/identity/query.proto b/proto/core/identity/query.proto index 142b36ae2..183c5262d 100644 --- a/proto/core/identity/query.proto +++ b/proto/core/identity/query.proto @@ -2,18 +2,17 @@ syntax = "proto3"; package core.identity; +import "core/identity/account.proto"; +import "core/identity/did.proto"; +import "core/identity/params.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "core/identity/params.proto"; -import "core/identity/did.proto"; -import "core/identity/account.proto"; option go_package = "github.com/sonr-io/core/x/identity/types"; // Query defines the gRPC querier service. service Query { - // Params queries the parameters of the module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/core/params/identity"; @@ -61,19 +60,6 @@ service Query { returns (QueryAllControllerAccountResponse) { option (google.api.http).get = "/core/id/controllers"; } - - // EscrowAccount queries a list of EscrowAccount items. - rpc EscrowAccount(QueryGetEscrowAccountRequest) - returns (QueryGetEscrowAccountResponse) { - option (google.api.http).get = - "/sonr-io/core/identity/escrow_account/{address}"; - } - - // EscrowAccountAll queries all EscrowAccount items. - rpc EscrowAccountAll(QueryAllEscrowAccountRequest) - returns (QueryAllEscrowAccountResponse) { - option (google.api.http).get = "/sonr-io/core/identity/escrow_account"; - } } // QueryParamsRequest is request type for the Query/Params RPC method. @@ -81,7 +67,6 @@ message QueryParamsRequest {} // QueryParamsResponse is response type for the Query/Params RPC method. message QueryParamsResponse { - // params holds all the parameters of this module. Params params = 1 [ (gogoproto.nullable) = false ]; } @@ -112,7 +97,6 @@ message QueryAllDIDDocumentResponse { // QueryDidByAlsoKnownAsRequest is the request type for the // Query/DidByAlsoKnownAs RPC method. message QueryDidByAlsoKnownAsRequest { - // aka_aliasid is the unique identifier of the DIDDocument - it appears like // ("example.snr") string alias = 1; @@ -121,7 +105,6 @@ message QueryDidByAlsoKnownAsRequest { // QueryDidByAlsoKnownAsResponse is the response type for the // Query/DidByAlsoKnownAs RPC method. message QueryDidByAlsoKnownAsResponse { - // A DIDDocument is a JSON-LD object that contains a set of public keys DIDDocument didDocument = 1 [ (gogoproto.nullable) = false ]; } @@ -129,7 +112,6 @@ message QueryDidByAlsoKnownAsResponse { // QueryAliasAvailableRequest is the request type for the Query/AliasAvailable // RPC method. message QueryAliasAvailableRequest { - // alias is the unique identifier of the DIDDocument - it appears like // ("example.snr") string alias = 1; @@ -175,26 +157,3 @@ message QueryAllControllerAccountResponse { [ (gogoproto.nullable) = false ]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } - -// QueryGetEscrowAccountRequest is the request type for the Query/EscrowAccount -// RPC method. -message QueryGetEscrowAccountRequest { string address = 1; } - -// QueryGetEscrowAccountResponse is the response type for the -// Query/EscrowAccount RPC method. -message QueryGetEscrowAccountResponse { - EscrowAccount escrowAccount = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryAllEscrowAccountRequest is the request type for the -// Query/EscrowAccountAll RPC method. -message QueryAllEscrowAccountRequest { - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryAllEscrowAccountResponse is the response type for the -// Query/EscrowAccountAll RPC method. -message QueryAllEscrowAccountResponse { - repeated EscrowAccount escrowAccount = 1 [ (gogoproto.nullable) = false ]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/proto/core/identity/state.proto b/proto/core/identity/state.proto new file mode 100644 index 000000000..1413634da --- /dev/null +++ b/proto/core/identity/state.proto @@ -0,0 +1,57 @@ +syntax = "proto3"; + +package core.identity; + +import "cosmos/orm/v1/orm.proto"; + +option go_package = "github.com/sonr-io/core/x/identity/types"; + +message Balance { + option (cosmos.orm.v1.table) = { + id : 1; +primary_key : { +fields: + "account,denom" +} +index : { +id: + 1 fields : "denom" +} /* this allows querying for the accounts which own a denom */ +}; + +bytes account = 1; +string denom = 2; +uint64 amount = 3; +} + +message Account { + option (cosmos.orm.v1.table) = { + id : 2; +primary_key : { +fields: + "id", auto_increment : true +} +index : { +id: + 1, fields : "address", unique : true +} +}; + +uint64 id = 1; +bytes address = 2; +} + +message Config { + option (cosmos.orm.v1.singleton) = { + id : 3 + }; + + int64 voting_period = 1; + uint64 min_threshold = 2; + string account_did_method_name = 3; + string account_did_method_context = 4; + int64 acccount_discovery_reward = 5; + string did_base_context = 6; + int32 maximum_identity_aliases = 7; + repeated string supported_did_methods = 8; +} diff --git a/proto/core/identity/tx.proto b/proto/core/identity/tx.proto index b714ebe47..36cf38c7b 100644 --- a/proto/core/identity/tx.proto +++ b/proto/core/identity/tx.proto @@ -2,8 +2,8 @@ syntax = "proto3"; package core.identity; -import "core/identity/did.proto"; import "core/identity/account.proto"; +import "core/identity/did.proto"; option go_package = "github.com/sonr-io/core/x/identity/types"; @@ -25,18 +25,6 @@ service Msg { // DeleteControllerAccount deletes a controller account. rpc DeleteControllerAccount(MsgDeleteControllerAccount) returns (MsgDeleteControllerAccountResponse); - - // CreateEscrowAccount creates a new escrow account. - rpc CreateEscrowAccount(MsgCreateEscrowAccount) - returns (MsgCreateEscrowAccountResponse); - - // UpdateEscrowAccount updates an existing escrow account. - rpc UpdateEscrowAccount(MsgUpdateEscrowAccount) - returns (MsgUpdateEscrowAccountResponse); - - // DeleteEscrowAccount deletes an escrow account. - rpc DeleteEscrowAccount(MsgDeleteEscrowAccount) - returns (MsgDeleteEscrowAccountResponse); } // MsgRegisterIdentity represents a request to register a new identity. @@ -100,43 +88,3 @@ message MsgDeleteControllerAccount { // MsgDeleteControllerAccountResponse represents the response to a delete // controller account request. message MsgDeleteControllerAccountResponse {} - -// MsgCreateEscrowAccount represents a request to create a new escrow account. -message MsgCreateEscrowAccount { - string creator = 1; // The creator of the escrow account. - string address = 2; // The address of the escrow account. - string publicKey = 3; // The public key of the escrow account. - string lockupUsdBalance = 4; // The lockup USD balance of the escrow account. -} - -// MsgCreateEscrowAccountResponse represents the response to a create escrow -// account request. -message MsgCreateEscrowAccountResponse { - uint64 id = 1; // The ID of the created escrow account. - EscrowAccount account = 2; // The created escrow account. -} - -// MsgUpdateEscrowAccount represents a request to update an existing escrow -// account. -message MsgUpdateEscrowAccount { - string creator = 1; // The creator of the escrow account. - uint64 id = 2; // The ID of the escrow account to be updated. - string address = 3; // The address of the escrow account to be updated. - string publicKey = 4; // The updated public key of the escrow account. - string lockupUsdBalance = - 5; // The updated lockup USD balance of the escrow account. -} - -// MsgUpdateEscrowAccountResponse represents the response to an update escrow -// account request. -message MsgUpdateEscrowAccountResponse {} - -// MsgDeleteEscrowAccount represents a request to delete an escrow account. -message MsgDeleteEscrowAccount { - string creator = 1; // The creator of the escrow account. - string address = 2; // The address of the escrow account to be deleted. -} - -// MsgDeleteEscrowAccountResponse represents the response to a delete escrow -// account request. -message MsgDeleteEscrowAccountResponse {} diff --git a/proto/core/service/org.proto b/proto/core/service/org.proto deleted file mode 100644 index bcb08d263..000000000 --- a/proto/core/service/org.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; - -package core.service; - -option go_package = "github.com/sonr-io/core/x/service/types"; - -message ServiceOrganization { - string id = 1; - string admin = 2; // The entity controlling the service - repeated string service_records = - 3; // The origins that can access the service - string name = 4; // The name of the service - string description = 5; // The description of the service - repeated string tlds = 6; // The tlds that can access the service -} diff --git a/proto/core/service/query.proto b/proto/core/service/query.proto index 10922d340..817d60519 100644 --- a/proto/core/service/query.proto +++ b/proto/core/service/query.proto @@ -2,13 +2,13 @@ syntax = "proto3"; package core.service; +import "core/identity/did.proto"; +import "core/service/params.proto"; +import "core/service/record.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; // Importing necessary proto files import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "core/service/params.proto"; -import "core/service/record.proto"; -import "core/identity/did.proto"; option go_package = "github.com/sonr-io/core/x/service/types"; diff --git a/proto/core/service/record.proto b/proto/core/service/record.proto index 31e8be2ec..9c41fe809 100644 --- a/proto/core/service/record.proto +++ b/proto/core/service/record.proto @@ -9,6 +9,7 @@ message ServiceRecord { repeated string origins = 3; string name = 4; // The name of the service string description = 5; // The description of the service + string category = 6; // The category of the service } // ServiceRelationship is a relationship between a service and a User entity. diff --git a/proto/highway/wallet/v1/service.proto b/proto/highway/wallet/v1/service.proto index 76543ff55..aa1ae4cd4 100644 --- a/proto/highway/wallet/v1/service.proto +++ b/proto/highway/wallet/v1/service.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package highway.wallet.v1; -import "core/crypto/coin.proto"; +import "common/crypto/coin.proto"; import "google/api/annotations.proto"; option go_package = "github.com/sonr-io/core/types/highway/wallet/v1;walletpb"; @@ -40,7 +40,7 @@ service WalletService { message CreateAccountRequest { string jwt = 1; string name = 2; - core.crypto.CoinType coin_type = 3; + common.crypto.CoinType coin_type = 3; string network = 4; } @@ -49,7 +49,7 @@ message CreateAccountResponse { bool success = 1; string message = 2; string address = 3; - core.crypto.CoinType coin_type = 4; + common.crypto.CoinType coin_type = 4; string owner = 5; } @@ -64,7 +64,7 @@ message GetAccountResponse { bool success = 1; string message = 2; string address = 3; - core.crypto.CoinType coin_type = 4; + common.crypto.CoinType coin_type = 4; string owner = 5; } diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 41434761e..0860bd089 100644 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -8,7 +8,7 @@ set -e echo "Generating gogo proto code" cd proto -proto_dirs=$(find ./core ./highway -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) +proto_dirs=$(find ./core ./highway ./common -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) for dir in $proto_dirs; do for file in $(find "${dir}" -maxdepth 1 -name '*.proto'); do # this regex checks if a proto file has its go_package set to cosmossdk.io/api/... @@ -19,7 +19,6 @@ for dir in $proto_dirs; do fi done done - cd .. # move proto files to the right places diff --git a/pkg/did/controller/controller.go b/services/did/controller/controller.go similarity index 93% rename from pkg/did/controller/controller.go rename to services/did/controller/controller.go index eeb8aab49..976095e3a 100644 --- a/pkg/did/controller/controller.go +++ b/services/did/controller/controller.go @@ -5,11 +5,11 @@ import ( "fmt" "github.com/highlight/highlight/sdk/highlight-go" - "github.com/sonr-io/core/pkg/crypto" - "github.com/sonr-io/core/pkg/did/method/btcr" - "github.com/sonr-io/core/pkg/did/method/ethr" - "github.com/sonr-io/core/pkg/did/method/sonr" - "github.com/sonr-io/core/pkg/did/types" + "github.com/sonr-io/core/internal/crypto" + "github.com/sonr-io/core/services/did/method/btcr" + "github.com/sonr-io/core/services/did/method/ethr" + "github.com/sonr-io/core/services/did/method/sonr" + "github.com/sonr-io/core/services/did/types" identitytypes "github.com/sonr-io/core/x/identity/types" ) diff --git a/pkg/did/controller/idx.go b/services/did/controller/idx.go similarity index 94% rename from pkg/did/controller/idx.go rename to services/did/controller/idx.go index 53d504583..5ba37ccec 100644 --- a/pkg/did/controller/idx.go +++ b/services/did/controller/idx.go @@ -6,9 +6,9 @@ import ( "fmt" - "github.com/sonr-io/core/pkg/did/method/authr" - "github.com/sonr-io/core/pkg/did/method/sonr" - "github.com/sonr-io/core/pkg/did/types" + "github.com/sonr-io/core/services/did/method/authr" + "github.com/sonr-io/core/services/did/method/sonr" + "github.com/sonr-io/core/services/did/types" identitytypes "github.com/sonr-io/core/x/identity/types" ) diff --git a/pkg/did/did.go b/services/did/did.go similarity index 100% rename from pkg/did/did.go rename to services/did/did.go diff --git a/pkg/did/method/authr/authr.go b/services/did/method/authr/authr.go similarity index 97% rename from pkg/did/method/authr/authr.go rename to services/did/method/authr/authr.go index 8932af756..d9d050a14 100644 --- a/pkg/did/method/authr/authr.go +++ b/services/did/method/authr/authr.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/go-webauthn/webauthn/protocol" - "github.com/sonr-io/core/pkg/crypto" - "github.com/sonr-io/core/pkg/did/types" + "github.com/sonr-io/core/internal/crypto" + "github.com/sonr-io/core/services/did/types" "github.com/sonr-io/kryptology/pkg/core/curves" ) diff --git a/pkg/did/method/authr/data.go b/services/did/method/authr/data.go similarity index 98% rename from pkg/did/method/authr/data.go rename to services/did/method/authr/data.go index 2e5d6d538..777c35d9a 100644 --- a/pkg/did/method/authr/data.go +++ b/services/did/method/authr/data.go @@ -9,7 +9,7 @@ import ( "fmt" "io" - "github.com/sonr-io/core/pkg/did/types" + "github.com/sonr-io/core/services/did/types" "golang.org/x/crypto/hkdf" "lukechampine.com/blake3" ) diff --git a/pkg/did/method/authr/secret.go b/services/did/method/authr/secret.go similarity index 98% rename from pkg/did/method/authr/secret.go rename to services/did/method/authr/secret.go index 217dcfc8c..02f7918c5 100644 --- a/pkg/did/method/authr/secret.go +++ b/services/did/method/authr/secret.go @@ -9,7 +9,7 @@ import ( "io" "github.com/google/uuid" - "github.com/sonr-io/core/pkg/crypto" + "github.com/sonr-io/core/internal/crypto" "github.com/sonr-io/kryptology/pkg/accumulator" "github.com/sonr-io/kryptology/pkg/core/curves" "golang.org/x/crypto/hkdf" diff --git a/pkg/did/method/btcr/account.go b/services/did/method/btcr/account.go similarity index 95% rename from pkg/did/method/btcr/account.go rename to services/did/method/btcr/account.go index efe2e5ff1..6b453fd4b 100644 --- a/pkg/did/method/btcr/account.go +++ b/services/did/method/btcr/account.go @@ -1,9 +1,9 @@ package btcr import ( - "github.com/sonr-io/core/pkg/crypto" - "github.com/sonr-io/core/pkg/did/types" - "github.com/sonr-io/core/pkg/mpc" + "github.com/sonr-io/core/internal/crypto" + "github.com/sonr-io/core/services/did/types" + "github.com/sonr-io/core/services/mpc" ) const Method = types.DIDMethod("btcr") diff --git a/pkg/did/method/ethr/account.go b/services/did/method/ethr/account.go similarity index 95% rename from pkg/did/method/ethr/account.go rename to services/did/method/ethr/account.go index b6dde1069..da95db058 100644 --- a/pkg/did/method/ethr/account.go +++ b/services/did/method/ethr/account.go @@ -1,9 +1,9 @@ package ethr import ( - "github.com/sonr-io/core/pkg/crypto" - "github.com/sonr-io/core/pkg/did/types" - "github.com/sonr-io/core/pkg/mpc" + "github.com/sonr-io/core/internal/crypto" + "github.com/sonr-io/core/services/did/types" + "github.com/sonr-io/core/services/mpc" ) const Method = types.DIDMethod("ethr") diff --git a/pkg/did/method/sonr/account.go b/services/did/method/sonr/account.go similarity index 96% rename from pkg/did/method/sonr/account.go rename to services/did/method/sonr/account.go index bd4fd2f35..7d57e97dd 100644 --- a/pkg/did/method/sonr/account.go +++ b/services/did/method/sonr/account.go @@ -3,9 +3,9 @@ package sonr import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/sonr-io/core/pkg/crypto" - "github.com/sonr-io/core/pkg/did/types" - "github.com/sonr-io/core/pkg/mpc" + "github.com/sonr-io/core/internal/crypto" + "github.com/sonr-io/core/services/did/types" + "github.com/sonr-io/core/services/mpc" ) // Method is the DID method for Sonr Wallet Actor DIDs diff --git a/pkg/did/method/sonr/client.go b/services/did/method/sonr/client.go similarity index 98% rename from pkg/did/method/sonr/client.go rename to services/did/method/sonr/client.go index cd39a0e76..7aa75ca08 100644 --- a/pkg/did/method/sonr/client.go +++ b/services/did/method/sonr/client.go @@ -10,7 +10,7 @@ import ( "google.golang.org/grpc" "github.com/sonr-io/core/internal/local" - "github.com/sonr-io/core/pkg/did/types" + "github.com/sonr-io/core/services/did/types" ) // ! ||--------------------------------------------------------------------------------|| diff --git a/pkg/did/method/sonr/signer.go b/services/did/method/sonr/signer.go similarity index 97% rename from pkg/did/method/sonr/signer.go rename to services/did/method/sonr/signer.go index 867d0e9ad..782166537 100644 --- a/pkg/did/method/sonr/signer.go +++ b/services/did/method/sonr/signer.go @@ -7,8 +7,8 @@ import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" txtypes "github.com/cosmos/cosmos-sdk/types/tx" - "github.com/sonr-io/core/pkg/crypto" - "github.com/sonr-io/core/pkg/did/types" + "github.com/sonr-io/core/internal/crypto" + "github.com/sonr-io/core/services/did/types" identitytypes "github.com/sonr-io/core/x/identity/types" ) diff --git a/pkg/did/types/accumulator.go b/services/did/types/accumulator.go similarity index 98% rename from pkg/did/types/accumulator.go rename to services/did/types/accumulator.go index 67b23087a..cdc789802 100644 --- a/pkg/did/types/accumulator.go +++ b/services/did/types/accumulator.go @@ -7,7 +7,7 @@ import ( "github.com/sonr-io/kryptology/pkg/accumulator" "github.com/sonr-io/kryptology/pkg/core/curves" - "github.com/sonr-io/core/pkg/crypto" + "github.com/sonr-io/core/internal/crypto" ) // DIDAccumulator is a ZKSet accumulator for a DID diff --git a/pkg/did/types/identifier.go b/services/did/types/identifier.go similarity index 98% rename from pkg/did/types/identifier.go rename to services/did/types/identifier.go index fbf301cbb..7ca91fa83 100644 --- a/pkg/did/types/identifier.go +++ b/services/did/types/identifier.go @@ -3,7 +3,7 @@ package types import ( "github.com/sonr-io/kryptology/pkg/accumulator" - "github.com/sonr-io/core/pkg/crypto" + "github.com/sonr-io/core/internal/crypto" identitytypes "github.com/sonr-io/core/x/identity/types" ) diff --git a/pkg/did/types/method.go b/services/did/types/method.go similarity index 96% rename from pkg/did/types/method.go rename to services/did/types/method.go index d3a08ee65..9efb3b5f5 100644 --- a/pkg/did/types/method.go +++ b/services/did/types/method.go @@ -1,6 +1,6 @@ package types -import "github.com/sonr-io/core/pkg/crypto" +import "github.com/sonr-io/core/internal/crypto" // DIDMethod is a DID method type DIDMethod string diff --git a/pkg/did/types/property.go b/services/did/types/property.go similarity index 100% rename from pkg/did/types/property.go rename to services/did/types/property.go diff --git a/pkg/did/types/resource.go b/services/did/types/resource.go similarity index 97% rename from pkg/did/types/resource.go rename to services/did/types/resource.go index ad0c6c453..6e9d72d35 100644 --- a/pkg/did/types/resource.go +++ b/services/did/types/resource.go @@ -6,7 +6,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/sonr-io/core/pkg/crypto" + "github.com/sonr-io/core/internal/crypto" ) // TxResponse is a type alias for sdk.TxResponse diff --git a/pkg/did/types/store.go b/services/did/types/store.go similarity index 100% rename from pkg/did/types/store.go rename to services/did/types/store.go diff --git a/pkg/did/types/url.go b/services/did/types/url.go similarity index 95% rename from pkg/did/types/url.go rename to services/did/types/url.go index 737f8e4bc..b74faf4c6 100644 --- a/pkg/did/types/url.go +++ b/services/did/types/url.go @@ -5,11 +5,11 @@ import ( "strings" txtypes "github.com/cosmos/cosmos-sdk/types/tx" - servicetypes "github.com/sonr-io/core/x/service/types" + "github.com/sonr-io/core/types/webauthn" ) // Credential is a webauthn credential -type Credential = servicetypes.Credential +type Credential = webauthn.Credential // BroadcastTxResponse is a tx response type BroadcastTxResponse = txtypes.BroadcastTxResponse diff --git a/pkg/mpc/base/account.go b/services/mpc/base/account.go similarity index 94% rename from pkg/mpc/base/account.go rename to services/mpc/base/account.go index 25d90ea12..fe343107e 100644 --- a/pkg/mpc/base/account.go +++ b/services/mpc/base/account.go @@ -4,11 +4,11 @@ import ( "encoding/json" "fmt" - "github.com/sonr-io/core/pkg/crypto" + "github.com/sonr-io/core/internal/crypto" secp256k1 "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - algo "github.com/sonr-io/core/pkg/mpc/protocol/dkls" - v1types "github.com/sonr-io/core/pkg/mpc/types/v1" + algo "github.com/sonr-io/core/services/mpc/protocol/dkls" + v1types "github.com/sonr-io/core/services/mpc/types" ) type EncryptionKey = *secp256k1.PubKey diff --git a/pkg/mpc/mpc.go b/services/mpc/mpc.go similarity index 59% rename from pkg/mpc/mpc.go rename to services/mpc/mpc.go index 9b1952558..5e6665172 100644 --- a/pkg/mpc/mpc.go +++ b/services/mpc/mpc.go @@ -1,11 +1,11 @@ package mpc import ( - "github.com/sonr-io/core/pkg/crypto" - "github.com/sonr-io/core/pkg/mpc/base" - models "github.com/sonr-io/core/pkg/mpc/base" - v1algo "github.com/sonr-io/core/pkg/mpc/protocol/dkls" - v1types "github.com/sonr-io/core/pkg/mpc/types/v1" + "github.com/sonr-io/core/internal/crypto" + "github.com/sonr-io/core/services/mpc/base" + models "github.com/sonr-io/core/services/mpc/base" + v1algo "github.com/sonr-io/core/services/mpc/protocol/dkls" + v1types "github.com/sonr-io/core/services/mpc/types" ) // AccountV1 is a type alias for the AccountV1 struct in the base package. @@ -20,9 +20,6 @@ type KeyshareSet = v1types.KeyshareSet // EncKeyshareSet is a type alias for the EncKeyshareSet struct in the v1types package. type EncKeyshareSet = v1types.EncKeyshareSet -// ZKSet is a type alias for the ZKSet struct in the v1types package. -type ZKSet = v1types.ZKSet - // GenerateV2 generates a new account with a given ID. func GenerateV2(name string, ct crypto.CoinType) (*models.AccountV1, KeyshareSet, error) { return models.NewAccountV1(name, ct) @@ -42,12 +39,3 @@ func NewKSS(pub *KeyshareV1, priv *KeyshareV1) KeyshareSet { return v1types.NewKSS(pub, priv) } -// NewZKSet creates a new zero-knowledge set from a list of zero-knowledge proofs. -func NewZKSet(pubKey *crypto.Secp256k1PubKey, initialIds ...string) (ZKSet, error) { - return v1types.CreateZkSet(pubKey, initialIds...) -} - -// LoadZKSet loads a zero-knowledge set from a list of zero-knowledge proofs. -func LoadZKSet(str string) (ZKSet, error) { - return v1types.OpenZkSet(str) -} diff --git a/pkg/mpc/mpc_test.go b/services/mpc/mpc_test.go similarity index 88% rename from pkg/mpc/mpc_test.go rename to services/mpc/mpc_test.go index 8a5f8f681..acc97b775 100644 --- a/pkg/mpc/mpc_test.go +++ b/services/mpc/mpc_test.go @@ -4,8 +4,8 @@ import ( "strings" "testing" - "github.com/sonr-io/core/pkg/crypto" - v1 "github.com/sonr-io/core/pkg/mpc/base" + "github.com/sonr-io/core/internal/crypto" + v1 "github.com/sonr-io/core/services/mpc/base" "github.com/stretchr/testify/assert" ) diff --git a/pkg/mpc/protocol/dkls/dkls.go b/services/mpc/protocol/dkls/dkls.go similarity index 97% rename from pkg/mpc/protocol/dkls/dkls.go rename to services/mpc/protocol/dkls/dkls.go index 975a1fd94..8e26652df 100644 --- a/pkg/mpc/protocol/dkls/dkls.go +++ b/services/mpc/protocol/dkls/dkls.go @@ -3,7 +3,7 @@ package dkls import ( "fmt" - mpcv1types "github.com/sonr-io/core/pkg/mpc/types/v1" + mpcv1types "github.com/sonr-io/core/services/mpc/types" "github.com/sonr-io/kryptology/pkg/core/curves" "github.com/sonr-io/kryptology/pkg/core/protocol" dklsv1 "github.com/sonr-io/kryptology/pkg/tecdsa/dkls/v1" diff --git a/pkg/mpc/protocol/dkls/dkls_test.go b/services/mpc/protocol/dkls/dkls_test.go similarity index 93% rename from pkg/mpc/protocol/dkls/dkls_test.go rename to services/mpc/protocol/dkls/dkls_test.go index 9c941cbe3..21e4af40d 100644 --- a/pkg/mpc/protocol/dkls/dkls_test.go +++ b/services/mpc/protocol/dkls/dkls_test.go @@ -3,8 +3,8 @@ package dkls_test import ( "testing" - "github.com/sonr-io/core/pkg/crypto" - "github.com/sonr-io/core/pkg/mpc/protocol/dkls" + "github.com/sonr-io/core/internal/crypto" + "github.com/sonr-io/core/services/mpc/protocol/dkls" "github.com/stretchr/testify/assert" ) diff --git a/services/mpc/types/codec.go b/services/mpc/types/codec.go new file mode 100644 index 000000000..b1d7d2e63 --- /dev/null +++ b/services/mpc/types/codec.go @@ -0,0 +1,76 @@ +package types + +import ( + "errors" + "math/big" + + secp256k1 "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + "github.com/sonr-io/kryptology/pkg/core/curves" + pv1 "github.com/sonr-io/kryptology/pkg/core/protocol" +) + +type Secp256k1PublicKey = *secp256k1.PubKey +type PubKey = cryptotypes.PubKey +type KeyshareRole string + +const ( + // KeyshareRolePublic is the default role for the alice dkg + KeyshareRolePublic KeyshareRole = "alice" + + // KeyshareRoleUser is the role for an encrypted keyshare for a user + KeyshareRoleUser KeyshareRole = "bob" +) + +func (ksr KeyshareRole) isAlice() bool { + return ksr == KeyshareRolePublic +} + +func (ksr KeyshareRole) isBob() bool { + return ksr == KeyshareRoleUser +} + +func SerializeECDSASecp256k1Signature(sig *curves.EcdsaSignature) ([]byte, error) { + rBytes := sig.R.Bytes() + sBytes := sig.S.Bytes() + + sigBytes := make([]byte, 66) // V (1 byte) + R (32 bytes) + S (32 bytes) + sigBytes[0] = byte(sig.V) + copy(sigBytes[33-len(rBytes):33], rBytes) + copy(sigBytes[66-len(sBytes):66], sBytes) + return sigBytes, nil +} + +func DeserializeECDSASecp256k1Signature(sigBytes []byte) (*curves.EcdsaSignature, error) { + if len(sigBytes) != 66 { + return nil, errors.New("malformed signature: not the correct size") + } + sig := &curves.EcdsaSignature{ + V: int(sigBytes[0]), + R: new(big.Int).SetBytes(sigBytes[1:33]), + S: new(big.Int).SetBytes(sigBytes[33:66]), + } + return sig, nil +} + +// For DKG bob starts first. For refresh and sign, Alice starts first. +func RunIteratedProtocol(firstParty pv1.Iterator, secondParty pv1.Iterator) (error, error) { + var ( + message *pv1.Message + aErr error + bErr error + ) + for aErr != pv1.ErrProtocolFinished || bErr != pv1.ErrProtocolFinished { + // Crank each protocol forward one iteration + message, bErr = firstParty.Next(message) + if bErr != nil && bErr != pv1.ErrProtocolFinished { + return nil, bErr + } + + message, aErr = secondParty.Next(message) + if aErr != nil && aErr != pv1.ErrProtocolFinished { + return aErr, nil + } + } + return aErr, bErr +} diff --git a/pkg/mpc/types/v1/keyshare.go b/services/mpc/types/keyshare.go similarity index 99% rename from pkg/mpc/types/v1/keyshare.go rename to services/mpc/types/keyshare.go index fba1db75f..4bfa823bc 100644 --- a/pkg/mpc/types/v1/keyshare.go +++ b/services/mpc/types/keyshare.go @@ -5,7 +5,7 @@ import ( "fmt" "math/big" - sonrcrypto "github.com/sonr-io/core/pkg/crypto" + sonrcrypto "github.com/sonr-io/core/internal/crypto" "github.com/sonr-io/core/types/crypto" "github.com/sonr-io/kryptology/pkg/core/curves" "github.com/sonr-io/kryptology/pkg/core/protocol" diff --git a/pkg/mpc/types/v1/kss.go b/services/mpc/types/kss.go similarity index 99% rename from pkg/mpc/types/v1/kss.go rename to services/mpc/types/kss.go index 3de991b92..3a4e62c88 100644 --- a/pkg/mpc/types/v1/kss.go +++ b/services/mpc/types/kss.go @@ -8,7 +8,7 @@ import ( dklsv1 "github.com/sonr-io/kryptology/pkg/tecdsa/dkls/v1" secp256k1 "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" - "github.com/sonr-io/core/pkg/crypto" + "github.com/sonr-io/core/internal/crypto" "golang.org/x/crypto/sha3" ) diff --git a/services/plugin/cache.go b/services/plugin/cache.go new file mode 100644 index 000000000..8708c8dd6 --- /dev/null +++ b/services/plugin/cache.go @@ -0,0 +1,89 @@ +package plugin + +import ( + "encoding/gob" + "fmt" + "net" + "path" + + hplugin "github.com/hashicorp/go-plugin" + + "github.com/sonr-io/core/pkg/cache" +) + +const ( + cacheFileName = "sonr_plugin_cache.db" + cacheNamespace = "plugin.rpc.context" +) + + +var storageCache *cache.Cache[hplugin.ReattachConfig] + +func init() { + gob.Register(hplugin.ReattachConfig{}) + gob.Register(&net.UnixAddr{}) +} + +func writeConfigCache(pluginPath string, conf hplugin.ReattachConfig) error { + if pluginPath == "" { + return fmt.Errorf("provided path is invalid: %s", pluginPath) + } + if conf.Addr == nil { + return fmt.Errorf("plugin Address info cannot be empty") + } + cache, err := newCache() + if err != nil { + return err + } + return cache.Put(pluginPath, conf) +} + +func readConfigCache(pluginPath string) (hplugin.ReattachConfig, error) { + if pluginPath == "" { + return hplugin.ReattachConfig{}, fmt.Errorf("provided path is invalid: %s", pluginPath) + } + cache, err := newCache() + if err != nil { + return hplugin.ReattachConfig{}, err + } + return cache.Get(pluginPath) +} + +func checkConfCache(pluginPath string) bool { + if pluginPath == "" { + return false + } + cache, err := newCache() + if err != nil { + return false + } + _, err = cache.Get(pluginPath) + return err == nil +} + +func deleteConfCache(pluginPath string) error { + if pluginPath == "" { + return fmt.Errorf("provided path is invalid: %s", pluginPath) + } + cache, err := newCache() + if err != nil { + return err + } + return cache.Delete(pluginPath) +} + +func newCache() (*cache.Cache[hplugin.ReattachConfig], error) { + cacheRootDir, err := PluginsPath() + if err != nil { + return nil, err + } + if storageCache == nil { + storage, err := cache.NewStorage(path.Join(cacheRootDir, cacheFileName)) + if err != nil { + return nil, err + } + c := cache.New[hplugin.ReattachConfig](storage, cacheNamespace) + storageCache = &c + } + return storageCache, nil +} diff --git a/services/plugin/cache_test.go b/services/plugin/cache_test.go new file mode 100755 index 000000000..c11ca8b03 --- /dev/null +++ b/services/plugin/cache_test.go @@ -0,0 +1,109 @@ +package plugin + +import ( + "net" + "testing" + + hplugin "github.com/hashicorp/go-plugin" + "github.com/stretchr/testify/require" +) + +func TestReadWriteConfigCache(t *testing.T) { + t.Run("Should cache plugin config and read from cache", func(t *testing.T) { + const path = "/path/to/awesome/plugin" + unixFD, _ := net.ResolveUnixAddr("unix", "/var/folders/5k/sv4bxrs102n_6rr7430jc7j80000gn/T/plugin193424090") + + rc := hplugin.ReattachConfig{ + Protocol: hplugin.ProtocolNetRPC, + ProtocolVersion: hplugin.CoreProtocolVersion, + Addr: unixFD, + Pid: 24464, + } + + err := writeConfigCache(path, rc) + require.NoError(t, err) + + c, err := readConfigCache(path) + require.NoError(t, err) + require.Equal(t, rc, c) + }) + + t.Run("Should error writing bad plugin config to cache", func(t *testing.T) { + const path = "/path/to/awesome/plugin" + rc := hplugin.ReattachConfig{ + Protocol: hplugin.ProtocolNetRPC, + ProtocolVersion: hplugin.CoreProtocolVersion, + Addr: nil, + Pid: 24464, + } + + err := writeConfigCache(path, rc) + require.Error(t, err) + }) + + t.Run("Should error with invalid plugin path", func(t *testing.T) { + const path = "" + rc := hplugin.ReattachConfig{ + Protocol: hplugin.ProtocolNetRPC, + ProtocolVersion: hplugin.CoreProtocolVersion, + Addr: nil, + Pid: 24464, + } + + err := writeConfigCache(path, rc) + require.Error(t, err) + }) +} + +func TestDeleteConfCache(t *testing.T) { + t.Run("Delete plugin config after write to cache should remove from cache", func(t *testing.T) { + const path = "/path/to/awesome/plugin" + unixFD, _ := net.ResolveUnixAddr("unix", "/var/folders/5k/sv4bxrs102n_6rr7430jc7j80000gn/T/plugin193424090") + + rc := hplugin.ReattachConfig{ + Protocol: hplugin.ProtocolNetRPC, + ProtocolVersion: hplugin.CoreProtocolVersion, + Addr: unixFD, + Pid: 24464, + } + + err := writeConfigCache(path, rc) + require.NoError(t, err) + + err = deleteConfCache(path) + require.NoError(t, err) + + // there should be an error after deleting the config from the cache + _, err = readConfigCache(path) + require.Error(t, err) + }) + + t.Run("Delete plugin config should return error given empty path", func(t *testing.T) { + const path = "" + err := deleteConfCache(path) + require.Error(t, err) + }) +} + +func TestCheckConfCache(t *testing.T) { + const path = "/path/to/awesome/plugin" + unixFD, _ := net.ResolveUnixAddr("unix", "/var/folders/5k/sv4bxrs102n_6rr7430jc7j80000gn/T/plugin193424090") + + rc := hplugin.ReattachConfig{ + Protocol: hplugin.ProtocolNetRPC, + ProtocolVersion: hplugin.CoreProtocolVersion, + Addr: unixFD, + Pid: 24464, + } + + t.Run("Cache should be hydrated", func(t *testing.T) { + err := writeConfigCache(path, rc) + require.NoError(t, err) + require.Equal(t, true, checkConfCache(path)) + }) + + t.Run("Cache should be empty", func(t *testing.T) { + _ = deleteConfCache(path) + require.Equal(t, false, checkConfCache(path)) + }) +} diff --git a/services/plugin/interface.go b/services/plugin/interface.go new file mode 100644 index 000000000..c200f29cf --- /dev/null +++ b/services/plugin/interface.go @@ -0,0 +1,469 @@ +package plugin + +import ( + "bytes" + "encoding/gob" + "fmt" + "net/rpc" + "os" + "strconv" + "strings" + + "github.com/hashicorp/go-plugin" + "github.com/spf13/cobra" + "github.com/spf13/pflag" +) + +func init() { + gob.Register(Manifest{}) + gob.Register(ExecutedCommand{}) + gob.Register(ExecutedHook{}) +} + +// An ignite plugin must implements the Plugin interface. +// +//go:generate mockery --srcpkg . --name Interface --structname PluginInterface --filename interface.go --with-expecter +type Interface interface { + // Manifest declares the plugin's Command(s) and Hook(s). + Manifest() (Manifest, error) + + // Execute will be invoked by ignite when a plugin Command is executed. + // It is global for all commands declared in Manifest, if you have declared + // multiple commands, use cmd.Path to distinguish them. + Execute(cmd ExecutedCommand) error + + // ExecuteHookPre is invoked by ignite when a command specified by the Hook + // path is invoked. + // It is global for all hooks declared in Manifest, if you have declared + // multiple hooks, use hook.Name to distinguish them. + ExecuteHookPre(hook ExecutedHook) error + // ExecuteHookPost is invoked by ignite when a command specified by the hook + // path is invoked. + // It is global for all hooks declared in Manifest, if you have declared + // multiple hooks, use hook.Name to distinguish them. + ExecuteHookPost(hook ExecutedHook) error + // ExecuteHookCleanUp is invoked by ignite when a command specified by the + // hook path is invoked. Unlike ExecuteHookPost, it is invoked regardless of + // execution status of the command and hooks. + // It is global for all hooks declared in Manifest, if you have declared + // multiple hooks, use hook.Name to distinguish them. + ExecuteHookCleanUp(hook ExecutedHook) error +} + +// Manifest represents the plugin behavior. +type Manifest struct { + Name string + // Commands contains the commands that will be added to the list of ignite + // commands. Each commands are independent, for nested commands use the + // inner Commands field. + Commands []Command + // Hooks contains the hooks that will be attached to the existing ignite + // commands. + Hooks []Hook + // SharedHost enables sharing a single plugin server across all running instances + // of a plugin. Useful if a plugin adds or extends long running commands + // + // Example: if a plugin defines a hook on `ignite chain serve`, a plugin server is instanciated + // when the command is run. Now if you want to interact with that instance from commands + // defined in that plugin, you need to enable `SharedHost`, or else the commands will just + // instantiate separate plugin servers. + // + // When enabled, all plugins of the same `Path` loaded from the same configuration will + // attach it's rpc client to a an existing rpc server. + // + // If a plugin instance has no other running plugin servers, it will create one and it will be the host. + SharedHost bool `yaml:"shared_host"` +} + +// ImportCobraCommand allows to hydrate m with a standard root cobra commands. +func (m *Manifest) ImportCobraCommand(c *cobra.Command, placeCommandUnder string) { + m.Commands = append(m.Commands, convertCobraCommand(c, placeCommandUnder)) +} + +func convertCobraCommand(c *cobra.Command, placeCommandUnder string) Command { + cmd := Command{ + Use: c.Use, + Aliases: c.Aliases, + Short: c.Short, + Long: c.Long, + Hidden: c.Hidden, + PlaceCommandUnder: placeCommandUnder, + Flags: convertPFlags(c), + } + for _, c := range c.Commands() { + cmd.Commands = append(cmd.Commands, convertCobraCommand(c, "")) + } + return cmd +} + +// Command represents a plugin command. +type Command struct { + // Same as cobra.Command.Use + Use string + // Same as cobra.Command.Aliases + Aliases []string + // Same as cobra.Command.Short + Short string + // Same as cobra.Command.Long + Long string + // Same as cobra.Command.Hidden + Hidden bool + // Flags holds the list of command flags + Flags []Flag + // PlaceCommandUnder indicates where the command should be placed. + // For instance `ignite scaffold` will place the command at the + // `scaffold` command. + // An empty value is interpreted as `ignite` (==root). + PlaceCommandUnder string + // List of sub commands + Commands []Command +} + +// PlaceCommandUnderFull returns a normalized p.PlaceCommandUnder, by adding +// the `ignite ` prefix if not present. +func (c Command) PlaceCommandUnderFull() string { + return commandFull(c.PlaceCommandUnder) +} + +func commandFull(cmdPath string) string { + const rootCmdName = "ignite" + if !strings.HasPrefix(cmdPath, rootCmdName) { + cmdPath = rootCmdName + " " + cmdPath + } + return strings.TrimSpace(cmdPath) +} + +// ToCobraCommand turns Command into a cobra.Command so it can be added to a +// parent command. +func (c Command) ToCobraCommand() (*cobra.Command, error) { + cmd := &cobra.Command{ + Use: c.Use, + Aliases: c.Aliases, + Short: c.Short, + Long: c.Long, + Hidden: c.Hidden, + } + for _, f := range c.Flags { + err := f.feedFlagSet(cmd) + if err != nil { + return nil, err + } + } + return cmd, nil +} + +// Hook represents a user defined action within a plugin. +type Hook struct { + // Name identifies the hook for the client to invoke the correct hook + // must be unique + Name string + // PlaceHookOn indicates the command to register the hooks for + PlaceHookOn string +} + +// PlaceHookOnFull returns a normalized p.PlaceCommandUnder, by adding the +// `ignite ` prefix if not present. +func (h Hook) PlaceHookOnFull() string { + return commandFull(h.PlaceHookOn) +} + +// ExecutedCommand represents a plugin command under execution. +type ExecutedCommand struct { + // Use is copied from Command.Use + Use string + // Path contains the command path, e.g. `ignite scaffold foo` + Path string + // Args are the command arguments + Args []string + // Full list of args taken from os.Args + OSArgs []string + // With contains the plugin config parameters + With map[string]string + + flags *pflag.FlagSet + pflags *pflag.FlagSet +} + +// ExecutedHook represents a plugin hook under execution. +type ExecutedHook struct { + // ExecutedCommand gives access to the command attached by the hook. + ExecutedCommand ExecutedCommand + // Hook is a copy of the original Hook defined in the Manifest. + Hook +} + +// Flags gives access to the commands' flags, like cobra.Command.Flags. +func (c *ExecutedCommand) Flags() *pflag.FlagSet { + if c.flags == nil { + c.flags = pflag.NewFlagSet(os.Args[0], pflag.ContinueOnError) + } + return c.flags +} + +// PersistentFlags gives access to the commands' persistent flags, like +// cobra.Command.PersistentFlags. +func (c *ExecutedCommand) PersistentFlags() *pflag.FlagSet { + if c.pflags == nil { + c.pflags = pflag.NewFlagSet(os.Args[0], pflag.ContinueOnError) + } + return c.pflags +} + +// SetFlags set the flags. +// As a plugin developer, you probably don't need to use it. +func (c *ExecutedCommand) SetFlags(cmd *cobra.Command) { + c.flags = cmd.Flags() + c.pflags = cmd.PersistentFlags() +} + +// Flag is a serializable representation of pflag.Flag. +type Flag struct { + Name string // name as it appears on command line + Shorthand string // one-letter abbreviated flag + Usage string // help message + DefValue string // default value (as text); for usage message + Type FlagType + Value string + // Persistent indicates wether or not the flag is propagated on children + // commands + Persistent bool +} + +// FlagType represents the pflag.Flag.Value.Type(). +type FlagType string + +const ( + // NOTE(tb): we declare only the main used cobra flag types for simplicity + // If a plugin receives an unhandled type, it will output an error. + FlagTypeString FlagType = "string" + FlagTypeInt FlagType = "int" + FlagTypeUint FlagType = "uint" + FlagTypeInt64 FlagType = "int64" + FlagTypeUint64 FlagType = "uint64" + FlagTypeBool FlagType = "bool" + FlagTypeStringSlice FlagType = "stringSlice" +) + +// feedFlagSet fills flagger with f. +func (f Flag) feedFlagSet(fgr flagger) error { + fs := fgr.Flags() + if f.Persistent { + fs = fgr.PersistentFlags() + } + switch f.Type { + case FlagTypeBool: + defVal, _ := strconv.ParseBool(f.DefValue) + fs.BoolP(f.Name, f.Shorthand, defVal, f.Usage) + fs.Set(f.Name, f.Value) + case FlagTypeInt: + defVal, _ := strconv.Atoi(f.DefValue) + fs.IntP(f.Name, f.Shorthand, defVal, f.Usage) + fs.Set(f.Name, f.Value) + case FlagTypeUint: + defVal, _ := strconv.ParseUint(f.DefValue, 10, 64) + fs.UintP(f.Name, f.Shorthand, uint(defVal), f.Usage) + fs.Set(f.Name, f.Value) + case FlagTypeInt64: + defVal, _ := strconv.ParseInt(f.DefValue, 10, 64) + fs.Int64P(f.Name, f.Shorthand, defVal, f.Usage) + fs.Set(f.Name, f.Value) + case FlagTypeUint64: + defVal, _ := strconv.ParseUint(f.DefValue, 10, 64) + fs.Uint64P(f.Name, f.Shorthand, defVal, f.Usage) + fs.Set(f.Name, f.Value) + case FlagTypeString: + fs.StringP(f.Name, f.Shorthand, f.DefValue, f.Usage) + fs.Set(f.Name, f.Value) + case FlagTypeStringSlice: + s := strings.Trim(f.DefValue, "[]") + defValue := strings.Fields(s) + fs.StringSliceP(f.Name, f.Shorthand, defValue, f.Usage) + fs.Set(f.Name, strings.Trim(f.Value, "[]")) + default: + return fmt.Errorf("flagset unmarshal: unhandled flag type %q in flag %#v", f.Type, f) + } + return nil +} + +// gobCommandFlags is used to gob encode/decode Command. +// Command can't be encoded because : +// - flags is unexported (because we want to expose it via the Flags() method, +// like a regular cobra.Command) +// - flags type is *pflag.FlagSet which is also full of unexported fields. +type gobCommandContextFlags struct { + CommandContext gobCommandContext + Flags []Flag +} + +// gobCommandContext is the same as ExecutedCommand but without GobDecode +// attached, which avoids infinite loops. +type gobCommandContext ExecutedCommand + +// GobEncode implements gob.Encoder. +// It actually encodes a gobCommandContext struct built from c. +func (c ExecutedCommand) GobEncode() ([]byte, error) { + var b bytes.Buffer + err := gob.NewEncoder(&b).Encode(gobCommandContextFlags{ + CommandContext: gobCommandContext(c), + Flags: convertPFlags(&c), + }) + return b.Bytes(), err +} + +// flagger matches both cobra.Command and Command. +type flagger interface { + Flags() *pflag.FlagSet + PersistentFlags() *pflag.FlagSet +} + +func convertPFlags(fgr flagger) []Flag { + var ff []Flag + if fgr.Flags() != nil { + fgr.Flags().VisitAll(func(pf *pflag.Flag) { + ff = append(ff, Flag{ + Name: pf.Name, + Shorthand: pf.Shorthand, + Usage: pf.Usage, + DefValue: pf.DefValue, + Value: pf.Value.String(), + Type: FlagType(pf.Value.Type()), + }) + }) + } + if fgr.PersistentFlags() != nil { + fgr.PersistentFlags().VisitAll(func(pf *pflag.Flag) { + ff = append(ff, Flag{ + Name: pf.Name, + Shorthand: pf.Shorthand, + Usage: pf.Usage, + DefValue: pf.DefValue, + Value: pf.Value.String(), + Type: FlagType(pf.Value.Type()), + Persistent: true, + }) + }) + } + return ff +} + +// GobDecode implements gob.Decoder. +// It actually decodes a gobCommandContext struct and fills c with it. +func (c *ExecutedCommand) GobDecode(bz []byte) error { + var gb gobCommandContextFlags + err := gob.NewDecoder(bytes.NewReader(bz)).Decode(&gb) + if err != nil { + return err + } + *c = ExecutedCommand(gb.CommandContext) + for _, f := range gb.Flags { + err := f.feedFlagSet(c) + if err != nil { + return err + } + } + return nil +} + +// handshakeConfigs are used to just do a basic handshake between +// a plugin and host. If the handshake fails, a user friendly error is shown. +// This prevents users from executing bad plugins or executing a plugin +// directory. It is a UX feature, not a security feature. +var handshakeConfig = plugin.HandshakeConfig{ + ProtocolVersion: 1, + MagicCookieKey: "BASIC_PLUGIN", + MagicCookieValue: "hello", +} + +func HandshakeConfig() plugin.HandshakeConfig { + return handshakeConfig +} + +// InterfaceRPC is an implementation that talks over RPC. +type InterfaceRPC struct{ client *rpc.Client } + +// Manifest implements Interface.Manifest. +func (g *InterfaceRPC) Manifest() (Manifest, error) { + var resp Manifest + return resp, g.client.Call("Plugin.Manifest", new(interface{}), &resp) +} + +// Execute implements Interface.Commands. +func (g *InterfaceRPC) Execute(c ExecutedCommand) error { + var resp interface{} + return g.client.Call("Plugin.Execute", map[string]interface{}{ + "executedCommand": c, + }, &resp) +} + +func (g *InterfaceRPC) ExecuteHookPre(hook ExecutedHook) error { + var resp interface{} + return g.client.Call("Plugin.ExecuteHookPre", map[string]interface{}{ + "executedHook": hook, + }, &resp) +} + +func (g *InterfaceRPC) ExecuteHookPost(hook ExecutedHook) error { + var resp interface{} + return g.client.Call("Plugin.ExecuteHookPost", map[string]interface{}{ + "executedHook": hook, + }, &resp) +} + +func (g *InterfaceRPC) ExecuteHookCleanUp(hook ExecutedHook) error { + var resp interface{} + return g.client.Call("Plugin.ExecuteHookCleanUp", map[string]interface{}{ + "executedHook": hook, + }, &resp) +} + +// InterfaceRPCServer is the RPC server that InterfaceRPC talks to, conforming to +// the requirements of net/rpc. +type InterfaceRPCServer struct { + // This is the real implementation + Impl Interface +} + +func (s *InterfaceRPCServer) Manifest(_ interface{}, resp *Manifest) error { + var err error + *resp, err = s.Impl.Manifest() + return err +} + +func (s *InterfaceRPCServer) Execute(args map[string]interface{}, _ *interface{}) error { + return s.Impl.Execute(args["executedCommand"].(ExecutedCommand)) +} + +func (s *InterfaceRPCServer) ExecuteHookPre(args map[string]interface{}, _ *interface{}) error { + return s.Impl.ExecuteHookPre(args["executedHook"].(ExecutedHook)) +} + +func (s *InterfaceRPCServer) ExecuteHookPost(args map[string]interface{}, _ *interface{}) error { + return s.Impl.ExecuteHookPost(args["executedHook"].(ExecutedHook)) +} + +func (s *InterfaceRPCServer) ExecuteHookCleanUp(args map[string]interface{}, _ *interface{}) error { + return s.Impl.ExecuteHookCleanUp(args["executedHook"].(ExecutedHook)) +} + +// This is the implementation of plugin.Interface so we can serve/consume this +// +// This has two methods: Server must return an RPC server for this plugin +// type. We construct a InterfaceRPCServer for this. +// +// Client must return an implementation of our interface that communicates +// over an RPC client. We return InterfaceRPC for this. +// +// Ignore MuxBroker. That is used to create more multiplexed streams on our +// plugin connection and is a more advanced use case. +type InterfacePlugin struct { + // Impl Injection + Impl Interface +} + +func (p *InterfacePlugin) Server(*plugin.MuxBroker) (interface{}, error) { + return &InterfaceRPCServer{Impl: p.Impl}, nil +} + +func (InterfacePlugin) Client(_ *plugin.MuxBroker, c *rpc.Client) (interface{}, error) { + return &InterfaceRPC{client: c}, nil +} diff --git a/services/plugin/interface_test.go b/services/plugin/interface_test.go new file mode 100755 index 000000000..f18b290a1 --- /dev/null +++ b/services/plugin/interface_test.go @@ -0,0 +1,169 @@ +package plugin_test + +import ( + "testing" + + "github.com/spf13/cobra" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/sonr-io/core/services/plugin" +) + +func TestCommandToCobraCommand(t *testing.T) { + var ( + require = require.New(t) + assert = assert.New(t) + pcmd = plugin.Command{ + Use: "new", + Aliases: []string{"n"}, + Short: "short", + Long: "long", + Hidden: true, + Flags: []plugin.Flag{ + { + Name: "bool", + Shorthand: "b", + DefValue: "true", + Value: "true", + Usage: "a bool", + Type: plugin.FlagTypeBool, + }, + { + Name: "string", + DefValue: "hello", + Value: "hello", + Usage: "a string", + Type: plugin.FlagTypeString, + Persistent: true, + }, + }, + Commands: []plugin.Command{ + { + Use: "sub", + Aliases: []string{"s"}, + Short: "sub short", + Long: "sub long", + }, + }, + } + ) + + cmd, err := pcmd.ToCobraCommand() + + require.NoError(err) + require.NotNil(cmd) + assert.Empty(cmd.Commands()) // subcommands aren't converted + assert.Equal(pcmd.Use, cmd.Use) + assert.Equal(pcmd.Short, cmd.Short) + assert.Equal(pcmd.Long, cmd.Long) + assert.Equal(pcmd.Aliases, cmd.Aliases) + assert.Equal(pcmd.Hidden, cmd.Hidden) + for _, f := range pcmd.Flags { + if f.Persistent { + assert.NotNil(cmd.PersistentFlags().Lookup(f.Name), "missing pflag %s", f.Name) + } else { + assert.NotNil(cmd.Flags().Lookup(f.Name), "missing flag %s", f.Name) + } + } +} + +func TestManifestImportCobraCommand(t *testing.T) { + manifest := plugin.Manifest{ + Name: "hey", + Commands: []plugin.Command{ + {Use: "existing"}, + }, + } + cmd := &cobra.Command{ + Use: "new", + Aliases: []string{"n"}, + Short: "short", + Long: "long", + Hidden: true, + } + cmd.Flags().BoolP("bool", "b", true, "a bool") + cmd.Flags().String("string", "hello", "a string") + cmd.PersistentFlags().String("persistent", "hello", "a persistent string") + subcmd := &cobra.Command{ + Use: "sub", + Aliases: []string{"s"}, + Short: "sub short", + Long: "sub long", + } + subcmd.Flags().BoolP("subbool", "b", true, "a bool") + subcmd.Flags().String("substring", "hello", "a string") + subcmd.AddCommand(&cobra.Command{ + Use: "subsub", + }) + cmd.AddCommand(subcmd) + + manifest.ImportCobraCommand(cmd, "under") + + expectedManifest := plugin.Manifest{ + Name: "hey", + Commands: []plugin.Command{ + {Use: "existing"}, + { + Use: "new", + Aliases: []string{"n"}, + Short: "short", + Long: "long", + Hidden: true, + PlaceCommandUnder: "under", + Flags: []plugin.Flag{ + { + Name: "bool", + Shorthand: "b", + DefValue: "true", + Value: "true", + Usage: "a bool", + Type: plugin.FlagTypeBool, + }, + { + Name: "string", + DefValue: "hello", + Value: "hello", + Usage: "a string", + Type: plugin.FlagTypeString, + }, + { + Name: "persistent", + DefValue: "hello", + Value: "hello", + Usage: "a persistent string", + Type: plugin.FlagTypeString, + Persistent: true, + }, + }, + Commands: []plugin.Command{ + { + Use: "sub", + Aliases: []string{"s"}, + Short: "sub short", + Long: "sub long", + Flags: []plugin.Flag{ + { + Name: "subbool", + Shorthand: "b", + DefValue: "true", + Value: "true", + Usage: "a bool", + Type: plugin.FlagTypeBool, + }, + { + Name: "substring", + DefValue: "hello", + Value: "hello", + Usage: "a string", + Type: plugin.FlagTypeString, + }, + }, + Commands: []plugin.Command{{Use: "subsub"}}, + }, + }, + }, + }, + } + assert.Equal(t, expectedManifest, manifest) +} diff --git a/services/plugin/plugin.go b/services/plugin/plugin.go new file mode 100644 index 000000000..839ca96de --- /dev/null +++ b/services/plugin/plugin.go @@ -0,0 +1,396 @@ +// Package plugin implements ignite plugin management. +// An ignite plugin is a binary which communicates with the ignite binary +// via RPC thanks to the github.com/hashicorp/go-plugin library. +package plugin + +import ( + "context" + "fmt" + "io/fs" + "os" + "os/exec" + "path" + "path/filepath" + "strings" + "time" + + "github.com/hashicorp/go-hclog" + hplugin "github.com/hashicorp/go-plugin" + "github.com/pkg/errors" + + "github.com/sonr-io/core/config" + pluginsconfig "github.com/sonr-io/core/config/plugins" + "github.com/sonr-io/core/pkg/env" + "github.com/sonr-io/core/pkg/events" + "github.com/sonr-io/core/pkg/gocmd" + "github.com/sonr-io/core/pkg/xfilepath" + "github.com/sonr-io/core/pkg/xgit" + "github.com/sonr-io/core/pkg/xurl" +) + +// PluginsPath holds the plugin cache directory. +var PluginsPath = xfilepath.Mkdir(xfilepath.Join( + config.DirPath, + xfilepath.Path("plugins"), +)) + +// Plugin represents a ignite plugin. +type Plugin struct { + // Embed the plugin configuration + pluginsconfig.Plugin + // Interface allows to communicate with the plugin via net/rpc. + Interface Interface + // If any error occurred during the plugin load, it's stored here + Error error + + repoPath string + cloneURL string + cloneDir string + reference string + srcPath string + binaryName string + + client *hplugin.Client + + // holds a cache of the plugin manifest to prevent mant calls over the rpc boundary + manifest Manifest + // If a plugin's ShareHost flag is set to true, isHost is used to discern if a + // plugin instance is controlling the rpc server. + isHost bool + + ev events.Bus +} + +// Option configures Plugin. +type Option func(*Plugin) + +// CollectEvents collects events from the chain. +func CollectEvents(ev events.Bus) Option { + return func(p *Plugin) { + p.ev = ev + } +} + +// Load loads the plugins found in the chain config. +// +// There's 2 kinds of plugins, local or remote. +// Local plugins have their path starting with a `/`, while remote plugins +// don't. +// Local plugins are useful for development purpose. +// Remote plugins require to be fetched first, in $HOME/.sonr/plugins +// folder, then they are loaded from there. +// +// If an error occurs during a plugin load, it's not returned but rather stored +// in the Plugin.Error field. This prevents the loading of other plugins to be +// interrupted. +func Load(ctx context.Context, plugins []pluginsconfig.Plugin, options ...Option) ([]*Plugin, error) { + pluginsDir, err := PluginsPath() + if err != nil { + return nil, errors.WithStack(err) + } + var loaded []*Plugin + for _, cp := range plugins { + p := newPlugin(pluginsDir, cp, options...) + p.load(ctx) + + loaded = append(loaded, p) + } + return loaded, nil +} + +// Update removes the cache directory of plugins and fetch them again. +func Update(plugins ...*Plugin) error { + for _, p := range plugins { + err := p.clean() + if err != nil { + return err + } + p.fetch() + } + return nil +} + +// newPlugin creates a Plugin from configuration. +func newPlugin(pluginsDir string, cp pluginsconfig.Plugin, options ...Option) *Plugin { + var ( + p = &Plugin{ + Plugin: cp, + } + pluginPath = cp.Path + ) + if pluginPath == "" { + p.Error = errors.Errorf(`missing plugin property "path"`) + return p + } + + // Apply the options + for _, apply := range options { + apply(p) + } + + if strings.HasPrefix(pluginPath, "/") { + // This is a local plugin, check if the file exists + st, err := os.Stat(pluginPath) + if err != nil { + p.Error = errors.Wrapf(err, "local plugin path %q not found", pluginPath) + return p + } + if !st.IsDir() { + p.Error = errors.Errorf("local plugin path %q is not a dir", pluginPath) + return p + } + p.srcPath = pluginPath + p.binaryName = path.Base(pluginPath) + return p + } + // This is a remote plugin, parse the URL + if i := strings.LastIndex(pluginPath, "@"); i != -1 { + // path contains a reference + p.reference = pluginPath[i+1:] + pluginPath = pluginPath[:i] + } + parts := strings.Split(pluginPath, "/") + if len(parts) < 3 { + p.Error = errors.Errorf("plugin path %q is not a valid repository URL", pluginPath) + return p + } + p.repoPath = path.Join(parts[:3]...) + p.cloneURL, _ = xurl.HTTPS(p.repoPath) + + if len(p.reference) > 0 { + ref := strings.ReplaceAll(p.reference, "/", "-") + p.cloneDir = path.Join(pluginsDir, fmt.Sprintf("%s-%s", p.repoPath, ref)) + p.repoPath += "@" + p.reference + } else { + p.cloneDir = path.Join(pluginsDir, p.repoPath) + } + + // Plugin can have a subpath within its repository. For example, + // "github.com/ignite/plugins/plugin1" where "plugin1" is the subpath. + repoSubPath := path.Join(parts[3:]...) + + p.srcPath = path.Join(p.cloneDir, repoSubPath) + p.binaryName = path.Base(pluginPath) + + return p +} + +// KillClient kills the running plugin client. +func (p *Plugin) KillClient() { + if p.manifest.SharedHost && !p.isHost { + // Don't send kill signal to a shared-host plugin when this process isn't + // the one who initiated it. + return + } + + if p.client != nil { + p.client.Kill() + } + + if p.isHost { + deleteConfCache(p.Path) + p.isHost = false + } +} + +func (p *Plugin) binaryPath() string { + return path.Join(p.srcPath, p.binaryName) +} + +// load tries to fill p.Interface, ensuring the plugin is usable. +func (p *Plugin) load(ctx context.Context) { + if p.Error != nil { + return + } + _, err := os.Stat(p.srcPath) + if err != nil { + // srcPath found, need to fetch the plugin + p.fetch() + if p.Error != nil { + return + } + } + + if p.IsLocalPath() { + // trigger rebuild for local plugin if binary is outdated + if p.outdatedBinary() { + p.build(ctx) + } + } else { + // Check if binary is already build + _, err = os.Stat(p.binaryPath()) + if err != nil { + // binary not found, need to build it + p.build(ctx) + } + } + if p.Error != nil { + return + } + // pluginMap is the map of plugins we can dispense. + pluginMap := map[string]hplugin.Plugin{ + p.binaryName: &InterfacePlugin{}, + } + // Create an hclog.Logger + logLevel := hclog.Error + if env.DebugEnabled() { + logLevel = hclog.Trace + } + logger := hclog.New(&hclog.LoggerOptions{ + Name: fmt.Sprintf("plugin %s", p.Path), + Output: os.Stderr, + Level: logLevel, + }) + + if checkConfCache(p.Path) { + rconf, err := readConfigCache(p.Path) + if err != nil { + p.Error = err + return + } + + // We're attaching to an existing server, supply attachment configuration + p.client = hplugin.NewClient(&hplugin.ClientConfig{ + HandshakeConfig: handshakeConfig, + Plugins: pluginMap, + Logger: logger, + Reattach: &rconf, + SyncStderr: os.Stderr, + SyncStdout: os.Stdout, + }) + + } else { + // We're a host! Start by launching the plugin process. + p.client = hplugin.NewClient(&hplugin.ClientConfig{ + HandshakeConfig: handshakeConfig, + Plugins: pluginMap, + Logger: logger, + Cmd: exec.Command(p.binaryPath()), + SyncStderr: os.Stderr, + SyncStdout: os.Stdout, + }) + } + + // :Connect via RPC + rpcClient, err := p.client.Client() + if err != nil { + p.Error = errors.Wrapf(err, "connecting") + return + } + + // Request the plugin + raw, err := rpcClient.Dispense(p.binaryName) + if err != nil { + p.Error = errors.Wrapf(err, "dispensing") + return + } + + // We should have an Interface now! This feels like a normal interface + // implementation but is in fact over an RPC connection. + p.Interface = raw.(Interface) + + m, err := p.Interface.Manifest() + if err != nil { + p.Error = errors.Wrapf(err, "manifest load") + } + + p.manifest = m + + // write the rpc context to cache if the plugin is declared as host. + // writing it to cache as lost operation within load to assure rpc client's reattach config + // is hydrated. + if m.SharedHost && !checkConfCache(p.Path) { + err := writeConfigCache(p.Path, *p.client.ReattachConfig()) + if err != nil { + p.Error = err + return + } + + // set the plugin's rpc server as host so other plugin clients may share + p.isHost = true + } +} + +// fetch clones the plugin repository at the expected reference. +func (p *Plugin) fetch() { + if p.IsLocalPath() { + return + } + if p.Error != nil { + return + } + p.ev.Send(fmt.Sprintf("Fetching plugin %q", p.cloneURL), events.ProgressStart()) + defer p.ev.Send(fmt.Sprintf("Plugin fetched %q", p.cloneURL), events.ProgressFinish()) + + urlref := strings.Join([]string{p.cloneURL, p.reference}, "@") + err := xgit.Clone(context.Background(), urlref, p.cloneDir) + if err != nil { + p.Error = errors.Wrapf(err, "cloning %q", p.repoPath) + } +} + +// build compiles the plugin binary. +func (p *Plugin) build(ctx context.Context) { + if p.Error != nil { + return + } + p.ev.Send(fmt.Sprintf("Building plugin %q", p.Path), events.ProgressStart()) + defer p.ev.Send(fmt.Sprintf("Plugin built %q", p.Path), events.ProgressFinish()) + + if err := gocmd.ModTidy(ctx, p.srcPath); err != nil { + p.Error = errors.Wrapf(err, "go mod tidy") + return + } + if err := gocmd.Build(ctx, p.binaryName, p.srcPath, nil); err != nil { + p.Error = errors.Wrapf(err, "go build") + return + } +} + +// clean removes the plugin cache (only for remote plugins). +func (p *Plugin) clean() error { + if p.Error != nil { + // Dont try to clean plugins with error + return nil + } + if p.IsLocalPath() { + // Not a remote plugin, nothing to clean + return nil + } + // Clean the cloneDir, next time the ignite command will be invoked, the + // plugin will be fetched again. + err := os.RemoveAll(p.cloneDir) + return errors.WithStack(err) +} + +// outdatedBinary returns true if the plugin binary is older than the other +// files in p.srcPath. +// Also returns true if the plugin binary is absent. +func (p *Plugin) outdatedBinary() bool { + var ( + binaryTime time.Time + mostRecent time.Time + ) + err := filepath.Walk(p.srcPath, func(path string, info fs.FileInfo, err error) error { + if err != nil { + return err + } + if info.IsDir() { + return nil + } + if path == p.binaryPath() { + binaryTime = info.ModTime() + return nil + } + t := info.ModTime() + if mostRecent.IsZero() || t.After(mostRecent) { + mostRecent = t + } + return nil + }) + if err != nil { + fmt.Printf("error while walking plugin source path %q\n", p.srcPath) + return false + } + return mostRecent.After(binaryTime) +} diff --git a/services/plugin/plugin_test.go b/services/plugin/plugin_test.go new file mode 100644 index 000000000..62cb96430 --- /dev/null +++ b/services/plugin/plugin_test.go @@ -0,0 +1,519 @@ +package plugin + +import ( + "context" + "fmt" + "os" + "path" + "path/filepath" + "testing" + "time" + + "github.com/go-git/go-git/v5" + "github.com/go-git/go-git/v5/plumbing" + "github.com/go-git/go-git/v5/plumbing/object" + hplugin "github.com/hashicorp/go-plugin" + "github.com/pkg/errors" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + pluginsconfig "github.com/sonr-io/core/config/plugins" + "github.com/sonr-io/core/pkg/gocmd" + "github.com/sonr-io/core/pkg/gomodule" +) + +func TestNewPlugin(t *testing.T) { + wd, err := os.Getwd() + require.NoError(t, err) + + tests := []struct { + name string + pluginCfg pluginsconfig.Plugin + expectedPlugin Plugin + }{ + { + name: "fail: empty path", + expectedPlugin: Plugin{ + Error: errors.Errorf(`missing plugin property "path"`), + }, + }, + { + name: "fail: local plugin doesnt exists", + pluginCfg: pluginsconfig.Plugin{Path: "/xxx/yyy/plugin"}, + expectedPlugin: Plugin{ + Error: errors.Errorf(`local plugin path "/xxx/yyy/plugin" not found`), + }, + }, + { + name: "fail: local plugin is not a dir", + pluginCfg: pluginsconfig.Plugin{Path: path.Join(wd, "testdata/fakebin")}, + expectedPlugin: Plugin{ + Error: errors.Errorf(fmt.Sprintf("local plugin path %q is not a dir", path.Join(wd, "testdata/fakebin"))), + }, + }, + { + name: "ok: local plugin", + pluginCfg: pluginsconfig.Plugin{Path: path.Join(wd, "testdata")}, + expectedPlugin: Plugin{ + srcPath: path.Join(wd, "testdata"), + binaryName: "testdata", + }, + }, + { + name: "fail: remote plugin with only domain", + pluginCfg: pluginsconfig.Plugin{Path: "github.com"}, + expectedPlugin: Plugin{ + Error: errors.Errorf(`plugin path "github.com" is not a valid repository URL`), + }, + }, + { + name: "fail: remote plugin with incomplete URL", + pluginCfg: pluginsconfig.Plugin{Path: "github.com/ignite"}, + expectedPlugin: Plugin{ + Error: errors.Errorf(`plugin path "github.com/ignite" is not a valid repository URL`), + }, + }, + { + name: "ok: remote plugin", + pluginCfg: pluginsconfig.Plugin{Path: "github.com/ignite/plugin"}, + expectedPlugin: Plugin{ + repoPath: "github.com/ignite/plugin", + cloneURL: "https://github.com/ignite/plugin", + cloneDir: ".sonr/plugins/github.com/ignite/plugin", + reference: "", + srcPath: ".sonr/plugins/github.com/ignite/plugin", + binaryName: "plugin", + }, + }, + { + name: "ok: remote plugin with @ref", + pluginCfg: pluginsconfig.Plugin{Path: "github.com/ignite/plugin@develop"}, + expectedPlugin: Plugin{ + repoPath: "github.com/ignite/plugin@develop", + cloneURL: "https://github.com/ignite/plugin", + cloneDir: ".sonr/plugins/github.com/ignite/plugin-develop", + reference: "develop", + srcPath: ".sonr/plugins/github.com/ignite/plugin-develop", + binaryName: "plugin", + }, + }, + { + name: "ok: remote plugin with @ref containing slash", + pluginCfg: pluginsconfig.Plugin{Path: "github.com/ignite/plugin@package/v1.0.0"}, + expectedPlugin: Plugin{ + repoPath: "github.com/ignite/plugin@package/v1.0.0", + cloneURL: "https://github.com/ignite/plugin", + cloneDir: ".sonr/plugins/github.com/ignite/plugin-package-v1.0.0", + reference: "package/v1.0.0", + srcPath: ".sonr/plugins/github.com/ignite/plugin-package-v1.0.0", + binaryName: "plugin", + }, + }, + { + name: "ok: remote plugin with subpath", + pluginCfg: pluginsconfig.Plugin{Path: "github.com/ignite/plugin/plugin1"}, + expectedPlugin: Plugin{ + repoPath: "github.com/ignite/plugin", + cloneURL: "https://github.com/ignite/plugin", + cloneDir: ".sonr/plugins/github.com/ignite/plugin", + reference: "", + srcPath: ".sonr/plugins/github.com/ignite/plugin/plugin1", + binaryName: "plugin1", + }, + }, + { + name: "ok: remote plugin with subpath and @ref", + pluginCfg: pluginsconfig.Plugin{Path: "github.com/ignite/plugin/plugin1@develop"}, + expectedPlugin: Plugin{ + repoPath: "github.com/ignite/plugin@develop", + cloneURL: "https://github.com/ignite/plugin", + cloneDir: ".sonr/plugins/github.com/ignite/plugin-develop", + reference: "develop", + srcPath: ".sonr/plugins/github.com/ignite/plugin-develop/plugin1", + binaryName: "plugin1", + }, + }, + { + name: "ok: remote plugin with subpath and @ref containing slash", + pluginCfg: pluginsconfig.Plugin{Path: "github.com/ignite/plugin/plugin1@package/v1.0.0"}, + expectedPlugin: Plugin{ + repoPath: "github.com/ignite/plugin@package/v1.0.0", + cloneURL: "https://github.com/ignite/plugin", + cloneDir: ".sonr/plugins/github.com/ignite/plugin-package-v1.0.0", + reference: "package/v1.0.0", + srcPath: ".sonr/plugins/github.com/ignite/plugin-package-v1.0.0/plugin1", + binaryName: "plugin1", + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tt.expectedPlugin.Plugin = tt.pluginCfg + + p := newPlugin(".sonr/plugins", tt.pluginCfg) + + assertPlugin(t, tt.expectedPlugin, *p) + }) + } +} + +func TestPluginLoad(t *testing.T) { + wd, err := os.Getwd() + require.NoError(t, err) + + // Helper to make a local git repository with gofile committed. + // Returns the repo directory and the git.Repository + makeGitRepo := func(t *testing.T, name string) (string, *git.Repository) { + require := require.New(t) + repoDir := t.TempDir() + scaffoldPlugin(t, repoDir, "github.com/ignite/"+name, false) + require.NoError(err) + repo, err := git.PlainInit(repoDir, false) + require.NoError(err) + w, err := repo.Worktree() + require.NoError(err) + _, err = w.Add(".") + require.NoError(err) + _, err = w.Commit("msg", &git.CommitOptions{ + Author: &object.Signature{ + Name: "bob", + Email: "bob@example.com", + When: time.Now(), + }, + }) + require.NoError(err) + return repoDir, repo + } + tests := []struct { + name string + buildPlugin func(t *testing.T) Plugin + expectedError string + }{ + { + name: "fail: plugin is already in error", + buildPlugin: func(t *testing.T) Plugin { + return Plugin{ + Error: errors.New("oups"), + } + }, + expectedError: `oups`, + }, + { + name: "fail: no go files in srcPath", + buildPlugin: func(t *testing.T) Plugin { + return Plugin{ + srcPath: path.Join(wd, "testdata"), + binaryName: "testdata", + } + }, + expectedError: `no Go files in`, + }, + + { + name: "ok: from git repo", + buildPlugin: func(t *testing.T) Plugin { + repoDir, _ := makeGitRepo(t, "remote") + cloneDir := t.TempDir() + + return Plugin{ + cloneURL: repoDir, + cloneDir: cloneDir, + srcPath: path.Join(cloneDir, "remote"), + binaryName: "remote", + } + }, + }, + { + name: "fail: git repo doesnt exists", + buildPlugin: func(t *testing.T) Plugin { + cloneDir := t.TempDir() + + return Plugin{ + repoPath: "/xxxx/yyyy", + cloneURL: "/xxxx/yyyy", + cloneDir: cloneDir, + srcPath: path.Join(cloneDir, "plugin"), + } + }, + expectedError: `cloning "/xxxx/yyyy": repository not found`, + }, + { + name: "ok: from git repo with tag", + buildPlugin: func(t *testing.T) Plugin { + repoDir, repo := makeGitRepo(t, "remote-tag") + h, err := repo.Head() + require.NoError(t, err) + _, err = repo.CreateTag("v1", h.Hash(), &git.CreateTagOptions{ + Tagger: &object.Signature{Name: "me"}, + Message: "v1", + }) + require.NoError(t, err) + + cloneDir := t.TempDir() + + return Plugin{ + cloneURL: repoDir, + reference: "v1", + cloneDir: cloneDir, + srcPath: path.Join(cloneDir, "remote-tag"), + binaryName: "remote-tag", + } + }, + }, + { + name: "ok: from git repo with branch", + buildPlugin: func(t *testing.T) Plugin { + repoDir, repo := makeGitRepo(t, "remote-branch") + w, err := repo.Worktree() + require.NoError(t, err) + err = w.Checkout(&git.CheckoutOptions{ + Branch: plumbing.NewBranchReferenceName("branch1"), + Create: true, + }) + require.NoError(t, err) + + cloneDir := t.TempDir() + + return Plugin{ + cloneURL: repoDir, + reference: "branch1", + cloneDir: cloneDir, + srcPath: path.Join(cloneDir, "remote-branch"), + binaryName: "remote-branch", + } + }, + }, + { + name: "ok: from git repo with hash", + buildPlugin: func(t *testing.T) Plugin { + repoDir, repo := makeGitRepo(t, "remote-hash") + h, err := repo.Head() + require.NoError(t, err) + + cloneDir := t.TempDir() + + return Plugin{ + cloneURL: repoDir, + reference: h.Hash().String(), + cloneDir: cloneDir, + srcPath: path.Join(cloneDir, "remote-hash"), + binaryName: "remote-hash", + } + }, + }, + { + name: "fail: git ref not found", + buildPlugin: func(t *testing.T) Plugin { + repoDir, _ := makeGitRepo(t, "remote-no-ref") + + cloneDir := t.TempDir() + + return Plugin{ + cloneURL: repoDir, + reference: "doesnt_exists", + cloneDir: cloneDir, + srcPath: path.Join(cloneDir, "remote-no-ref"), + binaryName: "remote-no-ref", + } + }, + expectedError: `cloning ".*": reference not found`, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + require := require.New(t) + assert := assert.New(t) + p := tt.buildPlugin(t) + defer p.KillClient() + + p.load(context.Background()) + + if tt.expectedError != "" { + require.Error(p.Error, "expected error %q", tt.expectedError) + require.Regexp(tt.expectedError, p.Error.Error()) + return + } + + require.NoError(p.Error) + require.NotNil(p.Interface) + manifest, err := p.Interface.Manifest() + require.NoError(err) + assert.Equal(p.binaryName, manifest.Name) + assert.NoError(p.Interface.Execute(ExecutedCommand{})) + assert.NoError(p.Interface.ExecuteHookPre(ExecutedHook{})) + assert.NoError(p.Interface.ExecuteHookPost(ExecutedHook{})) + assert.NoError(p.Interface.ExecuteHookCleanUp(ExecutedHook{})) + }) + } +} + +func TestPluginLoadSharedHost(t *testing.T) { + tests := []struct { + name string + instances int + sharesHost bool + }{ + { + name: "ok: from local sharedhost is on 1 instance", + instances: 1, + sharesHost: true, + }, + { + name: "ok: from local sharedhost is on 2 instances", + instances: 2, + sharesHost: true, + }, + { + name: "ok: from local sharedhost is on 4 instances", + instances: 4, + sharesHost: true, + }, + { + name: "ok: from local sharedhost is off 4 instances", + instances: 4, + sharesHost: false, + }, + } + + for i, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + var ( + require = require.New(t) + assert = assert.New(t) + // scaffold an unique plugin for all instances + path = scaffoldPlugin(t, t.TempDir(), + fmt.Sprintf("github.com/foo/bar-%d", i), tt.sharesHost) + plugins []*Plugin + ) + // Load one plugin per instance + for i := 0; i < tt.instances; i++ { + p := Plugin{ + Plugin: pluginsconfig.Plugin{Path: path}, + srcPath: path, + binaryName: filepath.Base(path), + } + p.load(context.Background()) + require.NoError(p.Error) + plugins = append(plugins, &p) + } + // Ensure all plugins are killed at the end of test case + defer func() { + for i := len(plugins) - 1; i >= 0; i-- { + plugins[i].KillClient() + if tt.sharesHost && i > 0 { + assert.False(plugins[i].client.Exited(), "non host plugin can't kill host plugin") + assert.True(checkConfCache(plugins[i].Path), "non host plugin doesn't remove config cache when killed") + } else { + assert.True(plugins[i].client.Exited(), "plugin should be killed") + } + assert.False(plugins[i].isHost, "killed plugins are no longer host") + } + assert.False(checkConfCache(plugins[0].Path), "once host is killed the cache should be cleared") + }() + + var hostConf *hplugin.ReattachConfig + for i := 0; i < len(plugins); i++ { + if tt.sharesHost { + assert.True(checkConfCache(plugins[i].Path), "sharedHost must have a cache entry") + if i == 0 { + // first plugin is the host + assert.True(plugins[i].isHost, "first plugin is the host") + // Assert reattach config has been saved + hostConf = plugins[i].client.ReattachConfig() + ref, err := readConfigCache(plugins[i].Path) + if assert.NoError(err) { + assert.Equal(hostConf, &ref, "wrong cache entry for plugin host") + } + } else { + // plugins after first aren't host + assert.False(plugins[i].isHost, "plugin %d can't be host", i) + assert.Equal(hostConf, plugins[i].client.ReattachConfig(), "ReattachConfig different from host plugin") + } + } else { + assert.False(plugins[i].isHost, "plugin %d can't be host if sharedHost is disabled", i) + assert.False(checkConfCache(plugins[i].Path), "plugin %d can't have a cache entry if sharedHost is disabled", i) + } + } + }) + } +} + +func TestPluginClean(t *testing.T) { + tests := []struct { + name string + plugin *Plugin + expectRemove bool + }{ + { + name: "dont clean local plugin", + plugin: &Plugin{ + Plugin: pluginsconfig.Plugin{Path: "/local"}, + }, + }, + { + name: "dont clean plugin with errors", + plugin: &Plugin{Error: errors.New("oups")}, + }, + { + name: "ok", + plugin: &Plugin{ + cloneURL: "https://github.com/ignite/plugin", + }, + expectRemove: true, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + tmp, err := os.MkdirTemp("", "cloneDir") + require.NoError(t, err) + tt.plugin.cloneDir = tmp + + err = tt.plugin.clean() + + require.NoError(t, err) + if tt.expectRemove { + _, err := os.Stat(tmp) + assert.True(t, os.IsNotExist(err), "cloneDir not removed") + } + }) + } +} + + +// scaffoldPlugin runs Scaffold and updates the go.mod so it uses the +// current ignite/cli sources. +func scaffoldPlugin(t *testing.T, dir, name string, sharedHost bool) string { + require := require.New(t) + path, err := Scaffold(dir, name, sharedHost) + require.NoError(err) + // We want the scaffolded plugin to use the current version of ignite/cli, + // for that we need to update the plugin go.mod and add a replace to target + // current ignite/cli + gomod, err := gomodule.ParseAt(path) + require.NoError(err) + // use GOMOD env to get current directory module path + modpath, err := gocmd.Env(gocmd.EnvGOMOD) + require.NoError(err) + modpath = filepath.Dir(modpath) + gomod.AddReplace("github.com/ignite/cli", "", modpath, "") + // Save go.mod + data, err := gomod.Format() + require.NoError(err) + err = os.WriteFile(filepath.Join(path, "go.mod"), data, 0o644) + require.NoError(err) + return path +} + +func assertPlugin(t *testing.T, want, have Plugin) { + t.Helper() + if want.Error != nil { + require.Error(t, have.Error) + assert.Regexp(t, want.Error.Error(), have.Error.Error()) + } else { + require.NoError(t, have.Error) + } + // Errors aren't comparable with assert.Equal, because of the different stacks + want.Error = nil + have.Error = nil + assert.Equal(t, want, have) +} diff --git a/services/plugin/scaffold.go b/services/plugin/scaffold.go new file mode 100644 index 000000000..1ff9c5cfb --- /dev/null +++ b/services/plugin/scaffold.go @@ -0,0 +1,58 @@ +package plugin + +import ( + "context" + "embed" + "os" + "path" + "path/filepath" + + "github.com/gobuffalo/genny/v2" + "github.com/gobuffalo/plush/v4" + "github.com/pkg/errors" + + "github.com/sonr-io/core/pkg/gocmd" + "github.com/sonr-io/core/pkg/xgenny" +) + +//go:embed template/* +var fsPluginSource embed.FS + +// Scaffold generates a plugin structure under dir/path.Base(moduleName). +func Scaffold(dir, moduleName string, sharedHost bool) (string, error) { + var ( + name = filepath.Base(moduleName) + finalDir = path.Join(dir, name) + g = genny.New() + template = xgenny.NewEmbedWalker( + fsPluginSource, + "template", + finalDir, + ) + ) + if _, err := os.Stat(finalDir); err == nil { + // finalDir already exists, don't overwrite stuff + return "", errors.Errorf("dir %q already exists, abort scaffolding", finalDir) + } + if err := g.Box(template); err != nil { + return "", errors.WithStack(err) + } + ctx := plush.NewContext() + ctx.Set("ModuleName", moduleName) + ctx.Set("Name", name) + ctx.Set("SharedHost", sharedHost) + + g.Transformer(xgenny.Transformer(ctx)) + r := genny.WetRunner(ctx) + err := r.With(g) + if err != nil { + return "", errors.WithStack(err) + } + if err := r.Run(); err != nil { + return "", errors.WithStack(err) + } + if err := gocmd.ModTidy(context.TODO(), finalDir); err != nil { + return "", errors.WithStack(err) + } + return finalDir, nil +} diff --git a/services/plugin/scaffold_test.go b/services/plugin/scaffold_test.go new file mode 100755 index 000000000..8d7f122df --- /dev/null +++ b/services/plugin/scaffold_test.go @@ -0,0 +1,16 @@ +package plugin + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestScaffold(t *testing.T) { + tmp := t.TempDir() + + path, err := Scaffold(tmp, "github.com/foo/bar", false) + + require.NoError(t, err) + require.DirExists(t, path) +} diff --git a/services/plugin/template/.gitignore.plush b/services/plugin/template/.gitignore.plush new file mode 100755 index 000000000..3c921bddc --- /dev/null +++ b/services/plugin/template/.gitignore.plush @@ -0,0 +1 @@ +<%= Name %> diff --git a/services/plugin/template/go.mod.plush b/services/plugin/template/go.mod.plush new file mode 100755 index 000000000..fe8fffd05 --- /dev/null +++ b/services/plugin/template/go.mod.plush @@ -0,0 +1,8 @@ +module <%= ModuleName %> + +go 1.21 + +require ( + github.com/hashicorp/go-plugin v1.4.9 + github.com/ignite/cli v0.26.2-0.20230504112712-4324e2ff958f +) \ No newline at end of file diff --git a/services/plugin/template/main.go.plush b/services/plugin/template/main.go.plush new file mode 100755 index 000000000..dbdbcd3e6 --- /dev/null +++ b/services/plugin/template/main.go.plush @@ -0,0 +1,117 @@ +package main + +import ( + "encoding/gob" + "fmt" + "path/filepath" + + hplugin "github.com/hashicorp/go-plugin" + + "github.com/ignite/cli/ignite/services/chain" + "github.com/ignite/cli/ignite/services/plugin" +) + +func init() { + gob.Register(plugin.Manifest{}) + gob.Register(plugin.ExecutedCommand{}) + gob.Register(plugin.ExecutedHook{}) +} + +type p struct{} + +func (p) Manifest() (plugin.Manifest, error) { + return plugin.Manifest{ + Name: "<%= Name %>", + // Add commands here + Commands: []plugin.Command{ + // Example of a command + { + Use: "<%= Name %>", + Short: "Explain what the command is doing...", + Long: "Long description goes here...", + Flags: []plugin.Flag{ + {Name: "my-flag", Type: plugin.FlagTypeString, Usage: "my flag description"}, + }, + PlaceCommandUnder: "ignite", + // Examples of adding subcommands: + /* + Commands: []plugin.Command{ + {Use: "add"}, + {Use: "list"}, + {Use: "delete"}, + }, + */ + }, + }, + // Add hooks here + Hooks: []plugin.Hook{}, + SharedHost: <%= SharedHost %>, + }, nil +} + +func (p) Execute(cmd plugin.ExecutedCommand) error { + // TODO: write command execution here + fmt.Printf("Hello I'm the <%= Name %> plugin\n") + fmt.Printf("My executed command: %q\n", cmd.Path) + fmt.Printf("My args: %v\n", cmd.Args) + myFlag, _ := cmd.Flags().GetString("my-flag") + fmt.Printf("My flags: my-flag=%q\n", myFlag) + fmt.Printf("My config parameters: %v\n", cmd.With) + + // This is how the plugin can access the chain: + // c, err := getChain(cmd) + + // According to the number of declared commands, you may need a switch: + /* + switch cmd.Use { + case "add": + fmt.Println("Adding stuff...") + case "list": + fmt.Println("Listing stuff...") + case "delete": + fmt.Println("Deleting stuff...") + } + */ + return nil +} + +func (p) ExecuteHookPre(hook plugin.ExecutedHook) error { + fmt.Printf("Executing hook pre %q\n", hook.Name) + return nil +} + +func (p) ExecuteHookPost(hook plugin.ExecutedHook) error { + fmt.Printf("Executing hook post %q\n", hook.Name) + return nil +} + +func (p) ExecuteHookCleanUp(hook plugin.ExecutedHook) error { + fmt.Printf("Executing hook cleanup %q\n", hook.Name) + return nil +} + +func getChain(cmd plugin.ExecutedCommand, chainOption ...chain.Option) (*chain.Chain, error) { + var ( + home, _ = cmd.Flags().GetString("home") + path, _ = cmd.Flags().GetString("path") + ) + if home != "" { + chainOption = append(chainOption, chain.HomePath(home)) + } + absPath, err := filepath.Abs(path) + if err != nil { + return nil, err + } + return chain.New(absPath, chainOption...) +} + +func main() { + pluginMap := map[string]hplugin.Plugin{ + "<%= Name %>": &plugin.InterfacePlugin{Impl: &p{}}, + } + + hplugin.Serve(&hplugin.ServeConfig{ + HandshakeConfig: plugin.HandshakeConfig(), + Plugins: pluginMap, + }) +} diff --git a/services/plugin/testdata/fakebin b/services/plugin/testdata/fakebin new file mode 100755 index 000000000..e69de29bb diff --git a/types/crypto/coin.pb.go b/types/crypto/coin.pb.go index 825268e77..cda3d32cb 100644 --- a/types/crypto/coin.pb.go +++ b/types/crypto/coin.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: core/crypto/coin.proto +// source: common/crypto/coin.proto package crypto @@ -83,7 +83,7 @@ func (x CoinType) String() string { } func (CoinType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_13d3edf1068b796d, []int{0} + return fileDescriptor_0aeeac340f2c4abc, []int{0} } type AccountData struct { @@ -96,7 +96,7 @@ func (m *AccountData) Reset() { *m = AccountData{} } func (m *AccountData) String() string { return proto.CompactTextString(m) } func (*AccountData) ProtoMessage() {} func (*AccountData) Descriptor() ([]byte, []int) { - return fileDescriptor_13d3edf1068b796d, []int{0} + return fileDescriptor_0aeeac340f2c4abc, []int{0} } func (m *AccountData) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -147,34 +147,34 @@ func (m *AccountData) GetPublicKey() []byte { } func init() { - proto.RegisterEnum("core.crypto.CoinType", CoinType_name, CoinType_value) - proto.RegisterType((*AccountData)(nil), "core.crypto.AccountData") + proto.RegisterEnum("common.crypto.CoinType", CoinType_name, CoinType_value) + proto.RegisterType((*AccountData)(nil), "common.crypto.AccountData") } -func init() { proto.RegisterFile("core/crypto/coin.proto", fileDescriptor_13d3edf1068b796d) } +func init() { proto.RegisterFile("common/crypto/coin.proto", fileDescriptor_0aeeac340f2c4abc) } -var fileDescriptor_13d3edf1068b796d = []byte{ +var fileDescriptor_0aeeac340f2c4abc = []byte{ // 323 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0xd1, 0xcb, 0x4a, 0xf3, 0x40, - 0x1c, 0x05, 0xf0, 0x4c, 0xdb, 0xaf, 0x97, 0x7f, 0xfb, 0xe1, 0x74, 0xbc, 0x90, 0x85, 0x84, 0x22, - 0x2e, 0x8a, 0x60, 0xb3, 0x70, 0x2f, 0xf4, 0x32, 0xda, 0x60, 0x9b, 0x48, 0x32, 0x82, 0xba, 0x91, - 0x74, 0x1a, 0x6a, 0xa0, 0x66, 0x42, 0x92, 0x2e, 0xf2, 0x16, 0x3e, 0x96, 0xcb, 0x2e, 0x5d, 0x4a, - 0xf3, 0x00, 0xbe, 0x82, 0x34, 0xb5, 0x91, 0xd9, 0xfd, 0xe7, 0xc7, 0x39, 0xcc, 0xe2, 0xc0, 0x09, - 0x17, 0x91, 0xa7, 0xf3, 0x28, 0x0d, 0x13, 0xa1, 0x73, 0xe1, 0x07, 0xbd, 0x30, 0x12, 0x89, 0x20, - 0xcd, 0xad, 0xf7, 0x76, 0x7e, 0xf6, 0x04, 0xcd, 0x3e, 0xe7, 0x62, 0x15, 0x24, 0x23, 0x37, 0x71, + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x91, 0xcb, 0x4a, 0xc3, 0x40, + 0x18, 0x85, 0x33, 0x6d, 0xed, 0xe5, 0xb7, 0xc5, 0xe9, 0xa8, 0x90, 0x85, 0x84, 0x22, 0x2e, 0x8a, + 0x60, 0xb3, 0x70, 0x2f, 0xf4, 0x32, 0xda, 0x60, 0x9b, 0x48, 0x32, 0x82, 0xba, 0x91, 0x74, 0x1a, + 0x6a, 0xa0, 0xcd, 0x84, 0x24, 0x5d, 0xe4, 0x2d, 0x7c, 0x2c, 0x97, 0x5d, 0xba, 0x94, 0xf6, 0x01, + 0x7c, 0x05, 0x31, 0xb1, 0x91, 0xd9, 0xfd, 0xf3, 0x9d, 0xef, 0x30, 0x8b, 0x03, 0x2a, 0x17, 0xab, + 0x95, 0x08, 0x74, 0x1e, 0xa5, 0x61, 0x22, 0x74, 0x2e, 0xfc, 0xa0, 0x17, 0x46, 0x22, 0x11, 0xa4, + 0x95, 0x27, 0xbd, 0x3c, 0x39, 0x7f, 0x86, 0xc3, 0x3e, 0xe7, 0x62, 0x1d, 0x24, 0x23, 0x37, 0x71, 0x89, 0x0a, 0x35, 0x77, 0x3e, 0x8f, 0xbc, 0x38, 0x56, 0x51, 0x07, 0x75, 0x1b, 0xf6, 0xfe, 0x49, - 0x08, 0x54, 0xdc, 0xe5, 0x42, 0xa8, 0xa5, 0x9c, 0xf3, 0x9b, 0x9c, 0x42, 0x23, 0x5c, 0xcd, 0x96, - 0x3e, 0xbf, 0xf3, 0x52, 0xb5, 0xdc, 0x41, 0xdd, 0x96, 0xfd, 0x07, 0x17, 0xdf, 0x08, 0xea, 0x43, - 0xe1, 0x07, 0x2c, 0x0d, 0x3d, 0x72, 0x04, 0x78, 0x7f, 0xbf, 0x0c, 0x0c, 0x36, 0xb4, 0x0c, 0x13, - 0x2b, 0x92, 0x32, 0xea, 0x30, 0x93, 0x32, 0x8c, 0xc8, 0x31, 0xb4, 0x0b, 0x9d, 0x18, 0x8c, 0xe6, - 0xe1, 0x12, 0x69, 0xc3, 0xff, 0x82, 0x47, 0xd6, 0x2d, 0xc5, 0x65, 0x29, 0x49, 0xd9, 0x98, 0xda, - 0xf4, 0x61, 0x8a, 0x2b, 0x52, 0xd2, 0xb1, 0x4c, 0x1b, 0xff, 0x23, 0x87, 0x70, 0x50, 0xd0, 0xd0, - 0x72, 0xa6, 0x96, 0x83, 0xab, 0x52, 0xfd, 0xc6, 0x98, 0xec, 0x3e, 0xaa, 0x11, 0x0c, 0xad, 0x82, - 0xc7, 0xa6, 0x83, 0xeb, 0x52, 0xdb, 0xb1, 0x26, 0x7d, 0xb3, 0x8f, 0x1b, 0x52, 0xec, 0xd1, 0xbe, - 0xc7, 0x30, 0xb8, 0xfe, 0xd8, 0x68, 0x68, 0xbd, 0xd1, 0xd0, 0xd7, 0x46, 0x43, 0xef, 0x99, 0xa6, - 0xac, 0x33, 0x4d, 0xf9, 0xcc, 0x34, 0xe5, 0xf9, 0x7c, 0xe1, 0x27, 0xaf, 0xab, 0x59, 0x8f, 0x8b, - 0x37, 0x3d, 0x16, 0x41, 0x74, 0xe9, 0x6f, 0x27, 0x89, 0x3c, 0x3d, 0x49, 0x43, 0x2f, 0xfe, 0x1d, - 0x69, 0x56, 0xcd, 0x07, 0xba, 0xfa, 0x09, 0x00, 0x00, 0xff, 0xff, 0x78, 0x29, 0x1a, 0x89, 0xba, + 0x08, 0x54, 0xdc, 0xe5, 0x42, 0xa8, 0xa5, 0x0c, 0x67, 0x37, 0x39, 0x83, 0x46, 0xb8, 0x9e, 0x2d, + 0x7d, 0x7e, 0xef, 0xa5, 0x6a, 0xb9, 0x83, 0xba, 0x4d, 0xfb, 0x1f, 0x5c, 0x7e, 0x23, 0xa8, 0x0f, + 0x85, 0x1f, 0xb0, 0x34, 0xf4, 0xc8, 0x09, 0xe0, 0xfd, 0xfd, 0x3a, 0x30, 0xd8, 0xd0, 0x32, 0x4c, + 0xac, 0x48, 0x94, 0x51, 0x87, 0x99, 0x94, 0x61, 0x44, 0x4e, 0xa1, 0x5d, 0xd0, 0x89, 0xc1, 0x68, + 0x26, 0x97, 0x48, 0x1b, 0x5a, 0x05, 0x1e, 0x59, 0x77, 0x14, 0x97, 0x25, 0x93, 0xb2, 0x31, 0xb5, + 0xe9, 0xe3, 0x14, 0x57, 0x24, 0xd3, 0xb1, 0x4c, 0x1b, 0x1f, 0x90, 0x63, 0x38, 0x2a, 0xd0, 0xd0, + 0x72, 0xa6, 0x96, 0x83, 0xab, 0x52, 0xfd, 0xd6, 0x98, 0xe4, 0x1f, 0xd5, 0x08, 0x86, 0x66, 0x81, + 0xc7, 0xa6, 0x83, 0xeb, 0x52, 0xdb, 0xb1, 0x26, 0x7d, 0xb3, 0x8f, 0x1b, 0x92, 0xf6, 0x64, 0x3f, + 0x60, 0x18, 0xdc, 0x7c, 0x6c, 0x35, 0xb4, 0xd9, 0x6a, 0xe8, 0x6b, 0xab, 0xa1, 0xf7, 0x9d, 0xa6, + 0x6c, 0x76, 0x9a, 0xf2, 0xb9, 0xd3, 0x94, 0x97, 0x8b, 0x85, 0x9f, 0xbc, 0xad, 0x67, 0x3d, 0x2e, + 0x56, 0x7a, 0x2c, 0x82, 0xe8, 0xca, 0xff, 0x1d, 0x25, 0xf2, 0xf4, 0x24, 0x0d, 0xbd, 0xf8, 0x6f, + 0xa6, 0x59, 0x35, 0x9b, 0xe8, 0xfa, 0x27, 0x00, 0x00, 0xff, 0xff, 0xb5, 0x44, 0xab, 0xa6, 0xbe, 0x01, 0x00, 0x00, } diff --git a/types/crypto/ssi.pb.go b/types/crypto/ssi.pb.go index b58a886af..a9fba1e07 100644 --- a/types/crypto/ssi.pb.go +++ b/types/crypto/ssi.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: core/crypto/ssi.proto +// source: common/crypto/ssi.proto package crypto @@ -69,7 +69,7 @@ func (x KeyType) String() string { } func (KeyType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_6e1e1ddaeb1c143c, []int{0} + return fileDescriptor_b4d65a10f7585d94, []int{0} } // ProofType is the type of proof used to present claims over a DID document. @@ -113,7 +113,7 @@ func (x ProofType) String() string { } func (ProofType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_6e1e1ddaeb1c143c, []int{1} + return fileDescriptor_b4d65a10f7585d94, []int{1} } // Proof represents a credential/presentation proof as defined by the Linked @@ -122,7 +122,7 @@ type Proof struct { // Type defines the specific proof type used. For example, an // Ed25519Signature2018 type indicates that the proof includes a digital // signature produced by an ed25519 cryptographic key. - Type ProofType `protobuf:"varint,1,opt,name=type,proto3,enum=core.crypto.ProofType" json:"type,omitempty"` + Type ProofType `protobuf:"varint,1,opt,name=type,proto3,enum=common.crypto.ProofType" json:"type,omitempty"` // ProofPurpose defines the intent for the proof, the reason why an entity // created it. Acts as a safeguard to prevent the proof from being misused for // a purpose other than the one it was intended for. @@ -140,7 +140,7 @@ func (m *Proof) Reset() { *m = Proof{} } func (m *Proof) String() string { return proto.CompactTextString(m) } func (*Proof) ProtoMessage() {} func (*Proof) Descriptor() ([]byte, []int) { - return fileDescriptor_6e1e1ddaeb1c143c, []int{0} + return fileDescriptor_b4d65a10f7585d94, []int{0} } func (m *Proof) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +215,7 @@ func (m *JSONWebSignature2020Proof) Reset() { *m = JSONWebSignature2020P func (m *JSONWebSignature2020Proof) String() string { return proto.CompactTextString(m) } func (*JSONWebSignature2020Proof) ProtoMessage() {} func (*JSONWebSignature2020Proof) Descriptor() ([]byte, []int) { - return fileDescriptor_6e1e1ddaeb1c143c, []int{1} + return fileDescriptor_b4d65a10f7585d94, []int{1} } func (m *JSONWebSignature2020Proof) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -284,7 +284,7 @@ func (m *VerifiableCredential) Reset() { *m = VerifiableCredential{} } func (m *VerifiableCredential) String() string { return proto.CompactTextString(m) } func (*VerifiableCredential) ProtoMessage() {} func (*VerifiableCredential) Descriptor() ([]byte, []int) { - return fileDescriptor_6e1e1ddaeb1c143c, []int{2} + return fileDescriptor_b4d65a10f7585d94, []int{2} } func (m *VerifiableCredential) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -370,63 +370,63 @@ func (m *VerifiableCredential) GetProof() map[string]string { } func init() { - proto.RegisterEnum("core.crypto.KeyType", KeyType_name, KeyType_value) - proto.RegisterEnum("core.crypto.ProofType", ProofType_name, ProofType_value) - proto.RegisterType((*Proof)(nil), "core.crypto.Proof") - proto.RegisterType((*JSONWebSignature2020Proof)(nil), "core.crypto.JSONWebSignature2020Proof") - proto.RegisterType((*VerifiableCredential)(nil), "core.crypto.VerifiableCredential") - proto.RegisterMapType((map[string]string)(nil), "core.crypto.VerifiableCredential.CredentialSubjectEntry") - proto.RegisterMapType((map[string]string)(nil), "core.crypto.VerifiableCredential.ProofEntry") + proto.RegisterEnum("common.crypto.KeyType", KeyType_name, KeyType_value) + proto.RegisterEnum("common.crypto.ProofType", ProofType_name, ProofType_value) + proto.RegisterType((*Proof)(nil), "common.crypto.Proof") + proto.RegisterType((*JSONWebSignature2020Proof)(nil), "common.crypto.JSONWebSignature2020Proof") + proto.RegisterType((*VerifiableCredential)(nil), "common.crypto.VerifiableCredential") + proto.RegisterMapType((map[string]string)(nil), "common.crypto.VerifiableCredential.CredentialSubjectEntry") + proto.RegisterMapType((map[string]string)(nil), "common.crypto.VerifiableCredential.ProofEntry") } -func init() { proto.RegisterFile("core/crypto/ssi.proto", fileDescriptor_6e1e1ddaeb1c143c) } +func init() { proto.RegisterFile("common/crypto/ssi.proto", fileDescriptor_b4d65a10f7585d94) } -var fileDescriptor_6e1e1ddaeb1c143c = []byte{ - // 689 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x4f, 0x53, 0xd3, 0x4e, - 0x18, 0xc7, 0x9b, 0xa6, 0x2d, 0x3f, 0x1e, 0xf8, 0x61, 0x5d, 0xa0, 0x06, 0x46, 0x3b, 0x05, 0x61, - 0xac, 0x0c, 0xb4, 0x34, 0x0e, 0x4e, 0xf1, 0xe0, 0x4c, 0x69, 0x83, 0x56, 0xc6, 0xd2, 0x49, 0x0a, - 0x8c, 0x5e, 0x32, 0x69, 0xba, 0x40, 0x10, 0xb2, 0x99, 0xcd, 0x16, 0xe9, 0xbb, 0xf0, 0xfd, 0x78, - 0xf4, 0xe2, 0x91, 0xa3, 0x47, 0x07, 0x0e, 0x9e, 0x7d, 0x07, 0xce, 0x6e, 0x92, 0xb6, 0xd4, 0x3a, - 0x8e, 0x97, 0xce, 0xf3, 0xe7, 0xf3, 0x3c, 0x7d, 0xbe, 0x4f, 0x76, 0x17, 0xe6, 0x6d, 0x42, 0x71, - 0xd1, 0xa6, 0x3d, 0x8f, 0x91, 0xa2, 0xef, 0x3b, 0x05, 0x8f, 0x12, 0x46, 0xd0, 0x14, 0x0f, 0x17, - 0x82, 0xf0, 0xf2, 0x67, 0x09, 0x92, 0x4d, 0x4a, 0xc8, 0x31, 0x5a, 0x83, 0x04, 0xeb, 0x79, 0x58, - 0x91, 0x72, 0x52, 0x7e, 0x46, 0xcd, 0x14, 0x86, 0xa8, 0x82, 0x20, 0x5a, 0x3d, 0x0f, 0xeb, 0x82, - 0x41, 0x8f, 0xe1, 0x7f, 0x8f, 0x87, 0x4c, 0xaf, 0x4b, 0x3d, 0xe2, 0x63, 0x25, 0x9e, 0x93, 0xf2, - 0x93, 0xfa, 0xb4, 0x08, 0x36, 0x83, 0x18, 0x2a, 0xc2, 0xec, 0x25, 0xa6, 0xce, 0xb1, 0x63, 0x5b, - 0xcc, 0x21, 0xae, 0x79, 0x81, 0xd9, 0x29, 0xe9, 0x28, 0xb2, 0x40, 0xd1, 0x70, 0xea, 0xad, 0xc8, - 0x20, 0x05, 0x26, 0x6c, 0x8a, 0x2d, 0x86, 0x3b, 0x4a, 0x42, 0x40, 0x91, 0x8b, 0x32, 0x90, 0xea, - 0x90, 0x0b, 0xcb, 0x71, 0x95, 0xa4, 0x48, 0x84, 0xde, 0xf2, 0x11, 0x2c, 0xbc, 0x31, 0xf6, 0x1b, - 0x47, 0xb8, 0x6d, 0x38, 0x27, 0xae, 0xc5, 0xba, 0x14, 0xab, 0x9b, 0xea, 0x66, 0x20, 0x28, 0x0f, - 0x49, 0x31, 0x8f, 0x50, 0x34, 0xa5, 0xa2, 0xdf, 0x15, 0xe9, 0x01, 0x80, 0xd2, 0x20, 0x9f, 0x7d, - 0xf4, 0x43, 0x11, 0xdc, 0x5c, 0xfe, 0x21, 0xc3, 0xdc, 0xa1, 0x98, 0xd0, 0x6a, 0x9f, 0xe3, 0x2a, - 0xc5, 0x1d, 0xec, 0x32, 0xc7, 0x3a, 0x47, 0x33, 0x10, 0x77, 0x3a, 0xa2, 0xe3, 0xa4, 0x1e, 0x77, - 0x82, 0x99, 0x89, 0xcb, 0xf0, 0x15, 0x53, 0xe2, 0x39, 0x59, 0xcc, 0x1c, 0xb8, 0x08, 0x85, 0xfb, - 0x94, 0x45, 0x38, 0xd8, 0x5b, 0x06, 0x52, 0x8e, 0xef, 0x77, 0x31, 0x0d, 0x05, 0x86, 0x1e, 0xdf, - 0x27, 0xb7, 0x2c, 0xd7, 0xc6, 0x66, 0xc7, 0x62, 0x38, 0x94, 0x39, 0x1d, 0x05, 0x6b, 0x16, 0xc3, - 0xe8, 0x09, 0xdc, 0xc3, 0x57, 0x9e, 0x43, 0x83, 0x6d, 0x0a, 0x2c, 0x25, 0xb0, 0x99, 0x41, 0x58, - 0x80, 0x27, 0x80, 0xec, 0xfe, 0xc4, 0xa6, 0xdf, 0x6d, 0x9f, 0x61, 0x9b, 0x29, 0x13, 0x39, 0x39, - 0x3f, 0xa5, 0x96, 0xef, 0x6c, 0x61, 0x9c, 0xc4, 0xc2, 0xc0, 0x34, 0x82, 0x52, 0xcd, 0x65, 0xb4, - 0xa7, 0xdf, 0xb7, 0x47, 0xe3, 0x68, 0x27, 0xda, 0xf0, 0x7f, 0xa2, 0xf7, 0xfa, 0xdf, 0x7b, 0x8b, - 0xb5, 0x07, 0xfd, 0x82, 0xd2, 0xc5, 0x1a, 0x64, 0xc6, 0xff, 0x21, 0xff, 0x2a, 0x1f, 0x70, 0x2f, - 0xdc, 0x35, 0x37, 0xd1, 0x1c, 0x24, 0x2f, 0xad, 0xf3, 0x6e, 0x74, 0xdc, 0x02, 0xe7, 0x45, 0xbc, - 0x2c, 0x2d, 0x96, 0x01, 0x06, 0xad, 0xff, 0xa5, 0x72, 0xed, 0xa7, 0x04, 0x13, 0x7b, 0xb8, 0xc7, - 0x0f, 0x37, 0x7a, 0x00, 0xb3, 0xa1, 0x69, 0x1e, 0x34, 0x8c, 0xa6, 0x56, 0xad, 0xef, 0xd6, 0xb5, - 0x5a, 0x3a, 0x86, 0x1e, 0xc1, 0x42, 0x94, 0xe0, 0xe7, 0xcd, 0x3c, 0xd2, 0x76, 0xcc, 0x3d, 0xed, - 0x9d, 0xc9, 0x0f, 0x5b, 0x5a, 0x42, 0x4f, 0x61, 0x35, 0x4a, 0x6b, 0x35, 0x75, 0x6b, 0xab, 0xb4, - 0x6d, 0x1e, 0x6a, 0x7a, 0x7d, 0xb7, 0x5e, 0xad, 0xb4, 0xea, 0xfb, 0x8d, 0x10, 0x2d, 0x95, 0xd3, - 0x71, 0x54, 0x82, 0x8d, 0x3e, 0x5a, 0xad, 0x19, 0x15, 0xd3, 0xd0, 0xaa, 0x4d, 0x75, 0xeb, 0xf9, - 0x5e, 0x69, 0x6c, 0xc9, 0x76, 0x5a, 0x46, 0xab, 0xb0, 0x14, 0x95, 0xe8, 0x46, 0xe5, 0x0f, 0x9d, - 0x13, 0xc3, 0x43, 0xf0, 0xf1, 0x2a, 0x07, 0xad, 0xd7, 0x0d, 0xf1, 0xab, 0x35, 0x5a, 0x11, 0x2e, - 0xd0, 0xe4, 0xda, 0x17, 0x09, 0x26, 0xfb, 0x57, 0x1a, 0x2d, 0xc0, 0x7c, 0xdf, 0x19, 0xd1, 0xbd, - 0x0a, 0x4b, 0x83, 0x54, 0x5f, 0xb9, 0x51, 0x7f, 0xd5, 0xa8, 0xb4, 0x0e, 0x74, 0x2d, 0xd2, 0xbf, - 0x02, 0xb9, 0x01, 0x16, 0x6d, 0x60, 0x98, 0x12, 0xd2, 0xd7, 0x21, 0x3f, 0x44, 0x8d, 0x88, 0xbf, - 0x43, 0x73, 0xd5, 0x39, 0x78, 0x38, 0xa0, 0xb9, 0xee, 0x91, 0x7e, 0x89, 0x9d, 0x97, 0x5f, 0x6f, - 0xb2, 0xd2, 0xf5, 0x4d, 0x56, 0xfa, 0x7e, 0x93, 0x95, 0x3e, 0xdd, 0x66, 0x63, 0xd7, 0xb7, 0xd9, - 0xd8, 0xb7, 0xdb, 0x6c, 0xec, 0xfd, 0xca, 0x89, 0xc3, 0x4e, 0xbb, 0xed, 0x82, 0x4d, 0x2e, 0x8a, - 0x3e, 0x71, 0xe9, 0x86, 0x43, 0x8a, 0xe2, 0x2d, 0xe4, 0x97, 0xd0, 0x0f, 0x5f, 0xc4, 0x76, 0x4a, - 0x3c, 0x87, 0xcf, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x87, 0x27, 0x2d, 0x27, 0x05, 0x00, - 0x00, +var fileDescriptor_b4d65a10f7585d94 = []byte{ + // 691 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x4d, 0x4f, 0xdb, 0x4c, + 0x10, 0xc7, 0xe3, 0x38, 0x09, 0x0f, 0xc3, 0xcb, 0x93, 0x2e, 0x14, 0x0c, 0x6a, 0xa3, 0x40, 0x41, + 0x4d, 0x11, 0x24, 0xc4, 0x15, 0x15, 0x70, 0xa8, 0x14, 0x12, 0xd3, 0xa6, 0xa8, 0x21, 0xb2, 0x03, + 0x88, 0x5e, 0x2c, 0xc7, 0x59, 0x60, 0x29, 0xf1, 0x5a, 0xf6, 0x86, 0x92, 0x6f, 0xd1, 0x2f, 0xd4, + 0x53, 0x2f, 0x3d, 0x72, 0xec, 0xb1, 0x82, 0x63, 0x4f, 0xfd, 0x06, 0xd5, 0xae, 0xed, 0x24, 0x44, + 0xa9, 0xd4, 0x5e, 0xa2, 0x79, 0xf9, 0xcd, 0x64, 0xfe, 0xe3, 0xb1, 0x61, 0xde, 0xa6, 0xed, 0x36, + 0x75, 0x0a, 0xb6, 0xd7, 0x75, 0x19, 0x2d, 0xf8, 0x3e, 0xc9, 0xbb, 0x1e, 0x65, 0x14, 0x4d, 0x05, + 0x89, 0x7c, 0x90, 0x58, 0xfe, 0x22, 0x41, 0xb2, 0xee, 0x51, 0x7a, 0x86, 0xd6, 0x21, 0xc1, 0xba, + 0x2e, 0x56, 0xa4, 0xac, 0x94, 0x9b, 0x56, 0x95, 0xfc, 0x03, 0x2e, 0x2f, 0x98, 0x46, 0xd7, 0xc5, + 0xba, 0xa0, 0xd0, 0x33, 0x98, 0x72, 0x79, 0xc8, 0x74, 0x3b, 0x9e, 0x4b, 0x7d, 0xac, 0xc4, 0xb3, + 0x52, 0x6e, 0x5c, 0x9f, 0x14, 0xc1, 0x7a, 0x10, 0x43, 0x05, 0x98, 0xb9, 0xc6, 0x1e, 0x39, 0x23, + 0xb6, 0xc5, 0x08, 0x75, 0xcc, 0x36, 0x66, 0x17, 0xb4, 0xa5, 0xc8, 0x02, 0x45, 0x83, 0xa9, 0xf7, + 0x22, 0x83, 0x14, 0x18, 0xb3, 0x3d, 0x6c, 0x31, 0xdc, 0x52, 0x12, 0x02, 0x8a, 0x5c, 0x34, 0x07, + 0xa9, 0x16, 0x6d, 0x5b, 0xc4, 0x51, 0x92, 0x22, 0x11, 0x7a, 0xcb, 0xa7, 0xb0, 0xf0, 0xce, 0x38, + 0xac, 0x9d, 0xe0, 0xa6, 0x41, 0xce, 0x1d, 0x8b, 0x75, 0x3c, 0xac, 0x6e, 0xaa, 0x9b, 0x81, 0xa4, + 0x35, 0x48, 0x8a, 0x79, 0x84, 0xa6, 0x09, 0x75, 0x76, 0x94, 0x26, 0x3d, 0x40, 0x50, 0x1a, 0xe4, + 0xcb, 0x4f, 0x7e, 0x28, 0x83, 0x9b, 0xcb, 0x3f, 0x65, 0x98, 0x3d, 0x16, 0x33, 0x5a, 0xcd, 0x2b, + 0x5c, 0xf6, 0x70, 0x0b, 0x3b, 0x8c, 0x58, 0x57, 0x68, 0x1a, 0xe2, 0xa4, 0x25, 0x7a, 0x8e, 0xeb, + 0x71, 0x12, 0x4c, 0x4d, 0x1d, 0x86, 0x6f, 0x98, 0x12, 0xcf, 0xca, 0x62, 0xea, 0xc0, 0x45, 0x28, + 0xdc, 0xa9, 0x2c, 0xc2, 0xc1, 0xe6, 0xe6, 0x20, 0x45, 0x7c, 0xbf, 0x83, 0xbd, 0x50, 0x62, 0xe8, + 0xf1, 0x8d, 0x72, 0xcb, 0x72, 0x6c, 0x6c, 0xb6, 0x2c, 0x86, 0x43, 0xa1, 0x93, 0x51, 0xb0, 0x62, + 0x31, 0x8c, 0x9e, 0xc3, 0xff, 0xf8, 0xc6, 0x25, 0x5e, 0xb0, 0x4f, 0x81, 0xa5, 0x04, 0x36, 0xdd, + 0x0f, 0x0b, 0x90, 0x00, 0xb2, 0x7b, 0x13, 0x9b, 0x7e, 0xa7, 0x79, 0x89, 0x6d, 0xa6, 0x8c, 0x65, + 0xe5, 0xdc, 0x84, 0xba, 0x3b, 0xb4, 0x87, 0x51, 0x22, 0xf3, 0x7d, 0xd3, 0x08, 0x8a, 0x35, 0x87, + 0x79, 0x5d, 0xfd, 0x91, 0x3d, 0x1c, 0x47, 0x95, 0x68, 0xcb, 0xff, 0x89, 0xee, 0xf9, 0xbf, 0xe9, + 0x2e, 0x56, 0x1f, 0x74, 0x0c, 0x8a, 0x17, 0x2b, 0x30, 0x37, 0xfa, 0x2f, 0xf9, 0x93, 0xf9, 0x88, + 0xbb, 0xe1, 0xbe, 0xb9, 0x89, 0x66, 0x21, 0x79, 0x6d, 0x5d, 0x75, 0xa2, 0xa3, 0x0b, 0x9c, 0xdd, + 0xf8, 0xb6, 0xb4, 0xb8, 0x0d, 0xd0, 0x6f, 0xfd, 0x2f, 0x95, 0x6b, 0xbf, 0x24, 0x18, 0x3b, 0xc0, + 0x5d, 0x7e, 0xe2, 0x68, 0x1e, 0x66, 0x42, 0xd3, 0x3c, 0xaa, 0x19, 0x75, 0xad, 0x5c, 0xdd, 0xaf, + 0x6a, 0x95, 0x74, 0x0c, 0x3d, 0x85, 0x85, 0x28, 0xc1, 0xaf, 0xce, 0x3c, 0xd1, 0xf6, 0xcc, 0x03, + 0xed, 0xd4, 0xe4, 0x27, 0x97, 0x96, 0xd0, 0x0b, 0x58, 0x8d, 0xd2, 0x5a, 0x45, 0xdd, 0xda, 0x2a, + 0xee, 0x98, 0xc7, 0x9a, 0x5e, 0xdd, 0xaf, 0x96, 0x4b, 0x8d, 0xea, 0x61, 0x2d, 0x44, 0x8b, 0xdb, + 0xe9, 0x38, 0x2a, 0xc2, 0x46, 0x0f, 0x2d, 0x57, 0x8c, 0x92, 0x69, 0x68, 0xe5, 0xba, 0xba, 0xf5, + 0xea, 0xa0, 0x38, 0xb2, 0x64, 0x27, 0x2d, 0xa3, 0x55, 0x58, 0x8a, 0x4a, 0x74, 0xa3, 0xf4, 0x87, + 0xce, 0x89, 0xc1, 0x21, 0xf8, 0x78, 0xa5, 0xa3, 0xc6, 0xdb, 0x9a, 0xf8, 0xd5, 0x6a, 0x8d, 0x08, + 0x17, 0x68, 0x72, 0xed, 0xab, 0x04, 0xe3, 0xbd, 0x17, 0x1b, 0x2d, 0xc0, 0xe3, 0x9e, 0x33, 0xa4, + 0x7b, 0x15, 0x96, 0xfa, 0xa9, 0x9e, 0x72, 0xa3, 0xfa, 0xa6, 0x56, 0x6a, 0x1c, 0xe9, 0x5a, 0xa4, + 0x7f, 0x05, 0xb2, 0x7d, 0x2c, 0xda, 0xc0, 0x20, 0x25, 0xa4, 0xaf, 0x43, 0x6e, 0x80, 0x1a, 0x12, + 0xff, 0x80, 0xe6, 0xaa, 0xb3, 0xf0, 0xa4, 0x4f, 0x73, 0xdd, 0x43, 0xfd, 0x12, 0x7b, 0xaf, 0xbf, + 0xdd, 0x65, 0xa4, 0xdb, 0xbb, 0x8c, 0xf4, 0xe3, 0x2e, 0x23, 0x7d, 0xbe, 0xcf, 0xc4, 0x6e, 0xef, + 0x33, 0xb1, 0xef, 0xf7, 0x99, 0xd8, 0x87, 0x95, 0x73, 0xc2, 0x2e, 0x3a, 0x4d, 0x7e, 0x90, 0x05, + 0x9f, 0x3a, 0xde, 0x06, 0xa1, 0x05, 0x9b, 0x7a, 0xb8, 0xc0, 0x5f, 0x44, 0x3f, 0xfc, 0x36, 0x36, + 0x53, 0xe2, 0xc3, 0xf8, 0xf2, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6d, 0xa1, 0x1f, 0x45, 0x33, + 0x05, 0x00, 0x00, } func (m *Proof) Marshal() (dAtA []byte, err error) { diff --git a/types/crypto/vc.pb.go b/types/crypto/vc.pb.go index fbb3b957e..09b77c805 100644 --- a/types/crypto/vc.pb.go +++ b/types/crypto/vc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: core/crypto/vc.proto +// source: common/crypto/vc.proto package crypto @@ -32,7 +32,7 @@ func (m *PubKey) Reset() { *m = PubKey{} } func (m *PubKey) String() string { return proto.CompactTextString(m) } func (*PubKey) ProtoMessage() {} func (*PubKey) Descriptor() ([]byte, []int) { - return fileDescriptor_57e5056fb47bddc2, []int{0} + return fileDescriptor_64c0ba2ef76e413c, []int{0} } func (m *PubKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -76,24 +76,24 @@ func (m *PubKey) GetKeyType() string { } func init() { - proto.RegisterType((*PubKey)(nil), "core.crypto.PubKey") + proto.RegisterType((*PubKey)(nil), "common.crypto.PubKey") } -func init() { proto.RegisterFile("core/crypto/vc.proto", fileDescriptor_57e5056fb47bddc2) } +func init() { proto.RegisterFile("common/crypto/vc.proto", fileDescriptor_64c0ba2ef76e413c) } -var fileDescriptor_57e5056fb47bddc2 = []byte{ - // 167 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x49, 0xce, 0x2f, 0x4a, - 0xd5, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0x2f, 0x4b, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0xe2, 0x06, 0x89, 0xea, 0x41, 0x44, 0x95, 0x4c, 0xb9, 0xd8, 0x02, 0x4a, 0x93, 0xbc, 0x53, - 0x2b, 0x85, 0x04, 0xb8, 0x98, 0xb3, 0x53, 0x2b, 0x25, 0x18, 0x15, 0x18, 0x35, 0x78, 0x82, 0x40, - 0x4c, 0x21, 0x49, 0x2e, 0x8e, 0xec, 0xd4, 0xca, 0xf8, 0x92, 0xca, 0x82, 0x54, 0x09, 0x26, 0x05, - 0x46, 0x0d, 0xce, 0x20, 0xf6, 0xec, 0xd4, 0xca, 0x90, 0xca, 0x82, 0x54, 0x27, 0xbb, 0x13, 0x8f, - 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, - 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52, 0x49, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, - 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0xce, 0xcf, 0x2b, 0xd2, 0xcd, 0xcc, 0xd7, 0x07, 0x3b, 0x03, 0x64, - 0x4c, 0x31, 0xd4, 0x31, 0x49, 0x6c, 0x60, 0xa7, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x51, - 0x0a, 0xd1, 0xf5, 0xa2, 0x00, 0x00, 0x00, +var fileDescriptor_64c0ba2ef76e413c = []byte{ + // 172 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4b, 0xce, 0xcf, 0xcd, + 0xcd, 0xcf, 0xd3, 0x4f, 0x2e, 0xaa, 0x2c, 0x28, 0xc9, 0xd7, 0x2f, 0x4b, 0xd6, 0x2b, 0x28, 0xca, + 0x2f, 0xc9, 0x17, 0xe2, 0x85, 0x88, 0xeb, 0x41, 0xc4, 0x95, 0x4c, 0xb9, 0xd8, 0x02, 0x4a, 0x93, + 0xbc, 0x53, 0x2b, 0x85, 0x04, 0xb8, 0x98, 0xb3, 0x53, 0x2b, 0x25, 0x18, 0x15, 0x18, 0x35, 0x78, + 0x82, 0x40, 0x4c, 0x21, 0x49, 0x2e, 0x8e, 0xec, 0xd4, 0xca, 0xf8, 0x92, 0xca, 0x82, 0x54, 0x09, + 0x26, 0x05, 0x46, 0x0d, 0xce, 0x20, 0xf6, 0xec, 0xd4, 0xca, 0x90, 0xca, 0x82, 0x54, 0x27, 0xbb, + 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, + 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52, 0x49, 0xcf, 0x2c, 0xc9, 0x28, + 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0xce, 0xcf, 0x2b, 0xd2, 0xcd, 0xcc, 0xd7, 0x4f, 0xce, + 0x2f, 0x4a, 0xd5, 0x07, 0x19, 0x53, 0x0c, 0x75, 0x4e, 0x12, 0x1b, 0xd8, 0x31, 0xc6, 0x80, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x83, 0x19, 0x15, 0xb6, 0xa6, 0x00, 0x00, 0x00, } func (m *PubKey) Marshal() (dAtA []byte, err error) { diff --git a/types/highway/wallet/v1/service.pb.go b/types/highway/wallet/v1/service.pb.go index d52153c95..01efdfc2d 100644 --- a/types/highway/wallet/v1/service.pb.go +++ b/types/highway/wallet/v1/service.pb.go @@ -33,7 +33,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type CreateAccountRequest struct { Jwt string `protobuf:"bytes,1,opt,name=jwt,proto3" json:"jwt,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - CoinType crypto.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=core.crypto.CoinType" json:"coin_type,omitempty"` + CoinType crypto.CoinType `protobuf:"varint,3,opt,name=coin_type,json=coinType,proto3,enum=common.crypto.CoinType" json:"coin_type,omitempty"` Network string `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"` } @@ -103,7 +103,7 @@ type CreateAccountResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - CoinType crypto.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=core.crypto.CoinType" json:"coin_type,omitempty"` + CoinType crypto.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=common.crypto.CoinType" json:"coin_type,omitempty"` Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` } @@ -233,7 +233,7 @@ type GetAccountResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - CoinType crypto.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=core.crypto.CoinType" json:"coin_type,omitempty"` + CoinType crypto.CoinType `protobuf:"varint,4,opt,name=coin_type,json=coinType,proto3,enum=common.crypto.CoinType" json:"coin_type,omitempty"` Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"` } @@ -795,54 +795,54 @@ func init() { func init() { proto.RegisterFile("highway/wallet/v1/service.proto", fileDescriptor_6b44f8b21811e31c) } var fileDescriptor_6b44f8b21811e31c = []byte{ - // 741 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x4f, 0x13, 0x41, - 0x14, 0x66, 0x69, 0xc1, 0xf6, 0x09, 0x02, 0x43, 0x81, 0xcd, 0x06, 0x17, 0x9c, 0x00, 0x2d, 0x26, - 0xee, 0x06, 0x4c, 0x8c, 0x89, 0x07, 0x03, 0xc4, 0x78, 0xd1, 0x4b, 0x31, 0x98, 0x70, 0x69, 0xb6, - 0xdb, 0xe9, 0xb2, 0x5a, 0x76, 0xd6, 0x99, 0x69, 0x4b, 0x13, 0x13, 0x12, 0x4c, 0x3c, 0xe8, 0x45, - 0xe3, 0xbf, 0x61, 0xe2, 0xff, 0xe0, 0xc9, 0x23, 0x89, 0x17, 0x8f, 0x06, 0xfc, 0x43, 0xcc, 0xce, - 0xee, 0x42, 0x7f, 0x2c, 0x69, 0x43, 0x3d, 0x78, 0x9b, 0xf7, 0xde, 0xb7, 0xef, 0x7d, 0xaf, 0xdb, - 0xef, 0xdb, 0x81, 0xa5, 0x03, 0xd7, 0x39, 0x68, 0x5a, 0x2d, 0xb3, 0x69, 0xd5, 0x6a, 0x44, 0x98, - 0x8d, 0x0d, 0x93, 0x13, 0xd6, 0x70, 0x6d, 0x62, 0xf8, 0x8c, 0x0a, 0x8a, 0x66, 0x22, 0x80, 0x11, - 0x02, 0x8c, 0xc6, 0x86, 0x36, 0x6f, 0x53, 0x46, 0x4c, 0x9b, 0xb5, 0x7c, 0x41, 0x4d, 0x9b, 0xba, - 0x5e, 0x08, 0xd5, 0x16, 0x1d, 0x4a, 0x9d, 0x1a, 0x31, 0x2d, 0xdf, 0x35, 0x2d, 0xcf, 0xa3, 0xc2, - 0x12, 0x2e, 0xf5, 0x78, 0x58, 0xc5, 0x1f, 0x14, 0xc8, 0xed, 0x30, 0x62, 0x09, 0xb2, 0x65, 0xdb, - 0xb4, 0xee, 0x89, 0x22, 0x79, 0x53, 0x27, 0x5c, 0xa0, 0x69, 0x48, 0xbd, 0x6a, 0x0a, 0x55, 0x59, - 0x56, 0x0a, 0xd9, 0x62, 0x70, 0x44, 0x08, 0xd2, 0x9e, 0x75, 0x48, 0xd4, 0x51, 0x99, 0x92, 0x67, - 0xb4, 0x09, 0xd9, 0x60, 0x54, 0x49, 0xb4, 0x7c, 0xa2, 0xa6, 0x96, 0x95, 0xc2, 0xad, 0xcd, 0x39, - 0x23, 0x20, 0x62, 0x84, 0x44, 0x8c, 0x1d, 0xea, 0x7a, 0x2f, 0x5a, 0x3e, 0x29, 0x66, 0xec, 0xe8, - 0x84, 0x54, 0xb8, 0xe1, 0x11, 0xd1, 0xa4, 0xec, 0xb5, 0x9a, 0x96, 0xad, 0xe2, 0x10, 0x7f, 0x53, - 0x60, 0xae, 0x8b, 0x0c, 0xf7, 0xa9, 0xc7, 0xe5, 0x33, 0xbc, 0x6e, 0xdb, 0x84, 0x73, 0xc9, 0x28, - 0x53, 0x8c, 0xc3, 0xa0, 0x72, 0x48, 0x38, 0xb7, 0x9c, 0x98, 0x58, 0x1c, 0x06, 0x15, 0xab, 0x52, - 0x61, 0xc1, 0x33, 0xa9, 0xb0, 0x12, 0x85, 0x9d, 0xac, 0xd3, 0x83, 0xb1, 0xce, 0xc1, 0x18, 0x6d, - 0x7a, 0x84, 0xa9, 0x63, 0xb2, 0x57, 0x18, 0xe0, 0xc7, 0x30, 0xf3, 0x94, 0x88, 0xbe, 0x3f, 0x5d, - 0x1b, 0x95, 0xd1, 0x0e, 0x2a, 0xf8, 0xab, 0x02, 0xa8, 0xbd, 0xc3, 0x7f, 0xbe, 0x6f, 0x1e, 0x66, - 0x9f, 0xb9, 0x3c, 0xa6, 0xcb, 0xaf, 0xdc, 0x18, 0x57, 0x21, 0xd7, 0x09, 0x1c, 0x62, 0x31, 0x0d, - 0x32, 0x56, 0xd4, 0x47, 0x4d, 0x2d, 0xa7, 0x0a, 0xd9, 0xe2, 0x45, 0x8c, 0xf7, 0x01, 0xed, 0xba, - 0x8e, 0xf7, 0x3c, 0x84, 0x5e, 0xe3, 0x0d, 0xb4, 0xcf, 0x0d, 0x7e, 0xb6, 0x89, 0x8b, 0xb9, 0xd8, - 0x81, 0xd9, 0x8e, 0xde, 0x43, 0xac, 0xb0, 0x08, 0x59, 0xee, 0x3a, 0x9e, 0x25, 0xea, 0x2c, 0x1e, - 0x73, 0x99, 0xc0, 0x6f, 0x61, 0x7e, 0x8f, 0x30, 0xb7, 0xda, 0xda, 0x8d, 0x53, 0xff, 0x74, 0x91, - 0xce, 0xe9, 0xe9, 0xee, 0xe9, 0x47, 0xb0, 0xd0, 0x33, 0x7d, 0x88, 0x55, 0xd7, 0x61, 0x3a, 0x3a, - 0x96, 0x1a, 0x41, 0x5b, 0x97, 0x54, 0x24, 0x9f, 0x4c, 0x71, 0x2a, 0xca, 0xef, 0x45, 0x69, 0xbc, - 0x05, 0xb3, 0x4f, 0x8e, 0x7c, 0xca, 0xc4, 0x4b, 0xe9, 0x62, 0xd7, 0xd1, 0xcf, 0x89, 0x02, 0xb9, - 0xce, 0x1e, 0x43, 0x50, 0x7f, 0x00, 0x0b, 0xc4, 0x93, 0x92, 0x20, 0x95, 0x52, 0xe8, 0xac, 0xa5, - 0x72, 0xbd, 0x5a, 0x25, 0x2c, 0x52, 0xd4, 0xdc, 0x45, 0x39, 0x9c, 0xb6, 0x2d, 0x8b, 0x9b, 0xdf, - 0xc7, 0x61, 0x32, 0x4c, 0xec, 0x86, 0x2e, 0x8d, 0x3e, 0x2a, 0x30, 0xd9, 0xe1, 0x64, 0x28, 0x6f, - 0xf4, 0x58, 0xb6, 0x91, 0x64, 0xbc, 0x5a, 0xa1, 0x3f, 0x30, 0x5c, 0x11, 0xe7, 0x4f, 0x7e, 0xfe, - 0xf9, 0x32, 0x7a, 0x07, 0x2f, 0x99, 0x5d, 0x9f, 0x8b, 0x58, 0x1d, 0xa6, 0x2d, 0x9f, 0x43, 0xc7, - 0x00, 0x97, 0x1e, 0x83, 0x56, 0x12, 0x06, 0xf4, 0x98, 0x98, 0xb6, 0xda, 0x07, 0x15, 0x71, 0x58, - 0x91, 0x1c, 0x74, 0xbc, 0x78, 0x25, 0x07, 0x87, 0x08, 0xf4, 0x5e, 0x81, 0x89, 0x76, 0x3b, 0x40, - 0x6b, 0x09, 0xdd, 0x13, 0x8c, 0x45, 0xcb, 0xf7, 0xc5, 0x45, 0x3c, 0x56, 0x25, 0x8f, 0x25, 0x7c, - 0xfb, 0x4a, 0x1e, 0x35, 0x97, 0x0b, 0xf4, 0x4e, 0x81, 0x9b, 0x6d, 0x9a, 0x46, 0x49, 0x5b, 0xf6, - 0xfa, 0x89, 0xb6, 0xd6, 0x0f, 0x36, 0x30, 0x8b, 0x40, 0x76, 0xe8, 0xb3, 0x02, 0x53, 0x5d, 0x92, - 0x43, 0xeb, 0x09, 0x23, 0x92, 0x4d, 0x41, 0xbb, 0x3b, 0x08, 0x74, 0xe0, 0xff, 0x88, 0x14, 0x69, - 0x0b, 0x1d, 0xc3, 0x44, 0xbb, 0x8e, 0x12, 0xdf, 0x50, 0x82, 0x58, 0x13, 0xdf, 0x50, 0x92, 0x20, - 0xb1, 0x2e, 0x99, 0xa8, 0x78, 0xbe, 0x9b, 0x09, 0x91, 0xe8, 0xed, 0xe2, 0x8f, 0x33, 0x5d, 0x39, - 0x3d, 0xd3, 0x95, 0xdf, 0x67, 0xba, 0xf2, 0xe9, 0x5c, 0x1f, 0x39, 0x3d, 0xd7, 0x47, 0x7e, 0x9d, - 0xeb, 0x23, 0xfb, 0x0f, 0x1d, 0x57, 0x1c, 0xd4, 0xcb, 0x86, 0x4d, 0x0f, 0x4d, 0x4e, 0x3d, 0x76, - 0xcf, 0x0d, 0x2e, 0x38, 0x8c, 0x98, 0xc1, 0xf7, 0x8c, 0x9b, 0x3d, 0x77, 0xa5, 0x47, 0xe1, 0xc9, - 0x2f, 0x97, 0xc7, 0xe5, 0x25, 0xe7, 0xfe, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x36, 0xcf, 0x53, - 0x79, 0x50, 0x09, 0x00, 0x00, + // 745 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcd, 0x4e, 0xdb, 0x4a, + 0x14, 0xc6, 0x24, 0x70, 0x93, 0x73, 0xe1, 0x02, 0x43, 0x00, 0xcb, 0xe2, 0x1a, 0xee, 0x08, 0x48, + 0xb8, 0x52, 0x6d, 0x41, 0xab, 0xaa, 0x52, 0x17, 0x15, 0xa0, 0xaa, 0x9b, 0x76, 0x13, 0x2a, 0x2a, + 0xb1, 0x89, 0x1c, 0x67, 0x62, 0xdc, 0x26, 0x33, 0xae, 0x67, 0x92, 0x10, 0xa9, 0x12, 0x12, 0x95, + 0xba, 0x69, 0x17, 0xad, 0xfa, 0x1e, 0x95, 0xfa, 0x0a, 0x5d, 0x75, 0x89, 0xd4, 0x4d, 0x97, 0x15, + 0xf4, 0x41, 0x2a, 0x8f, 0x6d, 0xc8, 0x8f, 0x51, 0x22, 0xd2, 0x45, 0x77, 0x73, 0x7e, 0xe6, 0x9c, + 0xef, 0x78, 0xfc, 0x7d, 0x33, 0xb0, 0x72, 0xe4, 0x3a, 0x47, 0x2d, 0xab, 0x6d, 0xb6, 0xac, 0x5a, + 0x8d, 0x08, 0xb3, 0xb9, 0x65, 0x72, 0xe2, 0x37, 0x5d, 0x9b, 0x18, 0x9e, 0xcf, 0x04, 0x43, 0x73, + 0x51, 0x82, 0x11, 0x26, 0x18, 0xcd, 0x2d, 0x4d, 0xb5, 0x59, 0xbd, 0xce, 0xa8, 0x69, 0xfb, 0x6d, + 0x4f, 0x30, 0xd3, 0x66, 0x2e, 0x0d, 0x93, 0xb5, 0x65, 0x87, 0x31, 0xa7, 0x46, 0x4c, 0xcb, 0x73, + 0x4d, 0x8b, 0x52, 0x26, 0x2c, 0xe1, 0x32, 0xca, 0xc3, 0x28, 0x7e, 0xa7, 0x40, 0x6e, 0xcf, 0x27, + 0x96, 0x20, 0x3b, 0xb6, 0xcd, 0x1a, 0x54, 0x14, 0xc9, 0xcb, 0x06, 0xe1, 0x02, 0xcd, 0x42, 0xea, + 0x79, 0x4b, 0xa8, 0xca, 0xaa, 0x52, 0xc8, 0x16, 0x83, 0x25, 0x42, 0x90, 0xa6, 0x56, 0x9d, 0xa8, + 0xe3, 0xd2, 0x25, 0xd7, 0xe8, 0x0e, 0x64, 0x83, 0x56, 0x25, 0xd1, 0xf6, 0x88, 0x9a, 0x5a, 0x55, + 0x0a, 0xff, 0x6c, 0x2f, 0x19, 0x21, 0x14, 0x23, 0x84, 0x62, 0xec, 0x31, 0x97, 0x3e, 0x6d, 0x7b, + 0xa4, 0x98, 0xb1, 0xa3, 0x15, 0x52, 0xe1, 0x2f, 0x4a, 0x44, 0x8b, 0xf9, 0x2f, 0xd4, 0xb4, 0x2c, + 0x16, 0x9b, 0xf8, 0xb3, 0x02, 0x0b, 0x3d, 0x70, 0xb8, 0xc7, 0x28, 0x97, 0x7b, 0x78, 0xc3, 0xb6, + 0x09, 0xe7, 0x12, 0x53, 0xa6, 0x18, 0x9b, 0x41, 0xa4, 0x4e, 0x38, 0xb7, 0x9c, 0x18, 0x5a, 0x6c, + 0x06, 0x11, 0xab, 0x52, 0xf1, 0x83, 0x3d, 0xa9, 0x30, 0x12, 0x99, 0xdd, 0xb8, 0xd3, 0xc3, 0xe2, + 0xce, 0xc1, 0x04, 0x6b, 0x51, 0xe2, 0xab, 0x13, 0xb2, 0x5a, 0x68, 0xe0, 0x07, 0x30, 0xf7, 0x88, + 0x88, 0x81, 0x9f, 0xaf, 0x03, 0xcc, 0x78, 0x17, 0x18, 0xfc, 0x49, 0x01, 0xd4, 0x59, 0xe1, 0x8f, + 0x9f, 0x38, 0x0f, 0xf3, 0x8f, 0x5d, 0x1e, 0x03, 0xe6, 0xd7, 0xce, 0x8c, 0xab, 0x90, 0xeb, 0x4e, + 0x1c, 0x61, 0x34, 0x0d, 0x32, 0x56, 0x54, 0x47, 0x4d, 0xad, 0xa6, 0x0a, 0xd9, 0xe2, 0xa5, 0x8d, + 0x0f, 0x01, 0xed, 0xbb, 0x0e, 0x7d, 0x12, 0xa6, 0xde, 0xe0, 0x0c, 0x3a, 0xfb, 0x06, 0x1f, 0x6e, + 0xea, 0xb2, 0x2f, 0x76, 0x60, 0xbe, 0xab, 0xf6, 0x08, 0x23, 0x2c, 0x43, 0x96, 0xbb, 0x0e, 0xb5, + 0x44, 0xc3, 0x8f, 0xdb, 0x5c, 0x39, 0xf0, 0x2b, 0x58, 0x3c, 0x20, 0xbe, 0x5b, 0x6d, 0xef, 0xc7, + 0xae, 0xdf, 0x3a, 0x48, 0x77, 0xf7, 0x74, 0x6f, 0xf7, 0x63, 0x58, 0xea, 0xeb, 0x3e, 0xc2, 0xa8, + 0x9b, 0x30, 0x1b, 0x2d, 0x4b, 0xcd, 0xa0, 0xac, 0x4b, 0x2a, 0x12, 0x4f, 0xa6, 0x38, 0x13, 0xf9, + 0x0f, 0x22, 0x37, 0xde, 0x81, 0xf9, 0x87, 0xc7, 0x1e, 0xf3, 0xc5, 0x33, 0xa9, 0x66, 0x37, 0x61, + 0xd0, 0xa9, 0x02, 0xb9, 0xee, 0x1a, 0x23, 0x40, 0xbf, 0x0b, 0x4b, 0x84, 0x4a, 0x4a, 0x90, 0x4a, + 0x29, 0x54, 0xd8, 0x52, 0xb9, 0x51, 0xad, 0x12, 0x3f, 0xe2, 0xd4, 0xc2, 0x65, 0x38, 0xec, 0xb6, + 0x2b, 0x83, 0xdb, 0x5f, 0x26, 0x61, 0x3a, 0x74, 0xec, 0x87, 0x6a, 0x8d, 0xde, 0x2a, 0x30, 0xdd, + 0xa5, 0x66, 0x28, 0x6f, 0xf4, 0x49, 0xb7, 0x91, 0x24, 0xbf, 0x5a, 0x61, 0x70, 0x62, 0x38, 0x22, + 0xce, 0x9f, 0x7e, 0xfb, 0xf9, 0x71, 0xfc, 0x3f, 0xbc, 0x62, 0xf6, 0x5c, 0x1b, 0x31, 0x3b, 0x4c, + 0x5b, 0xee, 0x43, 0x27, 0x00, 0x57, 0x2a, 0x83, 0xd6, 0x12, 0x1a, 0xf4, 0xc9, 0x98, 0xb6, 0x3e, + 0x20, 0x2b, 0xc2, 0xb0, 0x26, 0x31, 0xe8, 0x78, 0xf9, 0x5a, 0x0c, 0x0e, 0x11, 0xe8, 0x8d, 0x02, + 0x53, 0x9d, 0x72, 0x80, 0x36, 0x12, 0xaa, 0x27, 0x08, 0x8b, 0x96, 0x1f, 0x98, 0x17, 0xe1, 0x58, + 0x97, 0x38, 0x56, 0xf0, 0xbf, 0xd7, 0xe2, 0xa8, 0xb9, 0x5c, 0xa0, 0xd7, 0x0a, 0xfc, 0xdd, 0xc1, + 0x69, 0x94, 0x34, 0x65, 0xbf, 0x9e, 0x68, 0x1b, 0x83, 0xd2, 0x86, 0x46, 0x11, 0xd0, 0x0e, 0x7d, + 0x50, 0x60, 0xa6, 0x87, 0x72, 0x68, 0x33, 0xa1, 0x45, 0xb2, 0x28, 0x68, 0xff, 0x0f, 0x93, 0x3a, + 0xf4, 0x3f, 0x22, 0x49, 0xda, 0x46, 0x27, 0x30, 0xd5, 0xc9, 0xa3, 0xc4, 0x13, 0x4a, 0x20, 0x6b, + 0xe2, 0x09, 0x25, 0x11, 0x12, 0xeb, 0x12, 0x89, 0x8a, 0x17, 0x7b, 0x91, 0x10, 0x99, 0xbd, 0x5b, + 0xfc, 0x7a, 0xae, 0x2b, 0x67, 0xe7, 0xba, 0xf2, 0xe3, 0x5c, 0x57, 0xde, 0x5f, 0xe8, 0x63, 0x67, + 0x17, 0xfa, 0xd8, 0xf7, 0x0b, 0x7d, 0xec, 0xf0, 0x9e, 0xe3, 0x8a, 0xa3, 0x46, 0x39, 0xb8, 0xb3, + 0x4c, 0xce, 0xa8, 0x7f, 0xcb, 0x0d, 0x9e, 0x39, 0x3e, 0x31, 0x83, 0x1b, 0x8d, 0x9b, 0x7d, 0x6f, + 0xa6, 0xfb, 0xe1, 0xca, 0x2b, 0x97, 0x27, 0xe5, 0x53, 0xe7, 0xf6, 0xaf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x39, 0xbd, 0x34, 0x07, 0x58, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/service/types/credential.go b/types/webauthn/credential.go similarity index 99% rename from x/service/types/credential.go rename to types/webauthn/credential.go index 856941f19..85d7b80fb 100644 --- a/x/service/types/credential.go +++ b/types/webauthn/credential.go @@ -1,4 +1,4 @@ -package types +package webauthn import ( "crypto/aes" @@ -11,7 +11,7 @@ import ( "github.com/go-webauthn/webauthn/protocol" "github.com/go-webauthn/webauthn/protocol/webauthncose" - "github.com/sonr-io/core/pkg/crypto" + "github.com/sonr-io/core/internal/crypto" idtypes "github.com/sonr-io/core/x/identity/types" "github.com/yoseplee/vrf" ) diff --git a/x/service/types/credential.pb.go b/types/webauthn/credential.pb.go similarity index 88% rename from x/service/types/credential.pb.go rename to types/webauthn/credential.pb.go index 4c0a79da0..caec5e77b 100644 --- a/x/service/types/credential.pb.go +++ b/types/webauthn/credential.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: core/crypto/webauthn/credential.proto +// source: common/webauthn/credential.proto -package types +package webauthn import ( fmt "fmt" @@ -48,7 +48,7 @@ func (m *Credential) Reset() { *m = Credential{} } func (m *Credential) String() string { return proto.CompactTextString(m) } func (*Credential) ProtoMessage() {} func (*Credential) Descriptor() ([]byte, []int) { - return fileDescriptor_4c07639536034e04, []int{0} + return fileDescriptor_9642ee7a70a978ce, []int{0} } func (m *Credential) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -140,7 +140,7 @@ func (m *Authenticator) Reset() { *m = Authenticator{} } func (m *Authenticator) String() string { return proto.CompactTextString(m) } func (*Authenticator) ProtoMessage() {} func (*Authenticator) Descriptor() ([]byte, []int) { - return fileDescriptor_4c07639536034e04, []int{1} + return fileDescriptor_9642ee7a70a978ce, []int{1} } func (m *Authenticator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -191,37 +191,35 @@ func (m *Authenticator) GetAttachment() string { } func init() { - proto.RegisterType((*Credential)(nil), "core.crypto.webauthn.Credential") - proto.RegisterType((*Authenticator)(nil), "core.crypto.webauthn.Authenticator") -} - -func init() { - proto.RegisterFile("core/crypto/webauthn/credential.proto", fileDescriptor_4c07639536034e04) -} - -var fileDescriptor_4c07639536034e04 = []byte{ - // 335 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xc1, 0x4a, 0xeb, 0x40, - 0x14, 0x86, 0x3b, 0xed, 0xbd, 0x85, 0x8c, 0x56, 0x65, 0x10, 0xc9, 0x42, 0x43, 0xa8, 0x88, 0x71, - 0x61, 0x06, 0xf4, 0x09, 0x6a, 0x57, 0xe2, 0x2e, 0xb8, 0x72, 0x53, 0x26, 0xd3, 0xb1, 0x1d, 0x4c, - 0xe7, 0x84, 0xc9, 0x89, 0x9a, 0xb7, 0xf0, 0xb1, 0x5c, 0x76, 0xe9, 0x52, 0xda, 0x07, 0xf0, 0x15, - 0x64, 0xd2, 0x5a, 0x53, 0x70, 0x39, 0x1f, 0xdf, 0x61, 0xfe, 0xff, 0x1c, 0x7a, 0x26, 0xc1, 0x2a, - 0x2e, 0x6d, 0x95, 0x23, 0xf0, 0x17, 0x95, 0x8a, 0x12, 0xa7, 0x86, 0x4b, 0xab, 0xc6, 0xca, 0xa0, - 0x16, 0x59, 0x9c, 0x5b, 0x40, 0x60, 0x87, 0x4e, 0x8b, 0x57, 0x5a, 0xfc, 0xa3, 0xf5, 0xbf, 0x08, - 0xa5, 0xc3, 0x8d, 0xca, 0xf6, 0x68, 0x5b, 0x8f, 0x7d, 0x12, 0x92, 0x68, 0x37, 0x69, 0xeb, 0x31, - 0x3b, 0xa1, 0x34, 0x2f, 0xd3, 0x4c, 0xcb, 0xd1, 0x93, 0xaa, 0xfc, 0x76, 0xcd, 0xbd, 0x15, 0xb9, - 0x53, 0x15, 0xbb, 0xa0, 0x07, 0x02, 0x51, 0x15, 0x28, 0x50, 0x83, 0x19, 0x61, 0x95, 0x2b, 0xbf, - 0x13, 0x92, 0xc8, 0x4b, 0xf6, 0x1b, 0xfc, 0xbe, 0xca, 0x15, 0x3b, 0xa6, 0x1e, 0x5a, 0x61, 0x8a, - 0x1c, 0x2c, 0xfa, 0xff, 0xc2, 0x4e, 0xe4, 0x25, 0xbf, 0x80, 0xdd, 0xd2, 0x9e, 0xcb, 0xe3, 0x52, - 0x48, 0x81, 0x60, 0xfd, 0xff, 0x21, 0x89, 0x76, 0xae, 0x4e, 0xe3, 0xbf, 0x42, 0xc7, 0x83, 0xa6, - 0x9a, 0x6c, 0x4f, 0xb2, 0x80, 0x52, 0x09, 0x06, 0x2d, 0x64, 0x99, 0xb2, 0x7e, 0xb7, 0x4e, 0xd3, - 0x20, 0xfd, 0x47, 0xda, 0xdb, 0x9a, 0x67, 0x47, 0xb4, 0x2b, 0xc4, 0xa4, 0xdc, 0xf4, 0x5e, 0xbf, - 0x5c, 0xf7, 0x42, 0x4f, 0xcc, 0x48, 0x42, 0x69, 0xb0, 0xee, 0xde, 0x4b, 0x3c, 0x47, 0x86, 0x0e, - 0xb8, 0x7f, 0x04, 0xa2, 0x90, 0xd3, 0x99, 0x32, 0xb8, 0x6e, 0xdd, 0x20, 0x37, 0x83, 0xf7, 0x45, - 0x40, 0xe6, 0x8b, 0x80, 0x7c, 0x2e, 0x02, 0xf2, 0xb6, 0x0c, 0x5a, 0xf3, 0x65, 0xd0, 0xfa, 0x58, - 0x06, 0xad, 0x87, 0xf3, 0x89, 0xc6, 0x69, 0x99, 0xc6, 0x12, 0x66, 0xbc, 0x00, 0x63, 0x2f, 0x35, - 0xf0, 0xfa, 0x86, 0xaf, 0xbc, 0x50, 0xf6, 0x59, 0x4b, 0xc5, 0xdd, 0x26, 0x8b, 0xb4, 0x5b, 0x5f, - 0xee, 0xfa, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xdd, 0x7f, 0x9e, 0x5b, 0xe2, 0x01, 0x00, 0x00, + proto.RegisterType((*Credential)(nil), "common.webauthn.Credential") + proto.RegisterType((*Authenticator)(nil), "common.webauthn.Authenticator") +} + +func init() { proto.RegisterFile("common/webauthn/credential.proto", fileDescriptor_9642ee7a70a978ce) } + +var fileDescriptor_9642ee7a70a978ce = []byte{ + // 322 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xb1, 0x4e, 0xeb, 0x30, + 0x14, 0x86, 0xeb, 0xf6, 0xde, 0x4a, 0x31, 0x94, 0x22, 0x0f, 0xc8, 0x03, 0x58, 0x51, 0x07, 0x14, + 0x06, 0x12, 0x09, 0x5e, 0x00, 0x28, 0x1b, 0x5b, 0xc4, 0xc4, 0x52, 0x39, 0xae, 0x69, 0x2d, 0x52, + 0x9f, 0xc8, 0x39, 0x11, 0xca, 0x5b, 0xf0, 0x58, 0x8c, 0x1d, 0x19, 0x51, 0xbb, 0xf1, 0x14, 0xc8, + 0x69, 0x29, 0x29, 0xa3, 0x3f, 0xfd, 0x47, 0xfe, 0xbf, 0x73, 0x68, 0xa8, 0x60, 0xb1, 0x00, 0x9b, + 0xbc, 0xea, 0x4c, 0x56, 0x38, 0xb7, 0x89, 0x72, 0x7a, 0xaa, 0x2d, 0x1a, 0x99, 0xc7, 0x85, 0x03, + 0x04, 0x36, 0xdc, 0x24, 0xe2, 0x9f, 0xc4, 0xe8, 0x8b, 0x50, 0x3a, 0xde, 0xa5, 0xd8, 0x11, 0xed, + 0x9a, 0x29, 0x27, 0x21, 0x89, 0x0e, 0xd3, 0xae, 0x99, 0xb2, 0x33, 0x4a, 0x8b, 0x2a, 0xcb, 0x8d, + 0x9a, 0xbc, 0xe8, 0x9a, 0x77, 0x1b, 0x1e, 0x6c, 0xc8, 0x83, 0xae, 0xd9, 0x05, 0x3d, 0x96, 0x88, + 0xba, 0x44, 0x89, 0x06, 0xec, 0x04, 0xeb, 0x42, 0xf3, 0x5e, 0x48, 0xa2, 0x20, 0x1d, 0xb6, 0xf8, + 0x63, 0x5d, 0x68, 0x76, 0x4a, 0x03, 0x74, 0xd2, 0x96, 0x05, 0x38, 0xe4, 0xff, 0xc2, 0x5e, 0x14, + 0xa4, 0xbf, 0x80, 0xdd, 0xd3, 0x81, 0xef, 0xe3, 0x5b, 0x28, 0x89, 0xe0, 0xf8, 0xff, 0x90, 0x44, + 0x07, 0x57, 0x22, 0xfe, 0xd3, 0x37, 0xbe, 0x6d, 0xa7, 0xd2, 0xfd, 0x21, 0x26, 0x28, 0x55, 0x60, + 0xd1, 0x41, 0x9e, 0x6b, 0xc7, 0xfb, 0x4d, 0x91, 0x16, 0x19, 0x3d, 0xd3, 0xc1, 0xde, 0x3c, 0x3b, + 0xa1, 0x7d, 0x29, 0x67, 0xd5, 0x4e, 0x79, 0xfb, 0xf2, 0xda, 0xa5, 0x99, 0xd9, 0x89, 0x82, 0xca, + 0x62, 0xa3, 0x3d, 0x48, 0x03, 0x4f, 0xc6, 0x1e, 0xf8, 0x7f, 0x24, 0xa2, 0x54, 0xf3, 0x85, 0xb6, + 0xb8, 0x15, 0x6e, 0x91, 0xbb, 0x9b, 0xf7, 0x95, 0x20, 0xcb, 0x95, 0x20, 0x9f, 0x2b, 0x41, 0xde, + 0xd6, 0xa2, 0xb3, 0x5c, 0x8b, 0xce, 0xc7, 0x5a, 0x74, 0x9e, 0xce, 0x67, 0x06, 0xe7, 0x55, 0xe6, + 0xb5, 0x92, 0x12, 0xac, 0xbb, 0x34, 0x90, 0x28, 0x70, 0x3a, 0xf1, 0xab, 0x2b, 0x77, 0x87, 0xcb, + 0xfa, 0xcd, 0xb9, 0xae, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x75, 0x82, 0x71, 0xd2, 0x01, + 0x00, 0x00, } func (m *Credential) Marshal() (dAtA []byte, err error) { diff --git a/x/service/types/ecies.go b/types/webauthn/ecies.go similarity index 99% rename from x/service/types/ecies.go rename to types/webauthn/ecies.go index 1d1976289..b713b979d 100644 --- a/x/service/types/ecies.go +++ b/types/webauthn/ecies.go @@ -1,4 +1,4 @@ -package types +package webauthn import ( "crypto/aes" diff --git a/x/service/types/webauthn.go b/types/webauthn/webauthn.go similarity index 97% rename from x/service/types/webauthn.go rename to types/webauthn/webauthn.go index d8d51bf87..68bc13e0a 100644 --- a/x/service/types/webauthn.go +++ b/types/webauthn/webauthn.go @@ -1,4 +1,4 @@ -package types +package webauthn import ( "encoding/base64" @@ -7,7 +7,7 @@ import ( "github.com/go-webauthn/webauthn/protocol" "github.com/shengdoushi/base58" - "github.com/sonr-io/core/pkg/crypto" + "github.com/sonr-io/core/internal/crypto" ) // PublicKeyMultibase returns the public key in multibase format diff --git a/x/domain/types/genesis.pb.go b/x/domain/types/genesis.pb.go index 9aaa1353a..b10464141 100644 --- a/x/domain/types/genesis.pb.go +++ b/x/domain/types/genesis.pb.go @@ -86,19 +86,19 @@ var fileDescriptor_f3758676deb05ab8 = []byte{ // 236 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xce, 0x2f, 0x4a, 0xd5, 0x4f, 0xc9, 0xcf, 0x4d, 0xcc, 0xcc, 0xd3, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, - 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x06, 0x49, 0xe9, 0x41, 0xa4, 0xa4, 0x44, 0xd2, 0xf3, - 0xd3, 0xf3, 0xc1, 0xe2, 0xfa, 0x20, 0x16, 0x44, 0x89, 0x94, 0x04, 0xb2, 0xee, 0x82, 0xc4, 0xa2, - 0xc4, 0xdc, 0x62, 0x6c, 0x32, 0x45, 0xa9, 0xc9, 0xf9, 0x45, 0x29, 0x10, 0x19, 0xa5, 0x69, 0x8c, - 0x5c, 0x3c, 0xee, 0x10, 0x8b, 0x82, 0x4b, 0x12, 0x4b, 0x52, 0x85, 0x0c, 0xb9, 0xd8, 0x20, 0x5a, - 0x25, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0x84, 0xf5, 0x90, 0x2c, 0xd6, 0x0b, 0x00, 0x4b, 0x39, - 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x04, 0x55, 0x28, 0x14, 0xcc, 0x25, 0x5c, 0x5a, 0x9c, 0x5a, - 0x94, 0x97, 0x98, 0x9b, 0x1a, 0x04, 0x36, 0xbb, 0xd8, 0x27, 0xb3, 0xb8, 0x44, 0x82, 0x49, 0x81, - 0x59, 0x83, 0xdb, 0x48, 0x1a, 0x45, 0x7f, 0x28, 0x8a, 0x3a, 0xa8, 0x39, 0xd8, 0x74, 0x3b, 0x39, - 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, - 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x5a, 0x7a, 0x66, 0x49, 0x46, - 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x71, 0x7e, 0x5e, 0x91, 0x6e, 0x66, 0xbe, 0x3e, 0xd8, - 0x7f, 0x15, 0x30, 0x1f, 0x96, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x7d, 0x68, 0x0c, 0x08, - 0x00, 0x00, 0xff, 0xff, 0x20, 0xa1, 0xef, 0x7c, 0x55, 0x01, 0x00, 0x00, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x06, 0x49, 0xe9, 0x41, 0xa4, 0xa4, 0x24, 0x90, 0xd5, + 0x15, 0x24, 0x16, 0x25, 0xe6, 0x42, 0x95, 0xa1, 0xca, 0x14, 0xa5, 0x26, 0xe7, 0x17, 0xa5, 0x40, + 0x65, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x4c, 0x7d, 0x10, 0x0b, 0x22, 0xaa, 0x34, 0x8d, 0x91, + 0x8b, 0xc7, 0x1d, 0x62, 0x51, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x21, 0x17, 0x1b, 0xc4, 0x40, + 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x61, 0x3d, 0x24, 0x8b, 0xf5, 0x02, 0xc0, 0x52, 0x4e, + 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x41, 0x15, 0x0a, 0x05, 0x73, 0x09, 0x97, 0x16, 0xa7, 0x16, + 0xe5, 0x25, 0xe6, 0xa6, 0x06, 0x81, 0x6d, 0x2c, 0xf6, 0xc9, 0x2c, 0x2e, 0x91, 0x60, 0x52, 0x60, + 0xd6, 0xe0, 0x36, 0x92, 0x46, 0xd1, 0x1f, 0x8a, 0xa2, 0x0e, 0x6a, 0x0e, 0x36, 0xdd, 0x4e, 0x0e, + 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, + 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x96, 0x9e, 0x59, 0x92, 0x51, + 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x5f, 0x9c, 0x9f, 0x57, 0xa4, 0x9b, 0x99, 0xaf, 0x0f, 0xf6, + 0x75, 0x05, 0xcc, 0xdf, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0x1f, 0x1a, 0x03, 0x02, + 0x00, 0x00, 0xff, 0xff, 0xf9, 0x44, 0xcf, 0xaf, 0x55, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/domain/types/keys.go b/x/domain/types/keys.go index 2e2f3f22a..ed14b783b 100644 --- a/x/domain/types/keys.go +++ b/x/domain/types/keys.go @@ -1,7 +1,7 @@ package types import ( - "github.com/sonr-io/core/pkg/crypto" + "github.com/sonr-io/core/internal/crypto" "lukechampine.com/blake3" ) diff --git a/x/domain/types/query.pb.go b/x/domain/types/query.pb.go index 063c2b0b4..6fd99c0bc 100644 --- a/x/domain/types/query.pb.go +++ b/x/domain/types/query.pb.go @@ -321,38 +321,38 @@ func init() { func init() { proto.RegisterFile("core/domain/query.proto", fileDescriptor_8b7084fe185c90ac) } var fileDescriptor_8b7084fe185c90ac = []byte{ - // 495 bytes of a gzipped FileDescriptorProto + // 496 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcf, 0x6b, 0x13, 0x41, 0x14, 0xc7, 0xb3, 0xad, 0x0d, 0x38, 0x05, 0xc5, 0x49, 0x4a, 0x4b, 0x6a, 0x37, 0x65, 0xc0, 0x2a, 0xfe, 0x98, 0x21, 0x15, 0x3c, 0xdb, 0x1e, 0xac, 0xe0, 0xa5, 0x2e, 0x78, 0xf1, 0x36, 0x49, 0x86, 0xcd, 0xc2, 0xee, 0xbc, 0xed, 0xcc, 0x44, 0x5a, 0xc4, 0x8b, 0x77, 0x41, 0x14, 0xfc, 0x57, 0xfc, 0x17, 0x7a, 0x0c, 0x78, 0xf1, 0x24, 0x92, 0xf8, 0x87, 0x48, 0x66, 0x26, 0x98, 0x31, 0xbb, 0x2a, - 0xde, 0x76, 0xe7, 0x7d, 0xdf, 0xf7, 0x7d, 0xde, 0xbc, 0xc7, 0xa0, 0xed, 0x01, 0x28, 0xc1, 0x86, + 0xde, 0x26, 0xf3, 0xbe, 0xef, 0xfb, 0x3e, 0x6f, 0xde, 0xcb, 0xa2, 0xed, 0x01, 0x28, 0xc1, 0x86, 0x50, 0xf0, 0x4c, 0xb2, 0xb3, 0xb1, 0x50, 0x17, 0xb4, 0x54, 0x60, 0x00, 0x6f, 0xce, 0x03, 0xd4, - 0x05, 0x3a, 0xed, 0x14, 0x52, 0xb0, 0xe7, 0x6c, 0xfe, 0xe5, 0x24, 0x9d, 0x9b, 0x29, 0x40, 0x9a, - 0x0b, 0xc6, 0xcb, 0x8c, 0x71, 0x29, 0xc1, 0x70, 0x93, 0x81, 0xd4, 0x3e, 0x7a, 0x77, 0x00, 0xba, - 0x00, 0xcd, 0xfa, 0x5c, 0x0b, 0xe7, 0xcc, 0x5e, 0xf5, 0xfa, 0xc2, 0xf0, 0x1e, 0x2b, 0x79, 0x9a, - 0x49, 0x2b, 0xf6, 0xda, 0x9d, 0x65, 0x8a, 0x92, 0x2b, 0x5e, 0xe8, 0xaa, 0x88, 0x12, 0x03, 0x50, - 0x43, 0x17, 0x21, 0x6d, 0x84, 0x9f, 0xcf, 0x5d, 0x4f, 0xad, 0x3c, 0x11, 0x67, 0x63, 0xa1, 0x0d, - 0x79, 0x8a, 0x5a, 0xc1, 0xa9, 0x2e, 0x41, 0x6a, 0x81, 0x7b, 0xa8, 0xe9, 0x6c, 0x77, 0xa2, 0xfd, + 0x05, 0x3a, 0x3b, 0xcb, 0xaa, 0x92, 0x2b, 0x5e, 0x68, 0x27, 0x0b, 0x23, 0x4a, 0x0c, 0x40, 0x0d, + 0x7d, 0xe4, 0xee, 0x00, 0x74, 0x01, 0x9a, 0xf5, 0xb9, 0x16, 0xce, 0x99, 0xbd, 0xea, 0xf5, 0x85, + 0xe1, 0x3d, 0x56, 0xf2, 0x34, 0x93, 0xdc, 0x64, 0x20, 0xbd, 0xb6, 0x9d, 0x42, 0x0a, 0xf6, 0xc8, + 0xe6, 0x27, 0x7f, 0x7b, 0x33, 0x05, 0x48, 0x73, 0xc1, 0x78, 0x99, 0x31, 0x2e, 0x25, 0x18, 0x9b, + 0xe2, 0x2b, 0x93, 0x36, 0xc2, 0xcf, 0xe7, 0xae, 0xa7, 0x16, 0x27, 0x11, 0x67, 0x63, 0xa1, 0x0d, + 0x79, 0x8a, 0x5a, 0xc1, 0xad, 0x2e, 0x41, 0x6a, 0x81, 0x7b, 0xa8, 0xe9, 0xb0, 0x77, 0xa2, 0xfd, 0xe8, 0xce, 0xe6, 0x61, 0x8b, 0x2e, 0xb5, 0x47, 0x9d, 0xf8, 0xf8, 0xca, 0xe5, 0xb7, 0x6e, 0x23, 0xf1, 0x42, 0xf2, 0x08, 0xc5, 0xd6, 0xe9, 0x44, 0x98, 0x17, 0x5a, 0x28, 0xc9, 0x0b, 0x91, 0xd8, - 0xfa, 0x8b, 0x5a, 0xb8, 0x8d, 0x36, 0x32, 0x39, 0x14, 0xe7, 0xd6, 0xf3, 0x6a, 0xe2, 0x7e, 0x88, - 0x44, 0xdd, 0xda, 0x3c, 0x4f, 0xf3, 0x0c, 0x5d, 0x1f, 0x87, 0x21, 0x8f, 0xb5, 0x1b, 0x60, 0x85, - 0xe9, 0x1e, 0xef, 0xf7, 0x4c, 0x32, 0xf2, 0x9c, 0x47, 0x79, 0x5e, 0xc3, 0xf9, 0x04, 0xa1, 0x5f, - 0x37, 0xee, 0x2b, 0x1d, 0x50, 0x37, 0x1e, 0x3a, 0x1f, 0x0f, 0x75, 0x83, 0xf7, 0xe3, 0xa1, 0xa7, - 0x3c, 0x15, 0x3e, 0x37, 0x59, 0xca, 0x24, 0x9f, 0x23, 0xdf, 0x5a, 0x55, 0xa9, 0x3f, 0xb5, 0xb6, - 0xfe, 0x7f, 0xad, 0xe1, 0x93, 0x00, 0x7c, 0xcd, 0x82, 0xdf, 0xfe, 0x2b, 0xb8, 0x23, 0x59, 0x26, - 0x3f, 0xfc, 0xb4, 0x8e, 0x36, 0x2c, 0x39, 0x1e, 0xa1, 0xa6, 0x9b, 0x36, 0xee, 0x06, 0x40, 0xab, - 0xab, 0xd4, 0xd9, 0xaf, 0x17, 0xb8, 0x12, 0x64, 0xf7, 0xed, 0x97, 0x1f, 0x1f, 0xd7, 0xb6, 0x70, - 0x8b, 0xad, 0xee, 0x2f, 0xfe, 0x10, 0xa1, 0x6b, 0x61, 0x9b, 0xf8, 0xde, 0xaa, 0x63, 0xed, 0x76, - 0x75, 0xee, 0xff, 0x9b, 0xd8, 0xa3, 0xdc, 0xb2, 0x28, 0x5d, 0xbc, 0x17, 0xa0, 0x2c, 0x2e, 0x94, - 0xbd, 0xb6, 0xbb, 0xf9, 0x06, 0xbf, 0x8b, 0xd0, 0x8d, 0xd0, 0xe2, 0x28, 0xcf, 0xab, 0xb8, 0x6a, - 0xb7, 0xa9, 0x8a, 0xab, 0x7e, 0x1f, 0xc8, 0x9e, 0xe5, 0xda, 0xc6, 0x5b, 0x95, 0x5c, 0xc7, 0x8f, - 0x2f, 0xa7, 0x71, 0x34, 0x99, 0xc6, 0xd1, 0xf7, 0x69, 0x1c, 0xbd, 0x9f, 0xc5, 0x8d, 0xc9, 0x2c, - 0x6e, 0x7c, 0x9d, 0xc5, 0x8d, 0x97, 0x07, 0x69, 0x66, 0x46, 0xe3, 0x3e, 0x1d, 0x40, 0xc1, 0x34, - 0x48, 0xf5, 0x20, 0x03, 0x67, 0x71, 0xbe, 0x30, 0x31, 0x17, 0xa5, 0xd0, 0xfd, 0xa6, 0x7d, 0x0d, - 0x1e, 0xfe, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x8f, 0xa9, 0xd3, 0x42, 0xc9, 0x04, 0x00, 0x00, + 0xfe, 0x16, 0xb5, 0x70, 0x1b, 0x6d, 0x64, 0x72, 0x28, 0xce, 0xad, 0xe7, 0xd5, 0xc4, 0xfd, 0x20, + 0x12, 0x75, 0x6b, 0xf3, 0x3c, 0xcd, 0x33, 0x74, 0x7d, 0x1c, 0x86, 0x3c, 0xd6, 0x6e, 0x80, 0x15, + 0xa6, 0x7b, 0xbc, 0xdf, 0x33, 0xc9, 0xc8, 0x73, 0x1e, 0xe5, 0x79, 0x0d, 0xe7, 0x13, 0x84, 0x7e, + 0xbd, 0xb8, 0xaf, 0x74, 0x40, 0xdd, 0x78, 0xe8, 0x7c, 0x3c, 0xd4, 0x0d, 0xde, 0x8f, 0x87, 0x9e, + 0xf2, 0x54, 0xf8, 0xdc, 0x64, 0x29, 0x93, 0x7c, 0x8e, 0x7c, 0x6b, 0x55, 0xa5, 0xfe, 0xd4, 0xda, + 0xfa, 0xff, 0xb5, 0x86, 0x4f, 0x02, 0xf0, 0x35, 0x0b, 0x7e, 0xfb, 0xaf, 0xe0, 0x8e, 0x64, 0x99, + 0xfc, 0xf0, 0xd3, 0x3a, 0xda, 0xb0, 0xe4, 0x78, 0x84, 0x9a, 0x6e, 0xda, 0xb8, 0x1b, 0x00, 0xad, + 0xae, 0x52, 0x67, 0xbf, 0x5e, 0xe0, 0x4a, 0x90, 0xdd, 0xb7, 0x5f, 0x7e, 0x7c, 0x5c, 0xdb, 0xc2, + 0x2d, 0xb6, 0xfa, 0xff, 0xc0, 0x1f, 0x22, 0x74, 0x2d, 0x6c, 0x13, 0xdf, 0x5b, 0x75, 0xac, 0xdd, + 0xae, 0xce, 0xfd, 0x7f, 0x13, 0x7b, 0x94, 0x5b, 0x16, 0xa5, 0x8b, 0xf7, 0x02, 0x94, 0xc5, 0x83, + 0xb2, 0xd7, 0x76, 0x37, 0xdf, 0xe0, 0x77, 0x11, 0xba, 0x11, 0x5a, 0x1c, 0xe5, 0x79, 0x15, 0x57, + 0xed, 0x36, 0x55, 0x71, 0xd5, 0xef, 0x03, 0xd9, 0xb3, 0x5c, 0xdb, 0x78, 0xab, 0x92, 0xeb, 0xf8, + 0xf1, 0xe5, 0x34, 0x8e, 0x26, 0xd3, 0x38, 0xfa, 0x3e, 0x8d, 0xa3, 0xf7, 0xb3, 0xb8, 0x31, 0x99, + 0xc5, 0x8d, 0xaf, 0xb3, 0xb8, 0xf1, 0xf2, 0x20, 0xcd, 0xcc, 0x68, 0xdc, 0xa7, 0x03, 0x28, 0x98, + 0x06, 0xa9, 0x1e, 0x64, 0xe0, 0x2c, 0xce, 0x17, 0x26, 0xe6, 0xa2, 0x14, 0xba, 0xdf, 0xb4, 0x5f, + 0x83, 0x87, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x13, 0x1f, 0xea, 0x75, 0xc9, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/identity/client/cli/query.go b/x/identity/client/cli/query.go index 050225a0d..e939e991f 100644 --- a/x/identity/client/cli/query.go +++ b/x/identity/client/cli/query.go @@ -29,8 +29,6 @@ func GetQueryCmd(queryRoute string) *cobra.Command { cmd.AddCommand(CmdShowDIDDocument()) cmd.AddCommand(CmdListControllerAccount()) cmd.AddCommand(CmdShowControllerAccount()) - cmd.AddCommand(CmdListEscrowAccount()) - cmd.AddCommand(CmdShowEscrowAccount()) // this line is used by starport scaffolding # 1 return cmd diff --git a/x/identity/client/cli/query_escrow_account.go b/x/identity/client/cli/query_escrow_account.go deleted file mode 100644 index 34f78eb9b..000000000 --- a/x/identity/client/cli/query_escrow_account.go +++ /dev/null @@ -1,76 +0,0 @@ -package cli - -import ( - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/sonr-io/core/x/identity/types" - "github.com/spf13/cobra" -) - -func CmdListEscrowAccount() *cobra.Command { - cmd := &cobra.Command{ - Use: "list-escrow-account", - Short: "list all escrowAccount", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - pageReq, err := client.ReadPageRequest(cmd.Flags()) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryAllEscrowAccountRequest{ - Pagination: pageReq, - } - - res, err := queryClient.EscrowAccountAll(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddPaginationFlagsToCmd(cmd, cmd.Use) - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -func CmdShowEscrowAccount() *cobra.Command { - cmd := &cobra.Command{ - Use: "show-escrow-account [id]", - Short: "shows a escrowAccount", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - - queryClient := types.NewQueryClient(clientCtx) - - addr := args[0] - params := &types.QueryGetEscrowAccountRequest{ - Address: addr, - } - - res, err := queryClient.EscrowAccount(cmd.Context(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/identity/client/cli/tx.go b/x/identity/client/cli/tx.go index 81bf913ab..8b3798d0a 100644 --- a/x/identity/client/cli/tx.go +++ b/x/identity/client/cli/tx.go @@ -32,9 +32,6 @@ func GetTxCmd() *cobra.Command { cmd.AddCommand(CmdCreateControllerAccount()) cmd.AddCommand(CmdUpdateControllerAccount()) cmd.AddCommand(CmdDeleteControllerAccount()) - cmd.AddCommand(CmdCreateEscrowAccount()) - cmd.AddCommand(CmdUpdateEscrowAccount()) - cmd.AddCommand(CmdDeleteEscrowAccount()) // this line is used by starport scaffolding # 1 return cmd diff --git a/x/identity/client/cli/tx_escrow_account.go b/x/identity/client/cli/tx_escrow_account.go deleted file mode 100644 index ee5da515f..000000000 --- a/x/identity/client/cli/tx_escrow_account.go +++ /dev/null @@ -1,100 +0,0 @@ -package cli - -import ( - "strconv" - - "github.com/cosmos/cosmos-sdk/client" - "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/cosmos/cosmos-sdk/client/tx" - "github.com/sonr-io/core/x/identity/types" - "github.com/spf13/cobra" -) - -func CmdCreateEscrowAccount() *cobra.Command { - cmd := &cobra.Command{ - Use: "create-escrow-account [address] [public-key] [lockup-usd-balance]", - Short: "Create a new escrowAccount", - Args: cobra.ExactArgs(3), - RunE: func(cmd *cobra.Command, args []string) (err error) { - argAddress := args[0] - argPublicKey := args[1] - argLockupUsdBalance := args[2] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgCreateEscrowAccount(clientCtx.GetFromAddress().String(), argAddress, argPublicKey, argLockupUsdBalance) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} - -func CmdUpdateEscrowAccount() *cobra.Command { - cmd := &cobra.Command{ - Use: "update-escrow-account [id] [address] [public-key] [lockup-usd-balance]", - Short: "Update a escrowAccount", - Args: cobra.ExactArgs(4), - RunE: func(cmd *cobra.Command, args []string) (err error) { - id, err := strconv.ParseUint(args[0], 10, 64) - if err != nil { - return err - } - - argAddress := args[1] - - argPublicKey := args[2] - - argLockupUsdBalance := args[3] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgUpdateEscrowAccount(clientCtx.GetFromAddress().String(), id, argAddress, argPublicKey, argLockupUsdBalance) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} - -func CmdDeleteEscrowAccount() *cobra.Command { - cmd := &cobra.Command{ - Use: "delete-escrow-account [id]", - Short: "Delete a escrowAccount by id", - Args: cobra.ExactArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - addr := args[0] - - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - msg := types.NewMsgDeleteEscrowAccount(clientCtx.GetFromAddress().String(), addr) - if err := msg.ValidateBasic(); err != nil { - return err - } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} diff --git a/x/identity/genesis.go b/x/identity/genesis.go index 754d5f0f2..e219fe643 100644 --- a/x/identity/genesis.go +++ b/x/identity/genesis.go @@ -19,25 +19,6 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) // Set controllerAccount count k.SetControllerAccountCount(ctx, genState.ControllerAccountCount) - // Set all the escrowAccount - for _, elem := range genState.EscrowAccountList { - k.SetEscrowAccount(ctx, elem) - } - - // Set escrowAccount count - k.SetEscrowAccountCount(ctx, genState.EscrowAccountCount) - // this line is used by starport scaffolding # genesis/module/init - k.SetPort(ctx, genState.PortId) - // Only try to bind to port if it is not already bound, since we may already own - // port capability from capability InitGenesis - if !k.IsBound(ctx, genState.PortId) { - // module binds to the port on InitChain - // and claims the returned capability - err := k.BindPort(ctx, genState.PortId) - if err != nil { - panic("could not claim port capability: " + err.Error()) - } - } k.SetParams(ctx, genState.Params) } @@ -46,12 +27,10 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { genesis := types.DefaultGenesis() genesis.Params = k.GetParams(ctx) - genesis.PortId = k.GetPort(ctx) genesis.DIDDocumentList = k.GetAllDIDDocument(ctx) genesis.ControllerAccountList = k.GetAllControllerAccount(ctx) genesis.ControllerAccountCount = k.GetControllerAccountCount(ctx) - genesis.EscrowAccountList = k.GetAllEscrowAccount(ctx) - genesis.EscrowAccountCount = k.GetEscrowAccountCount(ctx) + // this line is used by starport scaffolding # genesis/module/export return genesis diff --git a/x/identity/genesis_test.go b/x/identity/genesis_test.go index dffb810e8..70f6d26e1 100644 --- a/x/identity/genesis_test.go +++ b/x/identity/genesis_test.go @@ -32,15 +32,6 @@ func TestGenesis(t *testing.T) { }, }, ControllerAccountCount: 2, - EscrowAccountList: []types.EscrowAccount{ - { - Id: 0, - }, - { - Id: 1, - }, - }, - EscrowAccountCount: 2, // this line is used by starport scaffolding # genesis/test/state } @@ -55,7 +46,5 @@ func TestGenesis(t *testing.T) { require.ElementsMatch(t, genesisState.DIDDocumentList, got.DIDDocumentList) require.ElementsMatch(t, genesisState.ControllerAccountList, got.ControllerAccountList) require.Equal(t, genesisState.ControllerAccountCount, got.ControllerAccountCount) - require.ElementsMatch(t, genesisState.EscrowAccountList, got.EscrowAccountList) - require.Equal(t, genesisState.EscrowAccountCount, got.EscrowAccountCount) // this line is used by starport scaffolding # genesis/test/assert } diff --git a/x/identity/keeper/genesis.go b/x/identity/keeper/genesis.go index 4e3bcea73..bf109884a 100644 --- a/x/identity/keeper/genesis.go +++ b/x/identity/keeper/genesis.go @@ -208,47 +208,3 @@ func (k Keeper) SetEscrowAccountCount(ctx sdk.Context, count uint64) { binary.BigEndian.PutUint64(bz, count) store.Set(byteKey, bz) } - -// SetEscrowAccount set a specific escrowAccount in the store -func (k Keeper) SetEscrowAccount(ctx sdk.Context, escrowAccount types.EscrowAccount) uint64 { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.EscrowAccountKeyPrefix)) - b := k.cdc.MustMarshal(&escrowAccount) - count := k.GetEscrowAccountCount(ctx) - escrowAccount.Id = count - store.Set(types.EscrowAccountKey(escrowAccount.Address), b) - k.SetEscrowAccountCount(ctx, count+1) - return count -} - -// GetEscrowAccount returns a escrowAccount from its id -func (k Keeper) GetEscrowAccount(ctx sdk.Context, address string) (val types.EscrowAccount, found bool) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.EscrowAccountKeyPrefix)) - b := store.Get(types.EscrowAccountKey(address)) - if b == nil { - return val, false - } - k.cdc.MustUnmarshal(b, &val) - return val, true -} - -// RemoveEscrowAccount removes a escrowAccount from the store -func (k Keeper) RemoveEscrowAccount(ctx sdk.Context, address string) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.EscrowAccountKeyPrefix)) - store.Delete(types.EscrowAccountKey(address)) -} - -// GetAllEscrowAccount returns all escrowAccount -func (k Keeper) GetAllEscrowAccount(ctx sdk.Context) (list []types.EscrowAccount) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefix(types.EscrowAccountKeyPrefix)) - iterator := sdk.KVStorePrefixIterator(store, []byte{}) - - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - var val types.EscrowAccount - k.cdc.MustUnmarshal(iterator.Value(), &val) - list = append(list, val) - } - - return -} diff --git a/x/identity/keeper/msg_server.go b/x/identity/keeper/msg_server.go index 61f619182..af352a935 100644 --- a/x/identity/keeper/msg_server.go +++ b/x/identity/keeper/msg_server.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/sonr-io/core/pkg/crypto" + "github.com/sonr-io/core/internal/crypto" "github.com/sonr-io/core/x/identity/types" ) @@ -53,72 +53,6 @@ func (k Keeper) RegisterIdentity(goCtx context.Context, msg *types.MsgRegisterId }, nil } -func (k msgServer) CreateEscrowAccount(goCtx context.Context, msg *types.MsgCreateEscrowAccount) (*types.MsgCreateEscrowAccountResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - var escrowAccount = types.EscrowAccount{ - Creator: msg.Creator, - Address: msg.Address, - PublicKey: msg.PublicKey, - LockupUsdBalance: msg.LockupUsdBalance, - } - - id := k.SetEscrowAccount( - ctx, - escrowAccount, - ) - - return &types.MsgCreateEscrowAccountResponse{ - Id: id, - }, nil -} - -func (k msgServer) UpdateEscrowAccount(goCtx context.Context, msg *types.MsgUpdateEscrowAccount) (*types.MsgUpdateEscrowAccountResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - var escrowAccount = types.EscrowAccount{ - Creator: msg.Creator, - Id: msg.Id, - Address: msg.Address, - PublicKey: msg.PublicKey, - LockupUsdBalance: msg.LockupUsdBalance, - } - - // Checks that the element exists - val, found := k.GetEscrowAccount(ctx, msg.Address) - if !found { - return nil, sdkerrors.Wrap(sdkerrors.ErrKeyNotFound, fmt.Sprintf("key %d doesn't exist", msg.Id)) - } - - // Checks if the msg creator is the same as the current owner - if msg.Creator != val.Creator { - return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "incorrect owner") - } - - k.SetEscrowAccount(ctx, escrowAccount) - - return &types.MsgUpdateEscrowAccountResponse{}, nil -} - -func (k msgServer) DeleteEscrowAccount(goCtx context.Context, msg *types.MsgDeleteEscrowAccount) (*types.MsgDeleteEscrowAccountResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - // Checks that the element exists - val, found := k.GetEscrowAccount(ctx, msg.Address) - if !found { - return nil, sdkerrors.Wrap(sdkerrors.ErrKeyNotFound, fmt.Sprintf("key %s doesn't exist", msg.Address)) - } - - // Checks if the msg creator is the same as the current owner - if msg.Creator != val.Creator { - return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "incorrect owner") - } - - k.RemoveEscrowAccount(ctx, msg.Address) - - return &types.MsgDeleteEscrowAccountResponse{}, nil -} - func (k msgServer) CreateControllerAccount(goCtx context.Context, msg *types.MsgCreateControllerAccount) (*types.MsgCreateControllerAccountResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) diff --git a/x/identity/keeper/query.go b/x/identity/keeper/query.go index 152a19b9d..130d27cc0 100644 --- a/x/identity/keeper/query.go +++ b/x/identity/keeper/query.go @@ -146,45 +146,3 @@ func (k Keeper) ControllerAccount(goCtx context.Context, req *types.QueryGetCont return &types.QueryGetControllerAccountResponse{ControllerAccount: controllerAccount}, nil } - -func (k Keeper) EscrowAccountAll(goCtx context.Context, req *types.QueryAllEscrowAccountRequest) (*types.QueryAllEscrowAccountResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - var escrowAccounts []types.EscrowAccount - ctx := sdk.UnwrapSDKContext(goCtx) - - store := ctx.KVStore(k.storeKey) - escrowAccountStore := prefix.NewStore(store, types.KeyPrefix(types.EscrowAccountKeyPrefix)) - - pageRes, err := query.Paginate(escrowAccountStore, req.Pagination, func(key []byte, value []byte) error { - var escrowAccount types.EscrowAccount - if err := k.cdc.Unmarshal(value, &escrowAccount); err != nil { - return err - } - - escrowAccounts = append(escrowAccounts, escrowAccount) - return nil - }) - - if err != nil { - return nil, status.Error(codes.Internal, err.Error()) - } - - return &types.QueryAllEscrowAccountResponse{EscrowAccount: escrowAccounts, Pagination: pageRes}, nil -} - -func (k Keeper) EscrowAccount(goCtx context.Context, req *types.QueryGetEscrowAccountRequest) (*types.QueryGetEscrowAccountResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - ctx := sdk.UnwrapSDKContext(goCtx) - escrowAccount, found := k.GetEscrowAccount(ctx, req.Address) - if !found { - return nil, sdkerrors.ErrKeyNotFound - } - - return &types.QueryGetEscrowAccountResponse{EscrowAccount: escrowAccount}, nil -} diff --git a/x/identity/module.go b/x/identity/module.go index e55f88026..f1360b8e0 100644 --- a/x/identity/module.go +++ b/x/identity/module.go @@ -17,7 +17,6 @@ import ( cdctypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" "github.com/sonr-io/core/x/identity/client/cli" "github.com/sonr-io/core/x/identity/keeper" "github.com/sonr-io/core/x/identity/types" @@ -26,7 +25,6 @@ import ( var ( _ module.AppModule = AppModule{} _ module.AppModuleBasic = AppModuleBasic{} - _ porttypes.IBCModule = IBCModule{} ) // ---------------------------------------------------------------------------- diff --git a/x/identity/module_ibc.go b/x/identity/module_ibc.go deleted file mode 100644 index f0132486d..000000000 --- a/x/identity/module_ibc.go +++ /dev/null @@ -1,239 +0,0 @@ -package identity - -import ( - "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - capabilitytypes "github.com/cosmos/cosmos-sdk/x/capability/types" - channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" - porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" - host "github.com/cosmos/ibc-go/v7/modules/core/24-host" - ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - "github.com/sonr-io/core/x/identity/keeper" - "github.com/sonr-io/core/x/identity/types" -) - -type IBCModule struct { - keeper keeper.Keeper -} - -func NewIBCModule(k keeper.Keeper) IBCModule { - return IBCModule{ - keeper: k, - } -} - -// OnChanOpenInit implements the IBCModule interface -func (im IBCModule) OnChanOpenInit( - ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID string, - channelID string, - chanCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - version string, -) (string, error) { - - // Require portID is the portID module is bound to - boundPort := im.keeper.GetPort(ctx) - if boundPort != portID { - return "", sdkerrors.Wrapf(porttypes.ErrInvalidPort, "invalid port: %s, expected %s", portID, boundPort) - } - - if version != types.Version { - return "", sdkerrors.Wrapf(types.ErrInvalidVersion, "got %s, expected %s", version, types.Version) - } - - // Claim channel capability passed back by IBC module - if err := im.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { - return "", err - } - - return version, nil -} - -// OnChanOpenTry implements the IBCModule interface -func (im IBCModule) OnChanOpenTry( - ctx sdk.Context, - order channeltypes.Order, - connectionHops []string, - portID, - channelID string, - chanCap *capabilitytypes.Capability, - counterparty channeltypes.Counterparty, - counterpartyVersion string, -) (string, error) { - - // Require portID is the portID module is bound to - boundPort := im.keeper.GetPort(ctx) - if boundPort != portID { - return "", sdkerrors.Wrapf(porttypes.ErrInvalidPort, "invalid port: %s, expected %s", portID, boundPort) - } - - if counterpartyVersion != types.Version { - return "", sdkerrors.Wrapf(types.ErrInvalidVersion, "invalid counterparty version: got: %s, expected %s", counterpartyVersion, types.Version) - } - - // Module may have already claimed capability in OnChanOpenInit in the case of crossing hellos - // (ie chainA and chainB both call ChanOpenInit before one of them calls ChanOpenTry) - // If module can already authenticate the capability then module already owns it so we don't need to claim - // Otherwise, module does not have channel capability and we must claim it from IBC - if !im.keeper.AuthenticateCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)) { - // Only claim channel capability passed back by IBC module if we do not already own it - if err := im.keeper.ClaimCapability(ctx, chanCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { - return "", err - } - } - - return types.Version, nil -} - -// OnChanOpenAck implements the IBCModule interface -func (im IBCModule) OnChanOpenAck( - ctx sdk.Context, - portID, - channelID string, - _, - counterpartyVersion string, -) error { - if counterpartyVersion != types.Version { - return sdkerrors.Wrapf(types.ErrInvalidVersion, "invalid counterparty version: %s, expected %s", counterpartyVersion, types.Version) - } - return nil -} - -// OnChanOpenConfirm implements the IBCModule interface -func (im IBCModule) OnChanOpenConfirm( - ctx sdk.Context, - portID, - channelID string, -) error { - return nil -} - -// OnChanCloseInit implements the IBCModule interface -func (im IBCModule) OnChanCloseInit( - ctx sdk.Context, - portID, - channelID string, -) error { - // Disallow user-initiated channel closing for channels - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "user cannot close channel") -} - -// OnChanCloseConfirm implements the IBCModule interface -func (im IBCModule) OnChanCloseConfirm( - ctx sdk.Context, - portID, - channelID string, -) error { - return nil -} - -// OnRecvPacket implements the IBCModule interface -func (im IBCModule) OnRecvPacket( - ctx sdk.Context, - modulePacket channeltypes.Packet, - relayer sdk.AccAddress, -) ibcexported.Acknowledgement { - var ack channeltypes.Acknowledgement - - // this line is used by starport scaffolding # oracle/packet/module/recv - - var modulePacketData types.IdentityPacketData - if err := modulePacketData.Unmarshal(modulePacket.GetData()); err != nil { - return channeltypes.NewErrorAcknowledgement(sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal packet data: %s", err.Error())) - } - - // Dispatch packet - switch packet := modulePacketData.Packet.(type) { - // this line is used by starport scaffolding # ibc/packet/module/recv - default: - err := fmt.Errorf("unrecognized %s packet type: %T", types.ModuleName, packet) - return channeltypes.NewErrorAcknowledgement(err) - } - - // NOTE: acknowledgement will be written synchronously during IBC handler execution. - return ack -} - -// OnAcknowledgementPacket implements the IBCModule interface -func (im IBCModule) OnAcknowledgementPacket( - ctx sdk.Context, - modulePacket channeltypes.Packet, - acknowledgement []byte, - relayer sdk.AccAddress, -) error { - var ack channeltypes.Acknowledgement - if err := types.ModuleCdc.UnmarshalJSON(acknowledgement, &ack); err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal packet acknowledgement: %v", err) - } - - // this line is used by starport scaffolding # oracle/packet/module/ack - - var modulePacketData types.IdentityPacketData - if err := modulePacketData.Unmarshal(modulePacket.GetData()); err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal packet data: %s", err.Error()) - } - - var eventType string - - // Dispatch packet - switch packet := modulePacketData.Packet.(type) { - // this line is used by starport scaffolding # ibc/packet/module/ack - default: - errMsg := fmt.Sprintf("unrecognized %s packet type: %T", types.ModuleName, packet) - return sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, errMsg) - } - - ctx.EventManager().EmitEvent( - sdk.NewEvent( - eventType, - sdk.NewAttribute(sdk.AttributeKeyModule, types.ModuleName), - sdk.NewAttribute(types.AttributeKeyAck, fmt.Sprintf("%v", ack)), - ), - ) - - switch resp := ack.Response.(type) { - case *channeltypes.Acknowledgement_Result: - ctx.EventManager().EmitEvent( - sdk.NewEvent( - eventType, - sdk.NewAttribute(types.AttributeKeyAckSuccess, string(resp.Result)), - ), - ) - case *channeltypes.Acknowledgement_Error: - ctx.EventManager().EmitEvent( - sdk.NewEvent( - eventType, - sdk.NewAttribute(types.AttributeKeyAckError, resp.Error), - ), - ) - } - - return nil -} - -// OnTimeoutPacket implements the IBCModule interface -func (im IBCModule) OnTimeoutPacket( - ctx sdk.Context, - modulePacket channeltypes.Packet, - relayer sdk.AccAddress, -) error { - var modulePacketData types.IdentityPacketData - if err := modulePacketData.Unmarshal(modulePacket.GetData()); err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "cannot unmarshal packet data: %s", err.Error()) - } - - // Dispatch packet - switch packet := modulePacketData.Packet.(type) { - // this line is used by starport scaffolding # ibc/packet/module/timeout - default: - errMsg := fmt.Sprintf("unrecognized %s packet type: %T", types.ModuleName, packet) - return sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, errMsg) - } - - return nil -} diff --git a/x/identity/module_simulation.go b/x/identity/module_simulation.go index dda5b8deb..20635f7cd 100644 --- a/x/identity/module_simulation.go +++ b/x/identity/module_simulation.go @@ -70,7 +70,6 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { } identityGenesis := types.GenesisState{ Params: types.DefaultParams(), - PortId: types.PortID, DIDDocumentList: []types.DIDDocument{ { Id: sample.AccAddress(), @@ -90,17 +89,6 @@ func (AppModule) GenerateGenesisState(simState *module.SimulationState) { }, }, ControllerAccountCount: 2, - EscrowAccountList: []types.EscrowAccount{ - { - Id: 0, - Creator: sample.AccAddress(), - }, - { - Id: 1, - Creator: sample.AccAddress(), - }, - }, - EscrowAccountCount: 2, // this line is used by starport scaffolding # simapp/module/genesisState } simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(&identityGenesis) @@ -184,39 +172,6 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp identitysimulation.SimulateMsgDeleteControllerAccount(am.accountKeeper, am.bankKeeper, am.keeper), )) - var weightMsgCreateEscrowAccount int - simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgCreateEscrowAccount, &weightMsgCreateEscrowAccount, nil, - func(_ *rand.Rand) { - weightMsgCreateEscrowAccount = defaultWeightMsgCreateEscrowAccount - }, - ) - operations = append(operations, simulation.NewWeightedOperation( - weightMsgCreateEscrowAccount, - identitysimulation.SimulateMsgCreateEscrowAccount(am.accountKeeper, am.bankKeeper, am.keeper), - )) - - var weightMsgUpdateEscrowAccount int - simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgUpdateEscrowAccount, &weightMsgUpdateEscrowAccount, nil, - func(_ *rand.Rand) { - weightMsgUpdateEscrowAccount = defaultWeightMsgUpdateEscrowAccount - }, - ) - operations = append(operations, simulation.NewWeightedOperation( - weightMsgUpdateEscrowAccount, - identitysimulation.SimulateMsgUpdateEscrowAccount(am.accountKeeper, am.bankKeeper, am.keeper), - )) - - var weightMsgDeleteEscrowAccount int - simState.AppParams.GetOrGenerate(simState.Cdc, opWeightMsgDeleteEscrowAccount, &weightMsgDeleteEscrowAccount, nil, - func(_ *rand.Rand) { - weightMsgDeleteEscrowAccount = defaultWeightMsgDeleteEscrowAccount - }, - ) - operations = append(operations, simulation.NewWeightedOperation( - weightMsgDeleteEscrowAccount, - identitysimulation.SimulateMsgDeleteEscrowAccount(am.accountKeeper, am.bankKeeper, am.keeper), - )) - // this line is used by starport scaffolding # simapp/module/operation return operations @@ -273,30 +228,6 @@ func (am AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.Wei return nil }, ), - simulation.NewWeightedProposalMsg( - opWeightMsgCreateEscrowAccount, - defaultWeightMsgCreateEscrowAccount, - func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { - identitysimulation.SimulateMsgCreateEscrowAccount(am.accountKeeper, am.bankKeeper, am.keeper) - return nil - }, - ), - simulation.NewWeightedProposalMsg( - opWeightMsgUpdateEscrowAccount, - defaultWeightMsgUpdateEscrowAccount, - func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { - identitysimulation.SimulateMsgUpdateEscrowAccount(am.accountKeeper, am.bankKeeper, am.keeper) - return nil - }, - ), - simulation.NewWeightedProposalMsg( - opWeightMsgDeleteEscrowAccount, - defaultWeightMsgDeleteEscrowAccount, - func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { - identitysimulation.SimulateMsgDeleteEscrowAccount(am.accountKeeper, am.bankKeeper, am.keeper) - return nil - }, - ), // this line is used by starport scaffolding # simapp/module/OpMsg } } diff --git a/x/identity/simulation/escrow_account.go b/x/identity/simulation/escrow_account.go deleted file mode 100644 index 94a4d85ce..000000000 --- a/x/identity/simulation/escrow_account.go +++ /dev/null @@ -1,134 +0,0 @@ -package simulation - -import ( - "math/rand" - - simappparams "cosmossdk.io/simapp/params" - "github.com/cosmos/cosmos-sdk/baseapp" - sdk "github.com/cosmos/cosmos-sdk/types" - simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/cosmos/cosmos-sdk/x/simulation" - "github.com/sonr-io/core/x/identity/keeper" - "github.com/sonr-io/core/x/identity/types" -) - -func SimulateMsgCreateEscrowAccount( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, -) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - simAccount, _ := simtypes.RandomAcc(r, accs) - - msg := &types.MsgCreateEscrowAccount{ - Creator: simAccount.Address.String(), - } - - txCtx := simulation.OperationInput{ - R: r, - App: app, - TxGen: simappparams.MakeTestEncodingConfig().TxConfig, - Cdc: nil, - Msg: msg, - MsgType: msg.Type(), - Context: ctx, - SimAccount: simAccount, - ModuleName: types.ModuleName, - CoinsSpentInMsg: sdk.NewCoins(), - AccountKeeper: ak, - Bankkeeper: bk, - } - return simulation.GenAndDeliverTxWithRandFees(txCtx) - } -} - -func SimulateMsgUpdateEscrowAccount( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, -) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - var ( - simAccount = simtypes.Account{} - escrowAccount = types.EscrowAccount{} - msg = &types.MsgUpdateEscrowAccount{} - allEscrowAccount = k.GetAllEscrowAccount(ctx) - found = false - ) - for _, obj := range allEscrowAccount { - simAccount, found = FindAccount(accs, obj.Creator) - if found { - escrowAccount = obj - break - } - } - if !found { - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "escrowAccount creator not found"), nil, nil - } - msg.Creator = simAccount.Address.String() - msg.Id = escrowAccount.Id - - txCtx := simulation.OperationInput{ - R: r, - App: app, - TxGen: simappparams.MakeTestEncodingConfig().TxConfig, - Cdc: nil, - Msg: msg, - MsgType: msg.Type(), - Context: ctx, - SimAccount: simAccount, - ModuleName: types.ModuleName, - CoinsSpentInMsg: sdk.NewCoins(), - AccountKeeper: ak, - Bankkeeper: bk, - } - return simulation.GenAndDeliverTxWithRandFees(txCtx) - } -} - -func SimulateMsgDeleteEscrowAccount( - ak types.AccountKeeper, - bk types.BankKeeper, - k keeper.Keeper, -) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - var ( - simAccount = simtypes.Account{} - escrowAccount = types.EscrowAccount{} - msg = &types.MsgUpdateEscrowAccount{} - allEscrowAccount = k.GetAllEscrowAccount(ctx) - found = false - ) - for _, obj := range allEscrowAccount { - simAccount, found = FindAccount(accs, obj.Creator) - if found { - escrowAccount = obj - break - } - } - if !found { - return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "escrowAccount creator not found"), nil, nil - } - msg.Creator = simAccount.Address.String() - msg.Id = escrowAccount.Id - - txCtx := simulation.OperationInput{ - R: r, - App: app, - TxGen: simappparams.MakeTestEncodingConfig().TxConfig, - Cdc: nil, - Msg: msg, - MsgType: msg.Type(), - Context: ctx, - SimAccount: simAccount, - ModuleName: types.ModuleName, - CoinsSpentInMsg: sdk.NewCoins(), - AccountKeeper: ak, - Bankkeeper: bk, - } - return simulation.GenAndDeliverTxWithRandFees(txCtx) - } -} diff --git a/x/identity/types/account.pb.go b/x/identity/types/account.pb.go index 6cb31dd38..bc7cb2843 100644 --- a/x/identity/types/account.pb.go +++ b/x/identity/types/account.pb.go @@ -22,82 +22,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type EscrowAccount struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - PublicKey string `protobuf:"bytes,3,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - LockupUsdBalance string `protobuf:"bytes,4,opt,name=lockupUsdBalance,proto3" json:"lockupUsdBalance,omitempty"` - Creator string `protobuf:"bytes,5,opt,name=creator,proto3" json:"creator,omitempty"` -} - -func (m *EscrowAccount) Reset() { *m = EscrowAccount{} } -func (m *EscrowAccount) String() string { return proto.CompactTextString(m) } -func (*EscrowAccount) ProtoMessage() {} -func (*EscrowAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_19070c8376816cff, []int{0} -} -func (m *EscrowAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EscrowAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EscrowAccount.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EscrowAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_EscrowAccount.Merge(m, src) -} -func (m *EscrowAccount) XXX_Size() int { - return m.Size() -} -func (m *EscrowAccount) XXX_DiscardUnknown() { - xxx_messageInfo_EscrowAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_EscrowAccount proto.InternalMessageInfo - -func (m *EscrowAccount) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *EscrowAccount) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *EscrowAccount) GetPublicKey() string { - if m != nil { - return m.PublicKey - } - return "" -} - -func (m *EscrowAccount) GetLockupUsdBalance() string { - if m != nil { - return m.LockupUsdBalance - } - return "" -} - -func (m *EscrowAccount) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - type ControllerAccount struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` PublicKey string `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"` @@ -109,7 +33,7 @@ func (m *ControllerAccount) Reset() { *m = ControllerAccount{} } func (m *ControllerAccount) String() string { return proto.CompactTextString(m) } func (*ControllerAccount) ProtoMessage() {} func (*ControllerAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_19070c8376816cff, []int{1} + return fileDescriptor_19070c8376816cff, []int{0} } func (m *ControllerAccount) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -167,89 +91,27 @@ func (m *ControllerAccount) GetWallets() []string { } func init() { - proto.RegisterType((*EscrowAccount)(nil), "core.identity.EscrowAccount") proto.RegisterType((*ControllerAccount)(nil), "core.identity.ControllerAccount") } func init() { proto.RegisterFile("core/identity/account.proto", fileDescriptor_19070c8376816cff) } var fileDescriptor_19070c8376816cff = []byte{ - // 289 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x51, 0x4d, 0x4a, 0xc4, 0x30, - 0x18, 0x9d, 0xb4, 0x55, 0x69, 0x60, 0x06, 0xed, 0x2a, 0xa0, 0x84, 0x32, 0x0b, 0x29, 0x82, 0xed, - 0xc2, 0x13, 0x58, 0x71, 0xe5, 0xae, 0xe0, 0xc6, 0x5d, 0x9a, 0x04, 0x27, 0x18, 0xfb, 0x95, 0x24, - 0x65, 0xec, 0x21, 0x04, 0x2f, 0xe0, 0x7d, 0x5c, 0xce, 0xd2, 0xa5, 0xb4, 0x17, 0x91, 0x76, 0x2c, - 0x23, 0x23, 0xb8, 0x7c, 0x3f, 0x7c, 0xef, 0x7d, 0x3c, 0x7c, 0xca, 0xc1, 0xc8, 0x4c, 0x09, 0x59, - 0x39, 0xe5, 0xda, 0x8c, 0x71, 0x0e, 0x4d, 0xe5, 0xd2, 0xda, 0x80, 0x83, 0x68, 0x3e, 0x88, 0xe9, - 0x24, 0x2e, 0xdf, 0x11, 0x9e, 0xdf, 0x5a, 0x6e, 0x60, 0x7d, 0xbd, 0xb5, 0x45, 0x0b, 0xec, 0x29, - 0x41, 0x50, 0x8c, 0x92, 0xa0, 0xf0, 0x94, 0x88, 0x08, 0x3e, 0x62, 0x42, 0x18, 0x69, 0x2d, 0xf1, - 0x62, 0x94, 0x84, 0xc5, 0x04, 0xa3, 0x33, 0x1c, 0xd6, 0x4d, 0xa9, 0x15, 0xbf, 0x93, 0x2d, 0xf1, - 0x47, 0x6d, 0x47, 0x44, 0x17, 0xf8, 0x58, 0x03, 0x7f, 0x6a, 0xea, 0x7b, 0x2b, 0x72, 0xa6, 0x59, - 0xc5, 0x25, 0x09, 0x46, 0xd3, 0x1f, 0x7e, 0xc8, 0xe0, 0x46, 0x32, 0x07, 0x86, 0x1c, 0x6c, 0x33, - 0x7e, 0xe0, 0xf2, 0x15, 0xe1, 0x93, 0x1b, 0xa8, 0x9c, 0x01, 0xad, 0xa5, 0x99, 0x3a, 0xfe, 0xea, - 0x84, 0xfe, 0xe9, 0xe4, 0xed, 0x77, 0x3a, 0xc7, 0x0b, 0xd6, 0xb8, 0xd5, 0xf0, 0x3b, 0x1f, 0xce, - 0x5b, 0xe2, 0xc7, 0x7e, 0x12, 0x16, 0x7b, 0xec, 0x70, 0x7f, 0xcd, 0xb4, 0x96, 0xce, 0x92, 0x60, - 0x34, 0x4c, 0x30, 0xcf, 0x3f, 0x3a, 0x8a, 0x36, 0x1d, 0x45, 0x5f, 0x1d, 0x45, 0x6f, 0x3d, 0x9d, - 0x6d, 0x7a, 0x3a, 0xfb, 0xec, 0xe9, 0xec, 0x21, 0x79, 0x54, 0x6e, 0xd5, 0x94, 0x29, 0x87, 0xe7, - 0xcc, 0x42, 0x65, 0x2e, 0x15, 0x64, 0xe3, 0x10, 0x2f, 0xbb, 0x29, 0x5c, 0x5b, 0x4b, 0x5b, 0x1e, - 0x8e, 0x4b, 0x5c, 0x7d, 0x07, 0x00, 0x00, 0xff, 0xff, 0xda, 0x45, 0x1c, 0x99, 0xa8, 0x01, 0x00, - 0x00, -} - -func (m *EscrowAccount) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EscrowAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EscrowAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0x2a - } - if len(m.LockupUsdBalance) > 0 { - i -= len(m.LockupUsdBalance) - copy(dAtA[i:], m.LockupUsdBalance) - i = encodeVarintAccount(dAtA, i, uint64(len(m.LockupUsdBalance))) - i-- - dAtA[i] = 0x22 - } - if len(m.PublicKey) > 0 { - i -= len(m.PublicKey) - copy(dAtA[i:], m.PublicKey) - i = encodeVarintAccount(dAtA, i, uint64(len(m.PublicKey))) - i-- - dAtA[i] = 0x1a - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintAccount(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil + // 221 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xce, 0x2f, 0x4a, + 0xd5, 0xcf, 0x4c, 0x49, 0xcd, 0x2b, 0xc9, 0x2c, 0xa9, 0xd4, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, + 0x2b, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x05, 0x49, 0xea, 0xc1, 0x24, 0x95, 0x7a, + 0x19, 0xb9, 0x04, 0x9d, 0xf3, 0xf3, 0x4a, 0x8a, 0xf2, 0x73, 0x72, 0x52, 0x8b, 0x1c, 0x21, 0x4a, + 0x85, 0x24, 0xb8, 0xd8, 0x13, 0x53, 0x52, 0x8a, 0x52, 0x8b, 0x8b, 0x25, 0x18, 0x15, 0x18, 0x35, + 0x38, 0x83, 0x60, 0x5c, 0x21, 0x19, 0x2e, 0xce, 0x82, 0xd2, 0xa4, 0x9c, 0xcc, 0x64, 0xef, 0xd4, + 0x4a, 0x09, 0x26, 0xb0, 0x1c, 0x42, 0x40, 0x48, 0x8d, 0x8b, 0x2f, 0xb1, 0xb4, 0x24, 0x03, 0x64, + 0x76, 0x72, 0x62, 0x49, 0x7e, 0x51, 0xb1, 0x04, 0xb3, 0x02, 0xb3, 0x06, 0x67, 0x10, 0x9a, 0x28, + 0xc8, 0xfc, 0xf2, 0xc4, 0x9c, 0x9c, 0xd4, 0x92, 0x62, 0x09, 0x16, 0xb0, 0x02, 0x18, 0xd7, 0xc9, + 0xe9, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, + 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x34, 0xd2, 0x33, 0x4b, 0x32, + 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x8b, 0xf3, 0xf3, 0x8a, 0x74, 0x33, 0xf3, 0xf5, 0xc1, + 0x1e, 0xad, 0x40, 0x78, 0xb5, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xec, 0x53, 0x63, 0x40, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xab, 0x01, 0x89, 0x10, 0x08, 0x01, 0x00, 0x00, } func (m *ControllerAccount) Marshal() (dAtA []byte, err error) { @@ -318,34 +180,6 @@ func encodeVarintAccount(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *EscrowAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovAccount(uint64(m.Id)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - l = len(m.PublicKey) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - l = len(m.LockupUsdBalance) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - func (m *ControllerAccount) Size() (n int) { if m == nil { return 0 @@ -381,203 +215,6 @@ func sovAccount(x uint64) (n int) { func sozAccount(x uint64) (n int) { return sovAccount(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *EscrowAccount) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EscrowAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EscrowAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LockupUsdBalance", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LockupUsdBalance = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *ControllerAccount) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/identity/types/codec.go b/x/identity/types/codec.go index 1f43db6ee..e31049180 100644 --- a/x/identity/types/codec.go +++ b/x/identity/types/codec.go @@ -30,9 +30,6 @@ func RegisterCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgCreateControllerAccount{}, "identity/CreateControllerAccount", nil) cdc.RegisterConcrete(&MsgUpdateControllerAccount{}, "identity/UpdateControllerAccount", nil) cdc.RegisterConcrete(&MsgDeleteControllerAccount{}, "identity/DeleteControllerAccount", nil) - cdc.RegisterConcrete(&MsgCreateEscrowAccount{}, "identity/CreateEscrowAccount", nil) - cdc.RegisterConcrete(&MsgUpdateEscrowAccount{}, "identity/UpdateEscrowAccount", nil) - cdc.RegisterConcrete(&MsgDeleteEscrowAccount{}, "identity/DeleteEscrowAccount", nil) // this line is used by starport scaffolding # 2 } @@ -45,11 +42,6 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgUpdateControllerAccount{}, &MsgDeleteControllerAccount{}, ) - registry.RegisterImplementations((*sdk.Msg)(nil), - &MsgCreateEscrowAccount{}, - &MsgUpdateEscrowAccount{}, - &MsgDeleteEscrowAccount{}, - ) // this line is used by starport scaffolding # 3 msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/identity/types/did_document.go b/x/identity/types/did_document.go index 986e4822b..9fa987fc6 100644 --- a/x/identity/types/did_document.go +++ b/x/identity/types/did_document.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/go-webauthn/webauthn/protocol" - crypto "github.com/sonr-io/core/pkg/crypto" + crypto "github.com/sonr-io/core/internal/crypto" ) // NewDIDDocument creates a new DIDDocument from an Identification and optional VerificationRelationships diff --git a/x/identity/types/genesis.go b/x/identity/types/genesis.go index eeb48b304..c4adc31d6 100644 --- a/x/identity/types/genesis.go +++ b/x/identity/types/genesis.go @@ -2,8 +2,6 @@ package types import ( "fmt" - - host "github.com/cosmos/ibc-go/v7/modules/core/24-host" ) // DefaultIndex is the default global index @@ -12,10 +10,9 @@ const DefaultIndex uint64 = 1 // DefaultGenesis returns the default genesis state func DefaultGenesis() *GenesisState { return &GenesisState{ - PortId: PortID, DIDDocumentList: []DIDDocument{}, ControllerAccountList: []ControllerAccount{}, - EscrowAccountList: []EscrowAccount{}, + ControllerAccountCount: 0, // this line is used by starport scaffolding # genesis/types/default Params: DefaultParams(), } @@ -24,9 +21,7 @@ func DefaultGenesis() *GenesisState { // Validate performs basic genesis state validation returning an error upon any // failure. func (gs GenesisState) Validate() error { - if err := host.PortIdentifierValidator(gs.PortId); err != nil { - return err - } + // Check for duplicated index in dIDDocument dIDDocumentIndexMap := make(map[string]struct{}) @@ -47,18 +42,6 @@ func (gs GenesisState) Validate() error { } controllerAccountIndexMap[index] = struct{}{} } - // Check for duplicated ID in escrowAccount - escrowAccountIdMap := make(map[uint64]bool) - escrowAccountCount := gs.GetEscrowAccountCount() - for _, elem := range gs.EscrowAccountList { - if _, ok := escrowAccountIdMap[elem.Id]; ok { - return fmt.Errorf("duplicated id for escrowAccount") - } - if elem.Id >= escrowAccountCount { - return fmt.Errorf("escrowAccount id should be lower or equal than the last id") - } - escrowAccountIdMap[elem.Id] = true - } // this line is used by starport scaffolding # genesis/types/validate return gs.Params.Validate() diff --git a/x/identity/types/genesis.pb.go b/x/identity/types/genesis.pb.go index 0a681776e..a914179e7 100644 --- a/x/identity/types/genesis.pb.go +++ b/x/identity/types/genesis.pb.go @@ -26,12 +26,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the identity module's genesis state. type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - PortId string `protobuf:"bytes,2,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"` - DIDDocumentList []DIDDocument `protobuf:"bytes,3,rep,name=dIDDocumentList,proto3" json:"dIDDocumentList"` - ControllerAccountList []ControllerAccount `protobuf:"bytes,4,rep,name=controllerAccountList,proto3" json:"controllerAccountList"` - ControllerAccountCount uint64 `protobuf:"varint,5,opt,name=controllerAccountCount,proto3" json:"controllerAccountCount,omitempty"` - EscrowAccountList []EscrowAccount `protobuf:"bytes,6,rep,name=escrowAccountList,proto3" json:"escrowAccountList"` - EscrowAccountCount uint64 `protobuf:"varint,7,opt,name=escrowAccountCount,proto3" json:"escrowAccountCount,omitempty"` + DIDDocumentList []DIDDocument `protobuf:"bytes,2,rep,name=dIDDocumentList,proto3" json:"dIDDocumentList"` + ControllerAccountList []ControllerAccount `protobuf:"bytes,3,rep,name=controllerAccountList,proto3" json:"controllerAccountList"` + ControllerAccountCount uint64 `protobuf:"varint,4,opt,name=controllerAccountCount,proto3" json:"controllerAccountCount,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -74,13 +71,6 @@ func (m *GenesisState) GetParams() Params { return Params{} } -func (m *GenesisState) GetPortId() string { - if m != nil { - return m.PortId - } - return "" -} - func (m *GenesisState) GetDIDDocumentList() []DIDDocument { if m != nil { return m.DIDDocumentList @@ -102,20 +92,6 @@ func (m *GenesisState) GetControllerAccountCount() uint64 { return 0 } -func (m *GenesisState) GetEscrowAccountList() []EscrowAccount { - if m != nil { - return m.EscrowAccountList - } - return nil -} - -func (m *GenesisState) GetEscrowAccountCount() uint64 { - if m != nil { - return m.EscrowAccountCount - } - return 0 -} - func init() { proto.RegisterType((*GenesisState)(nil), "core.identity.GenesisState") } @@ -123,30 +99,26 @@ func init() { func init() { proto.RegisterFile("core/identity/genesis.proto", fileDescriptor_22ee3e6e2aad889c) } var fileDescriptor_22ee3e6e2aad889c = []byte{ - // 355 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xc1, 0x4a, 0xeb, 0x40, - 0x14, 0x86, 0x33, 0xb7, 0xbd, 0x29, 0x4e, 0x15, 0x71, 0xb0, 0x36, 0x44, 0x89, 0xc1, 0x55, 0x36, - 0x26, 0xd0, 0x82, 0x7b, 0xdb, 0x8a, 0x54, 0x5c, 0x94, 0xba, 0x13, 0x41, 0xd2, 0xc9, 0x10, 0x07, - 0xda, 0x9c, 0x30, 0x99, 0xa2, 0x7d, 0x0b, 0x1f, 0xc9, 0x65, 0x97, 0x5d, 0xba, 0x12, 0x69, 0x5f, - 0x44, 0x32, 0x89, 0xb4, 0x49, 0xeb, 0x26, 0x24, 0xf9, 0xfe, 0xf3, 0xcd, 0x3f, 0x70, 0xf0, 0x29, - 0x05, 0xc1, 0x3c, 0x1e, 0xb0, 0x48, 0x72, 0x39, 0xf3, 0x42, 0x16, 0xb1, 0x84, 0x27, 0x6e, 0x2c, - 0x40, 0x02, 0x39, 0x48, 0xa1, 0xfb, 0x0b, 0xcd, 0xe3, 0x10, 0x42, 0x50, 0xc4, 0x4b, 0xdf, 0xb2, - 0x90, 0x69, 0x16, 0x0d, 0xb1, 0x2f, 0xfc, 0x49, 0x2e, 0x30, 0x9b, 0x45, 0x16, 0xf0, 0x20, 0x07, - 0xa5, 0x63, 0x7d, 0x4a, 0x61, 0x1a, 0xc9, 0x0c, 0x5e, 0x7c, 0x54, 0xf0, 0xfe, 0x6d, 0x56, 0xe4, - 0x41, 0xfa, 0x92, 0x91, 0x36, 0xd6, 0x33, 0xad, 0x81, 0x6c, 0xe4, 0xd4, 0x5b, 0x0d, 0xb7, 0x50, - 0xcc, 0x1d, 0x28, 0xd8, 0xa9, 0xce, 0xbf, 0xce, 0xb5, 0x61, 0x1e, 0x25, 0x4d, 0x5c, 0x8b, 0x41, - 0xc8, 0x67, 0x1e, 0x18, 0xff, 0x6c, 0xe4, 0xec, 0x0d, 0xf5, 0xf4, 0xb3, 0x1f, 0x90, 0x3b, 0x7c, - 0x18, 0xf4, 0x7b, 0x3d, 0xa0, 0xd3, 0x09, 0x8b, 0xe4, 0x3d, 0x4f, 0xa4, 0x51, 0xb1, 0x2b, 0x4e, - 0xbd, 0x65, 0x96, 0xb4, 0xbd, 0x75, 0x2a, 0x77, 0x97, 0x07, 0xc9, 0x13, 0x6e, 0x50, 0x88, 0xa4, - 0x80, 0xf1, 0x98, 0x89, 0xeb, 0xec, 0x16, 0xca, 0x58, 0x55, 0x46, 0xbb, 0x64, 0xec, 0x96, 0xb3, - 0xb9, 0x77, 0xb7, 0x84, 0x5c, 0xe1, 0x93, 0x2d, 0xd0, 0x4d, 0x1f, 0xc6, 0x7f, 0x1b, 0x39, 0xd5, - 0xe1, 0x1f, 0x94, 0x0c, 0xf0, 0x11, 0x4b, 0xa8, 0x80, 0xd7, 0xcd, 0x46, 0xba, 0x6a, 0x74, 0x56, - 0x6a, 0x74, 0xb3, 0x99, 0xcb, 0xdb, 0x6c, 0x0f, 0x13, 0x17, 0x93, 0xc2, 0xcf, 0xac, 0x45, 0x4d, - 0xb5, 0xd8, 0x41, 0x3a, 0x9d, 0xf9, 0xd2, 0x42, 0x8b, 0xa5, 0x85, 0xbe, 0x97, 0x16, 0x7a, 0x5f, - 0x59, 0xda, 0x62, 0x65, 0x69, 0x9f, 0x2b, 0x4b, 0x7b, 0x74, 0x42, 0x2e, 0x5f, 0xa6, 0x23, 0x97, - 0xc2, 0xc4, 0x4b, 0x20, 0x12, 0x97, 0x1c, 0x3c, 0xb5, 0x0c, 0x6f, 0xeb, 0x75, 0x90, 0xb3, 0x98, - 0x25, 0x23, 0x5d, 0x6d, 0x43, 0xfb, 0x27, 0x00, 0x00, 0xff, 0xff, 0x00, 0x4d, 0x2a, 0xd3, 0xa3, - 0x02, 0x00, 0x00, + // 299 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xce, 0x2f, 0x4a, + 0xd5, 0xcf, 0x4c, 0x49, 0xcd, 0x2b, 0xc9, 0x2c, 0xa9, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, + 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x05, 0x49, 0xea, 0xc1, 0x24, 0xa5, 0xd0, + 0xd4, 0x26, 0x26, 0x27, 0xe7, 0x97, 0xe6, 0x95, 0x40, 0xd4, 0x4a, 0x89, 0xa3, 0x4a, 0xa6, 0x64, + 0xa6, 0x40, 0x25, 0xa4, 0x50, 0x25, 0x0a, 0x12, 0x8b, 0x12, 0x73, 0xa1, 0x16, 0x48, 0x89, 0xa4, + 0xe7, 0xa7, 0xe7, 0x83, 0x99, 0xfa, 0x20, 0x16, 0x44, 0x54, 0x69, 0x29, 0x13, 0x17, 0x8f, 0x3b, + 0xc4, 0x21, 0xc1, 0x25, 0x89, 0x25, 0xa9, 0x42, 0xc6, 0x5c, 0x6c, 0x10, 0x6d, 0x12, 0x8c, 0x0a, + 0x8c, 0x1a, 0xdc, 0x46, 0xa2, 0x7a, 0x28, 0x0e, 0xd3, 0x0b, 0x00, 0x4b, 0x3a, 0xb1, 0x9c, 0xb8, + 0x27, 0xcf, 0x10, 0x04, 0x55, 0x2a, 0xe4, 0xc5, 0xc5, 0x9f, 0xe2, 0xe9, 0xe2, 0x92, 0x9f, 0x5c, + 0x9a, 0x9b, 0x9a, 0x57, 0xe2, 0x93, 0x59, 0x5c, 0x22, 0xc1, 0xa4, 0xc0, 0xac, 0xc1, 0x6d, 0x24, + 0x85, 0xa6, 0xdb, 0x05, 0xa1, 0x0a, 0x6a, 0x04, 0xba, 0x46, 0xa1, 0x18, 0x2e, 0xd1, 0xe4, 0xfc, + 0xbc, 0x92, 0xa2, 0xfc, 0x9c, 0x9c, 0xd4, 0x22, 0x47, 0x88, 0xbf, 0xc1, 0x26, 0x32, 0x83, 0x4d, + 0x54, 0x40, 0x33, 0xd1, 0x19, 0x5d, 0x2d, 0xd4, 0x5c, 0xec, 0x86, 0x08, 0x99, 0x71, 0x89, 0x61, + 0x48, 0x38, 0x83, 0x08, 0x09, 0x16, 0x05, 0x46, 0x0d, 0x96, 0x20, 0x1c, 0xb2, 0x4e, 0x4e, 0x27, + 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, + 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x91, 0x9e, 0x59, 0x92, 0x51, 0x9a, + 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x5f, 0x9c, 0x9f, 0x57, 0xa4, 0x9b, 0x99, 0xaf, 0x0f, 0x8e, 0x86, + 0x0a, 0x44, 0x44, 0x94, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x83, 0xdc, 0x18, 0x10, 0x00, + 0x00, 0xff, 0xff, 0x4d, 0xbd, 0xca, 0x30, 0x08, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -169,29 +141,10 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.EscrowAccountCount != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.EscrowAccountCount)) - i-- - dAtA[i] = 0x38 - } - if len(m.EscrowAccountList) > 0 { - for iNdEx := len(m.EscrowAccountList) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.EscrowAccountList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } if m.ControllerAccountCount != 0 { i = encodeVarintGenesis(dAtA, i, uint64(m.ControllerAccountCount)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x20 } if len(m.ControllerAccountList) > 0 { for iNdEx := len(m.ControllerAccountList) - 1; iNdEx >= 0; iNdEx-- { @@ -204,7 +157,7 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } } if len(m.DIDDocumentList) > 0 { @@ -218,16 +171,9 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } } - if len(m.PortId) > 0 { - i -= len(m.PortId) - copy(dAtA[i:], m.PortId) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.PortId))) - i-- - dAtA[i] = 0x12 - } { size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -260,10 +206,6 @@ func (m *GenesisState) Size() (n int) { _ = l l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) - l = len(m.PortId) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } if len(m.DIDDocumentList) > 0 { for _, e := range m.DIDDocumentList { l = e.Size() @@ -279,15 +221,6 @@ func (m *GenesisState) Size() (n int) { if m.ControllerAccountCount != 0 { n += 1 + sovGenesis(uint64(m.ControllerAccountCount)) } - if len(m.EscrowAccountList) > 0 { - for _, e := range m.EscrowAccountList { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if m.EscrowAccountCount != 0 { - n += 1 + sovGenesis(uint64(m.EscrowAccountCount)) - } return n } @@ -360,38 +293,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PortId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DIDDocumentList", wireType) } @@ -425,7 +326,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ControllerAccountList", wireType) } @@ -459,7 +360,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field ControllerAccountCount", wireType) } @@ -478,59 +379,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { break } } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowAccountList", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EscrowAccountList = append(m.EscrowAccountList, EscrowAccount{}) - if err := m.EscrowAccountList[len(m.EscrowAccountList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowAccountCount", wireType) - } - m.EscrowAccountCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EscrowAccountCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/identity/types/genesis_test.go b/x/identity/types/genesis_test.go index 95e6fded9..e5a3abf71 100644 --- a/x/identity/types/genesis_test.go +++ b/x/identity/types/genesis_test.go @@ -21,7 +21,6 @@ func TestGenesisState_Validate(t *testing.T) { { desc: "valid genesis state", genState: &types.GenesisState{ - PortId: types.PortID, ControllerAccountList: []types.ControllerAccount{ { Address: "0", @@ -31,71 +30,10 @@ func TestGenesisState_Validate(t *testing.T) { }, }, ControllerAccountCount: 2, - EscrowAccountList: []types.EscrowAccount{ - { - Id: 0, - }, - { - Id: 1, - }, - }, - EscrowAccountCount: 2, // this line is used by starport scaffolding # types/genesis/validField }, valid: true, }, - { - desc: "duplicated controllerAccount", - genState: &types.GenesisState{ - ControllerAccountList: []types.ControllerAccount{ - { - Address: "0", - }, - { - Address: "0", - }, - }, - }, - valid: false, - }, - { - desc: "invalid controllerAccount count", - genState: &types.GenesisState{ - ControllerAccountList: []types.ControllerAccount{ - { - Address: "0", - }, - }, - ControllerAccountCount: 0, - }, - valid: false, - }, - { - desc: "duplicated escrowAccount", - genState: &types.GenesisState{ - EscrowAccountList: []types.EscrowAccount{ - { - Id: 0, - }, - { - Id: 0, - }, - }, - }, - valid: false, - }, - { - desc: "invalid escrowAccount count", - genState: &types.GenesisState{ - EscrowAccountList: []types.EscrowAccount{ - { - Id: 1, - }, - }, - EscrowAccountCount: 0, - }, - valid: false, - }, // this line is used by starport scaffolding # types/genesis/testcase } for _, tc := range tests { diff --git a/x/identity/types/identifier.go b/x/identity/types/identifier.go new file mode 100644 index 000000000..fb494b0e4 --- /dev/null +++ b/x/identity/types/identifier.go @@ -0,0 +1,3 @@ +package types + + diff --git a/x/identity/types/messages_escrow_account_test.go b/x/identity/types/messages_escrow_account_test.go deleted file mode 100644 index 235f4dabc..000000000 --- a/x/identity/types/messages_escrow_account_test.go +++ /dev/null @@ -1,102 +0,0 @@ -package types - -import ( - "testing" - - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/sonr-io/core/testutil/sample" - "github.com/stretchr/testify/require" -) - -func TestMsgCreateEscrowAccount_ValidateBasic(t *testing.T) { - tests := []struct { - name string - msg MsgCreateEscrowAccount - err error - }{ - { - name: "invalid address", - msg: MsgCreateEscrowAccount{ - Creator: "invalid_address", - }, - err: sdkerrors.ErrInvalidAddress, - }, { - name: "valid address", - msg: MsgCreateEscrowAccount{ - Creator: sample.AccAddress(), - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - err := tt.msg.ValidateBasic() - if tt.err != nil { - require.ErrorIs(t, err, tt.err) - return - } - require.NoError(t, err) - }) - } -} - -func TestMsgUpdateEscrowAccount_ValidateBasic(t *testing.T) { - tests := []struct { - name string - msg MsgUpdateEscrowAccount - err error - }{ - { - name: "invalid address", - msg: MsgUpdateEscrowAccount{ - Creator: "invalid_address", - }, - err: sdkerrors.ErrInvalidAddress, - }, { - name: "valid address", - msg: MsgUpdateEscrowAccount{ - Creator: sample.AccAddress(), - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - err := tt.msg.ValidateBasic() - if tt.err != nil { - require.ErrorIs(t, err, tt.err) - return - } - require.NoError(t, err) - }) - } -} - -func TestMsgDeleteEscrowAccount_ValidateBasic(t *testing.T) { - tests := []struct { - name string - msg MsgDeleteEscrowAccount - err error - }{ - { - name: "invalid address", - msg: MsgDeleteEscrowAccount{ - Creator: "invalid_address", - }, - err: sdkerrors.ErrInvalidAddress, - }, { - name: "valid address", - msg: MsgDeleteEscrowAccount{ - Creator: sample.AccAddress(), - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - err := tt.msg.ValidateBasic() - if tt.err != nil { - require.ErrorIs(t, err, tt.err) - return - } - require.NoError(t, err) - }) - } -} diff --git a/x/identity/types/msg_escrow.go b/x/identity/types/msg_escrow.go deleted file mode 100644 index 1bdab8063..000000000 --- a/x/identity/types/msg_escrow.go +++ /dev/null @@ -1,130 +0,0 @@ -package types - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" -) - -const ( - TypeMsgCreateEscrowAccount = "create_escrow_account" - TypeMsgUpdateEscrowAccount = "update_escrow_account" - TypeMsgDeleteEscrowAccount = "delete_escrow_account" -) - -var _ sdk.Msg = &MsgCreateEscrowAccount{} - -func NewMsgCreateEscrowAccount(creator string, address string, publicKey string, lockupUsdBalance string) *MsgCreateEscrowAccount { - return &MsgCreateEscrowAccount{ - Creator: creator, - Address: address, - PublicKey: publicKey, - LockupUsdBalance: lockupUsdBalance, - } -} - -func (msg *MsgCreateEscrowAccount) Route() string { - return RouterKey -} - -func (msg *MsgCreateEscrowAccount) Type() string { - return TypeMsgCreateEscrowAccount -} - -func (msg *MsgCreateEscrowAccount) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgCreateEscrowAccount) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgCreateEscrowAccount) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - return nil -} - -var _ sdk.Msg = &MsgUpdateEscrowAccount{} - -func NewMsgUpdateEscrowAccount(creator string, id uint64, address string, publicKey string, lockupUsdBalance string) *MsgUpdateEscrowAccount { - return &MsgUpdateEscrowAccount{ - Id: id, - Creator: creator, - Address: address, - PublicKey: publicKey, - LockupUsdBalance: lockupUsdBalance, - } -} - -func (msg *MsgUpdateEscrowAccount) Route() string { - return RouterKey -} - -func (msg *MsgUpdateEscrowAccount) Type() string { - return TypeMsgUpdateEscrowAccount -} - -func (msg *MsgUpdateEscrowAccount) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgUpdateEscrowAccount) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgUpdateEscrowAccount) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - return nil -} - -var _ sdk.Msg = &MsgDeleteEscrowAccount{} - -func NewMsgDeleteEscrowAccount(creator string, address string) *MsgDeleteEscrowAccount { - return &MsgDeleteEscrowAccount{ - Address: address, - Creator: creator, - } -} -func (msg *MsgDeleteEscrowAccount) Route() string { - return RouterKey -} - -func (msg *MsgDeleteEscrowAccount) Type() string { - return TypeMsgDeleteEscrowAccount -} - -func (msg *MsgDeleteEscrowAccount) GetSigners() []sdk.AccAddress { - creator, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - panic(err) - } - return []sdk.AccAddress{creator} -} - -func (msg *MsgDeleteEscrowAccount) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(msg) - return sdk.MustSortJSON(bz) -} - -func (msg *MsgDeleteEscrowAccount) ValidateBasic() error { - _, err := sdk.AccAddressFromBech32(msg.Creator) - if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) - } - return nil -} diff --git a/x/identity/types/msg_identity.go b/x/identity/types/msg_identity.go index 712423d6e..aa7aba8f1 100644 --- a/x/identity/types/msg_identity.go +++ b/x/identity/types/msg_identity.go @@ -3,7 +3,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/sonr-io/core/pkg/crypto" + "github.com/sonr-io/core/internal/crypto" ) const TypeMsgRegisterIdentity = "register_identity" diff --git a/x/identity/types/packet.pb.go b/x/identity/types/packet.pb.go deleted file mode 100644 index a572ab3ab..000000000 --- a/x/identity/types/packet.pb.go +++ /dev/null @@ -1,501 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: core/identity/packet.proto - -package types - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type IdentityPacketData struct { - // Types that are valid to be assigned to Packet: - // - // *IdentityPacketData_NoData - Packet isIdentityPacketData_Packet `protobuf_oneof:"packet"` -} - -func (m *IdentityPacketData) Reset() { *m = IdentityPacketData{} } -func (m *IdentityPacketData) String() string { return proto.CompactTextString(m) } -func (*IdentityPacketData) ProtoMessage() {} -func (*IdentityPacketData) Descriptor() ([]byte, []int) { - return fileDescriptor_06082318c59bda84, []int{0} -} -func (m *IdentityPacketData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IdentityPacketData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IdentityPacketData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *IdentityPacketData) XXX_Merge(src proto.Message) { - xxx_messageInfo_IdentityPacketData.Merge(m, src) -} -func (m *IdentityPacketData) XXX_Size() int { - return m.Size() -} -func (m *IdentityPacketData) XXX_DiscardUnknown() { - xxx_messageInfo_IdentityPacketData.DiscardUnknown(m) -} - -var xxx_messageInfo_IdentityPacketData proto.InternalMessageInfo - -type isIdentityPacketData_Packet interface { - isIdentityPacketData_Packet() - MarshalTo([]byte) (int, error) - Size() int -} - -type IdentityPacketData_NoData struct { - NoData *NoData `protobuf:"bytes,1,opt,name=noData,proto3,oneof" json:"noData,omitempty"` -} - -func (*IdentityPacketData_NoData) isIdentityPacketData_Packet() {} - -func (m *IdentityPacketData) GetPacket() isIdentityPacketData_Packet { - if m != nil { - return m.Packet - } - return nil -} - -func (m *IdentityPacketData) GetNoData() *NoData { - if x, ok := m.GetPacket().(*IdentityPacketData_NoData); ok { - return x.NoData - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*IdentityPacketData) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*IdentityPacketData_NoData)(nil), - } -} - -type NoData struct { -} - -func (m *NoData) Reset() { *m = NoData{} } -func (m *NoData) String() string { return proto.CompactTextString(m) } -func (*NoData) ProtoMessage() {} -func (*NoData) Descriptor() ([]byte, []int) { - return fileDescriptor_06082318c59bda84, []int{1} -} -func (m *NoData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NoData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NoData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NoData) XXX_Merge(src proto.Message) { - xxx_messageInfo_NoData.Merge(m, src) -} -func (m *NoData) XXX_Size() int { - return m.Size() -} -func (m *NoData) XXX_DiscardUnknown() { - xxx_messageInfo_NoData.DiscardUnknown(m) -} - -var xxx_messageInfo_NoData proto.InternalMessageInfo - -func init() { - proto.RegisterType((*IdentityPacketData)(nil), "core.identity.IdentityPacketData") - proto.RegisterType((*NoData)(nil), "core.identity.NoData") -} - -func init() { proto.RegisterFile("core/identity/packet.proto", fileDescriptor_06082318c59bda84) } - -var fileDescriptor_06082318c59bda84 = []byte{ - // 177 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xce, 0x2f, 0x4a, - 0xd5, 0xcf, 0x4c, 0x49, 0xcd, 0x2b, 0xc9, 0x2c, 0xa9, 0xd4, 0x2f, 0x48, 0x4c, 0xce, 0x4e, 0x2d, - 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x05, 0xc9, 0xe9, 0xc1, 0xe4, 0x94, 0xfc, 0xb9, - 0x84, 0x3c, 0xa1, 0xec, 0x00, 0xb0, 0x32, 0x97, 0xc4, 0x92, 0x44, 0x21, 0x7d, 0x2e, 0xb6, 0xbc, - 0x7c, 0x10, 0x4b, 0x82, 0x51, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x54, 0x0f, 0x45, 0x97, 0x9e, 0x1f, - 0x58, 0xd2, 0x83, 0x21, 0x08, 0xaa, 0xcc, 0x89, 0x83, 0x8b, 0x0d, 0x62, 0x8b, 0x12, 0x07, 0x17, - 0x1b, 0x44, 0xd6, 0xc9, 0xe9, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, - 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x34, - 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x8b, 0xf3, 0xf3, 0x8a, 0x74, - 0x33, 0xf3, 0xf5, 0xc1, 0x4e, 0xae, 0x40, 0x38, 0xba, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, - 0xec, 0x68, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6f, 0xbf, 0xc1, 0x09, 0xd2, 0x00, 0x00, - 0x00, -} - -func (m *IdentityPacketData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IdentityPacketData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IdentityPacketData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Packet != nil { - { - size := m.Packet.Size() - i -= size - if _, err := m.Packet.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *IdentityPacketData_NoData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IdentityPacketData_NoData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.NoData != nil { - { - size, err := m.NoData.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintPacket(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *NoData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NoData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NoData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintPacket(dAtA []byte, offset int, v uint64) int { - offset -= sovPacket(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *IdentityPacketData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Packet != nil { - n += m.Packet.Size() - } - return n -} - -func (m *IdentityPacketData_NoData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NoData != nil { - l = m.NoData.Size() - n += 1 + l + sovPacket(uint64(l)) - } - return n -} -func (m *NoData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovPacket(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozPacket(x uint64) (n int) { - return sovPacket(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *IdentityPacketData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacket - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IdentityPacketData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IdentityPacketData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoData", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacket - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthPacket - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthPacket - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &NoData{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Packet = &IdentityPacketData_NoData{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipPacket(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPacket - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NoData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowPacket - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NoData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NoData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipPacket(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthPacket - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipPacket(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacket - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacket - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowPacket - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthPacket - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupPacket - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthPacket - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthPacket = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowPacket = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupPacket = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/identity/types/query.pb.go b/x/identity/types/query.pb.go index 6d5992764..a9a865562 100644 --- a/x/identity/types/query.pb.go +++ b/x/identity/types/query.pb.go @@ -786,198 +786,6 @@ func (m *QueryAllControllerAccountResponse) GetPagination() *query.PageResponse return nil } -// QueryGetEscrowAccountRequest is the request type for the Query/EscrowAccount -// RPC method. -type QueryGetEscrowAccountRequest struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *QueryGetEscrowAccountRequest) Reset() { *m = QueryGetEscrowAccountRequest{} } -func (m *QueryGetEscrowAccountRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetEscrowAccountRequest) ProtoMessage() {} -func (*QueryGetEscrowAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_55ac06fdf68c11fd, []int{16} -} -func (m *QueryGetEscrowAccountRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetEscrowAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetEscrowAccountRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetEscrowAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetEscrowAccountRequest.Merge(m, src) -} -func (m *QueryGetEscrowAccountRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetEscrowAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetEscrowAccountRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetEscrowAccountRequest proto.InternalMessageInfo - -func (m *QueryGetEscrowAccountRequest) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -// QueryGetEscrowAccountResponse is the response type for the -// Query/EscrowAccount RPC method. -type QueryGetEscrowAccountResponse struct { - EscrowAccount EscrowAccount `protobuf:"bytes,1,opt,name=escrowAccount,proto3" json:"escrowAccount"` -} - -func (m *QueryGetEscrowAccountResponse) Reset() { *m = QueryGetEscrowAccountResponse{} } -func (m *QueryGetEscrowAccountResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetEscrowAccountResponse) ProtoMessage() {} -func (*QueryGetEscrowAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_55ac06fdf68c11fd, []int{17} -} -func (m *QueryGetEscrowAccountResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetEscrowAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetEscrowAccountResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGetEscrowAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetEscrowAccountResponse.Merge(m, src) -} -func (m *QueryGetEscrowAccountResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetEscrowAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetEscrowAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetEscrowAccountResponse proto.InternalMessageInfo - -func (m *QueryGetEscrowAccountResponse) GetEscrowAccount() EscrowAccount { - if m != nil { - return m.EscrowAccount - } - return EscrowAccount{} -} - -// QueryAllEscrowAccountRequest is the request type for the -// Query/EscrowAccountAll RPC method. -type QueryAllEscrowAccountRequest struct { - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllEscrowAccountRequest) Reset() { *m = QueryAllEscrowAccountRequest{} } -func (m *QueryAllEscrowAccountRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAllEscrowAccountRequest) ProtoMessage() {} -func (*QueryAllEscrowAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_55ac06fdf68c11fd, []int{18} -} -func (m *QueryAllEscrowAccountRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllEscrowAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllEscrowAccountRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllEscrowAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllEscrowAccountRequest.Merge(m, src) -} -func (m *QueryAllEscrowAccountRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAllEscrowAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllEscrowAccountRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllEscrowAccountRequest proto.InternalMessageInfo - -func (m *QueryAllEscrowAccountRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// QueryAllEscrowAccountResponse is the response type for the -// Query/EscrowAccountAll RPC method. -type QueryAllEscrowAccountResponse struct { - EscrowAccount []EscrowAccount `protobuf:"bytes,1,rep,name=escrowAccount,proto3" json:"escrowAccount"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryAllEscrowAccountResponse) Reset() { *m = QueryAllEscrowAccountResponse{} } -func (m *QueryAllEscrowAccountResponse) String() string { return proto.CompactTextString(m) } -func (*QueryAllEscrowAccountResponse) ProtoMessage() {} -func (*QueryAllEscrowAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_55ac06fdf68c11fd, []int{19} -} -func (m *QueryAllEscrowAccountResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAllEscrowAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAllEscrowAccountResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAllEscrowAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAllEscrowAccountResponse.Merge(m, src) -} -func (m *QueryAllEscrowAccountResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryAllEscrowAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAllEscrowAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAllEscrowAccountResponse proto.InternalMessageInfo - -func (m *QueryAllEscrowAccountResponse) GetEscrowAccount() []EscrowAccount { - if m != nil { - return m.EscrowAccount - } - return nil -} - -func (m *QueryAllEscrowAccountResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - func init() { proto.RegisterType((*QueryParamsRequest)(nil), "core.identity.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "core.identity.QueryParamsResponse") @@ -995,79 +803,67 @@ func init() { proto.RegisterType((*QueryGetControllerAccountResponse)(nil), "core.identity.QueryGetControllerAccountResponse") proto.RegisterType((*QueryAllControllerAccountRequest)(nil), "core.identity.QueryAllControllerAccountRequest") proto.RegisterType((*QueryAllControllerAccountResponse)(nil), "core.identity.QueryAllControllerAccountResponse") - proto.RegisterType((*QueryGetEscrowAccountRequest)(nil), "core.identity.QueryGetEscrowAccountRequest") - proto.RegisterType((*QueryGetEscrowAccountResponse)(nil), "core.identity.QueryGetEscrowAccountResponse") - proto.RegisterType((*QueryAllEscrowAccountRequest)(nil), "core.identity.QueryAllEscrowAccountRequest") - proto.RegisterType((*QueryAllEscrowAccountResponse)(nil), "core.identity.QueryAllEscrowAccountResponse") } func init() { proto.RegisterFile("core/identity/query.proto", fileDescriptor_55ac06fdf68c11fd) } var fileDescriptor_55ac06fdf68c11fd = []byte{ - // 994 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x97, 0x4f, 0x6f, 0xdc, 0x44, - 0x14, 0xc0, 0xe3, 0x84, 0x86, 0xf6, 0x45, 0x89, 0x36, 0xc3, 0x36, 0x09, 0xee, 0xd6, 0xa4, 0x23, - 0x9a, 0x96, 0x96, 0x7a, 0x48, 0x8a, 0x04, 0x07, 0x2e, 0x5e, 0x02, 0xe1, 0x8f, 0x10, 0x65, 0xc5, - 0x09, 0x09, 0x55, 0xb3, 0xf6, 0xe0, 0x0e, 0x38, 0x9e, 0xad, 0xed, 0x6d, 0xba, 0x0a, 0xb9, 0x70, - 0x44, 0xaa, 0x84, 0xc4, 0x81, 0x0b, 0xe2, 0xc2, 0x8d, 0x23, 0x1f, 0x81, 0x53, 0x8f, 0x95, 0xb8, - 0x70, 0x42, 0x28, 0xe1, 0x83, 0x20, 0x8f, 0xc7, 0x6b, 0x7b, 0x3d, 0xde, 0x6e, 0xcb, 0x9e, 0x76, - 0xed, 0xf7, 0xef, 0xf7, 0xde, 0x1b, 0xbf, 0x67, 0xc3, 0xcb, 0xae, 0x88, 0x18, 0xe1, 0x1e, 0x0b, - 0x13, 0x9e, 0x8c, 0xc8, 0xfd, 0x21, 0x8b, 0x46, 0xf6, 0x20, 0x12, 0x89, 0x40, 0xab, 0xa9, 0xc8, - 0xce, 0x45, 0x66, 0xdb, 0x17, 0xbe, 0x90, 0x12, 0x92, 0xfe, 0xcb, 0x94, 0xcc, 0x8e, 0x2f, 0x84, - 0x1f, 0x30, 0x42, 0x07, 0x9c, 0xd0, 0x30, 0x14, 0x09, 0x4d, 0xb8, 0x08, 0x63, 0x25, 0xbd, 0xe1, - 0x8a, 0xf8, 0x50, 0xc4, 0xa4, 0x4f, 0x63, 0x96, 0xf9, 0x26, 0x0f, 0x76, 0xfb, 0x2c, 0xa1, 0xbb, - 0x64, 0x40, 0x7d, 0x1e, 0x4a, 0x65, 0xa5, 0x6b, 0x56, 0x49, 0x06, 0x34, 0xa2, 0x87, 0xb9, 0x9f, - 0xcd, 0xaa, 0xcc, 0xe3, 0x9e, 0x12, 0x5c, 0xaa, 0x0a, 0xa8, 0xeb, 0x8a, 0x61, 0x98, 0x64, 0x42, - 0xdc, 0x06, 0xf4, 0x59, 0x1a, 0xf3, 0x8e, 0x74, 0xd5, 0x63, 0xf7, 0x87, 0x2c, 0x4e, 0xf0, 0x47, - 0xf0, 0x52, 0xe5, 0x6e, 0x3c, 0x10, 0x61, 0xcc, 0xd0, 0x6d, 0x58, 0xce, 0x42, 0x6e, 0x19, 0xdb, - 0xc6, 0xf5, 0x95, 0xbd, 0x8b, 0x76, 0x25, 0x7d, 0x3b, 0x53, 0xef, 0xbe, 0xf0, 0xf8, 0xef, 0x57, - 0x16, 0x7a, 0x4a, 0x15, 0xdb, 0x60, 0x4a, 0x5f, 0x07, 0x2c, 0xd9, 0xff, 0x70, 0x7f, 0x5f, 0xb8, - 0xc3, 0x43, 0x16, 0x26, 0x2a, 0x12, 0x6a, 0xc1, 0x92, 0xc7, 0x3d, 0xe9, 0xef, 0x42, 0x2f, 0xfd, - 0x8b, 0x29, 0x5c, 0xd2, 0xea, 0x2b, 0x86, 0x2e, 0xac, 0x78, 0xc5, 0x6d, 0x05, 0x62, 0x4e, 0x80, - 0x94, 0x0c, 0x15, 0x4d, 0xd9, 0x08, 0x7b, 0x0a, 0xc9, 0x09, 0x02, 0x0d, 0xd2, 0xfb, 0x00, 0x45, - 0xe1, 0x55, 0x80, 0x1d, 0x3b, 0xeb, 0x92, 0x9d, 0x76, 0xc9, 0xce, 0x4e, 0x80, 0xea, 0x92, 0x7d, - 0x87, 0xfa, 0x4c, 0xd9, 0xf6, 0x4a, 0x96, 0xf8, 0x37, 0x43, 0x65, 0x32, 0x19, 0xa6, 0x29, 0x93, - 0xa5, 0x67, 0xce, 0x04, 0x1d, 0x54, 0x58, 0x17, 0x25, 0xeb, 0xb5, 0xa7, 0xb2, 0x66, 0x00, 0x15, - 0xd8, 0x37, 0xa1, 0x23, 0x59, 0xf7, 0xb9, 0xd7, 0x1d, 0x39, 0x41, 0x2c, 0x3e, 0x0e, 0xc5, 0x51, - 0xe8, 0xe4, 0x27, 0x02, 0xb5, 0xe1, 0x1c, 0x0d, 0x38, 0x8d, 0x55, 0xa7, 0xb2, 0x0b, 0xec, 0xc2, - 0xe5, 0x06, 0xab, 0x52, 0x8e, 0xdc, 0x7b, 0x8e, 0x6e, 0x15, 0x46, 0x78, 0x6f, 0xdc, 0x2d, 0x4e, - 0x63, 0xe7, 0x01, 0xe5, 0x01, 0xed, 0x07, 0x6c, 0x3a, 0xd8, 0xf7, 0x45, 0xed, 0xab, 0x46, 0x8a, - 0xab, 0x03, 0x17, 0x68, 0x7e, 0x53, 0x5a, 0x9e, 0xef, 0x15, 0x37, 0xd0, 0x27, 0xb0, 0xce, 0x1e, - 0xf2, 0x38, 0xe1, 0xa1, 0x7f, 0xd7, 0xcb, 0xd9, 0x17, 0x67, 0x62, 0x37, 0x7a, 0xad, 0xdc, 0x74, - 0x9c, 0x80, 0x0d, 0x1b, 0x45, 0x95, 0x3e, 0x3d, 0x0a, 0x59, 0x54, 0x82, 0x17, 0xe9, 0x75, 0x0e, - 0x2f, 0x2f, 0xf0, 0x97, 0xb0, 0x59, 0xd3, 0x9f, 0x63, 0x3d, 0xdf, 0x81, 0xed, 0xfc, 0x01, 0x7b, - 0x57, 0x84, 0x49, 0x24, 0x82, 0x80, 0x45, 0x4e, 0x36, 0x15, 0x72, 0xb0, 0x2d, 0x78, 0x91, 0x7a, - 0x5e, 0xc4, 0xe2, 0xbc, 0xae, 0xf9, 0x25, 0x1e, 0xc1, 0x95, 0x29, 0xd6, 0x0a, 0xf3, 0x73, 0x58, - 0x77, 0x27, 0x85, 0x0a, 0x76, 0x7b, 0x02, 0xb6, 0xe6, 0x44, 0x21, 0xd7, 0x1d, 0xe0, 0xaf, 0x15, - 0xb8, 0x13, 0x04, 0x8d, 0xe0, 0xf3, 0x7a, 0x78, 0xff, 0x30, 0x54, 0x9e, 0xfa, 0x60, 0xd3, 0xf3, - 0x5c, 0xfa, 0x5f, 0x79, 0xce, 0xef, 0xa1, 0x7e, 0x5b, 0x3d, 0xd4, 0x07, 0x2c, 0x79, 0x2f, 0x76, - 0x23, 0x71, 0x34, 0x73, 0x97, 0xb9, 0x7a, 0xb0, 0xeb, 0x96, 0x2a, 0xf3, 0x0f, 0x60, 0x95, 0x95, - 0x05, 0xaa, 0xd4, 0x9d, 0x89, 0xac, 0x2b, 0xc6, 0x2a, 0xe3, 0xaa, 0x21, 0xfe, 0x4a, 0x41, 0x3a, - 0x41, 0xa0, 0x85, 0x9c, 0x57, 0x47, 0x7f, 0x37, 0x54, 0x4e, 0xf5, 0x40, 0xcd, 0x39, 0x2d, 0x3d, - 0x57, 0x4e, 0x73, 0xeb, 0xe0, 0xde, 0xa3, 0x15, 0x38, 0x27, 0xa1, 0x51, 0x08, 0xcb, 0xd9, 0x7a, - 0x45, 0x57, 0x26, 0x78, 0xea, 0xfb, 0xdb, 0xc4, 0xd3, 0x54, 0xb2, 0x30, 0xf8, 0xf2, 0x77, 0x7f, - 0xfe, 0xfb, 0xe3, 0xe2, 0x26, 0xba, 0x48, 0xe4, 0xfb, 0x41, 0xb6, 0xad, 0xc7, 0xaf, 0x09, 0xe8, - 0x5b, 0x58, 0x29, 0xcd, 0x11, 0xf4, 0x9a, 0xce, 0xa3, 0x76, 0xa5, 0x9b, 0x37, 0x66, 0x51, 0x55, - 0x10, 0x1b, 0x12, 0xa2, 0x85, 0xd6, 0x88, 0x7a, 0x49, 0x21, 0xc7, 0x1e, 0xf7, 0x4e, 0xd0, 0x08, - 0xd6, 0x4a, 0xea, 0x4e, 0x10, 0xe8, 0x01, 0xb4, 0x0b, 0x5c, 0x0f, 0xa0, 0x5f, 0xc2, 0xb8, 0x25, - 0x01, 0x00, 0x9d, 0xcf, 0x01, 0xd0, 0x31, 0x40, 0x31, 0x78, 0xd1, 0x55, 0x9d, 0xaf, 0xda, 0x20, - 0x37, 0x77, 0x9e, 0xa6, 0xa6, 0xc2, 0x59, 0x32, 0xdc, 0x16, 0xda, 0x18, 0xe7, 0x2b, 0x47, 0x3e, - 0x39, 0x96, 0x3f, 0x27, 0xe8, 0x91, 0x01, 0xad, 0xc9, 0x65, 0x8a, 0x6e, 0x36, 0x3a, 0xaf, 0x2f, - 0x6a, 0xf3, 0xf5, 0xd9, 0x94, 0x1b, 0x79, 0xe4, 0xfe, 0x24, 0xc7, 0xf2, 0x47, 0xf2, 0xac, 0x55, - 0x57, 0x68, 0x53, 0x23, 0x34, 0xbb, 0xb9, 0xa9, 0x11, 0xba, 0x8d, 0x8c, 0x5f, 0x95, 0x24, 0x16, - 0xea, 0xe8, 0x49, 0x88, 0x7b, 0x8f, 0xb9, 0xdf, 0xa0, 0x5f, 0x0c, 0x58, 0xaf, 0x4d, 0x52, 0x44, - 0x1a, 0x4e, 0x5c, 0xd3, 0x96, 0x30, 0xdf, 0x98, 0xdd, 0x40, 0xe1, 0xed, 0x48, 0xbc, 0x6d, 0x64, - 0x8d, 0xf1, 0x8a, 0xb9, 0x9d, 0x42, 0x66, 0x73, 0xf3, 0x04, 0xfd, 0x64, 0x40, 0xbb, 0xe6, 0x25, - 0x3d, 0xbf, 0xa4, 0xe1, 0x50, 0x3e, 0x1b, 0xe3, 0xb4, 0x6d, 0x84, 0x3b, 0x92, 0x71, 0x03, 0xb5, - 0x75, 0x8c, 0xe8, 0x57, 0x03, 0x56, 0x2b, 0xa3, 0x4b, 0x7f, 0xae, 0x1a, 0x76, 0x85, 0xfe, 0x5c, - 0x35, 0xad, 0x07, 0xfc, 0x96, 0x44, 0xd9, 0x45, 0x84, 0xc4, 0x22, 0x8c, 0x6e, 0x71, 0x41, 0xaa, - 0x1f, 0x21, 0xd9, 0xb8, 0xbc, 0xab, 0xbe, 0x45, 0x4a, 0xf5, 0xfb, 0xd9, 0x80, 0x56, 0xc5, 0x65, - 0x5a, 0xbb, 0x9b, 0x0d, 0xa5, 0x98, 0x1d, 0xb4, 0x69, 0xe6, 0xe3, 0x5b, 0x12, 0xf4, 0x1a, 0xba, - 0x3a, 0x13, 0x68, 0xb7, 0xfb, 0xf8, 0xd4, 0x32, 0x9e, 0x9c, 0x5a, 0xc6, 0x3f, 0xa7, 0x96, 0xf1, - 0xc3, 0x99, 0xb5, 0xf0, 0xe4, 0xcc, 0x5a, 0xf8, 0xeb, 0xcc, 0x5a, 0xf8, 0xe2, 0xba, 0xcf, 0x93, - 0x7b, 0xc3, 0xbe, 0xed, 0x8a, 0xc3, 0xaa, 0xab, 0x87, 0x85, 0xb3, 0x64, 0x34, 0x60, 0x71, 0x7f, - 0x59, 0x7e, 0x79, 0xdd, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x25, 0x9a, 0x37, 0x57, 0x0e, - 0x00, 0x00, + // 868 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x4d, 0x6f, 0xdb, 0x36, + 0x18, 0xc7, 0xad, 0x64, 0xc9, 0x12, 0x06, 0x0b, 0x1c, 0xce, 0x71, 0x32, 0xc5, 0xd1, 0x1c, 0x62, + 0xcb, 0xb2, 0x6c, 0x13, 0x97, 0x64, 0xc7, 0x5d, 0xec, 0x19, 0x0b, 0xb6, 0x61, 0x58, 0x66, 0xf4, + 0x54, 0xa0, 0x28, 0x68, 0x89, 0x50, 0xd8, 0xca, 0xa2, 0x23, 0xc9, 0x49, 0x0c, 0x37, 0x97, 0x1e, + 0x0b, 0x14, 0x28, 0xd0, 0x43, 0x6f, 0xfd, 0x00, 0xfd, 0x18, 0x3d, 0xe5, 0x18, 0xa0, 0x97, 0x9e, + 0x8a, 0x22, 0xe9, 0x07, 0x29, 0x44, 0x51, 0x96, 0x65, 0x49, 0x8e, 0xd3, 0xe6, 0x64, 0x91, 0x7c, + 0x5e, 0x7e, 0x0f, 0x1f, 0xf2, 0x4f, 0x83, 0x6f, 0x0c, 0xee, 0x52, 0xcc, 0x4c, 0xea, 0xf8, 0xcc, + 0xef, 0xe1, 0xa3, 0x2e, 0x75, 0x7b, 0x7a, 0xc7, 0xe5, 0x3e, 0x87, 0x5f, 0x05, 0x4b, 0x7a, 0xb4, + 0xa4, 0xae, 0x25, 0x2d, 0x89, 0x61, 0xf0, 0xae, 0xe3, 0x87, 0xb6, 0xea, 0x4a, 0x72, 0xd1, 0x64, + 0xa6, 0x5c, 0x50, 0x93, 0x0b, 0x1d, 0xe2, 0x92, 0xb6, 0x27, 0xd7, 0xb6, 0x0d, 0xee, 0xb5, 0xb9, + 0x87, 0x5b, 0xc4, 0xa3, 0x61, 0x66, 0x7c, 0xbc, 0xd3, 0xa2, 0x3e, 0xd9, 0xc1, 0x1d, 0x62, 0x31, + 0x87, 0xf8, 0x8c, 0x3b, 0xd2, 0xb6, 0x64, 0x71, 0x8b, 0x8b, 0x4f, 0x1c, 0x7c, 0xc9, 0xd9, 0x8a, + 0xc5, 0xb9, 0x65, 0x53, 0x4c, 0x3a, 0x0c, 0x13, 0xc7, 0xe1, 0xbe, 0x70, 0x91, 0xf1, 0x51, 0x09, + 0xc0, 0xff, 0x83, 0xa8, 0x07, 0x22, 0x69, 0x93, 0x1e, 0x75, 0xa9, 0xe7, 0xa3, 0xbf, 0xc1, 0xd7, + 0x89, 0x59, 0xaf, 0xc3, 0x1d, 0x8f, 0xc2, 0x3d, 0x30, 0x1b, 0xc2, 0xad, 0x2a, 0x55, 0x65, 0x6b, + 0x61, 0x77, 0x59, 0x4f, 0x94, 0xaf, 0x87, 0xe6, 0xf5, 0x2f, 0xce, 0xdf, 0x7d, 0x5b, 0x68, 0x4a, + 0x53, 0xa4, 0x03, 0x55, 0xc4, 0xda, 0xa7, 0x7e, 0xe3, 0xaf, 0x46, 0x83, 0x1b, 0xdd, 0x36, 0x75, + 0x7c, 0x99, 0x09, 0x16, 0xc1, 0xb4, 0xc9, 0x4c, 0x11, 0x6f, 0xbe, 0x19, 0x7c, 0x22, 0x02, 0xd6, + 0x32, 0xed, 0x25, 0x43, 0x1d, 0x2c, 0x98, 0xf1, 0xb4, 0x04, 0x51, 0x47, 0x40, 0x86, 0x1c, 0x25, + 0xcd, 0xb0, 0x13, 0x32, 0x25, 0x52, 0xcd, 0xb6, 0x33, 0x90, 0xfe, 0x04, 0x20, 0xde, 0x5a, 0x99, + 0x60, 0x53, 0x0f, 0xfb, 0xa0, 0x07, 0x7d, 0xd0, 0xc3, 0x13, 0x20, 0xfb, 0xa0, 0x1f, 0x10, 0x8b, + 0x4a, 0xdf, 0xe6, 0x90, 0x27, 0x7a, 0xa5, 0xc8, 0x4a, 0x46, 0xd3, 0xe4, 0x55, 0x32, 0x7d, 0xe3, + 0x4a, 0xe0, 0x7e, 0x82, 0x75, 0x4a, 0xb0, 0xfe, 0x70, 0x2d, 0x6b, 0x08, 0x90, 0x80, 0xfd, 0x0d, + 0x54, 0x04, 0x6b, 0x83, 0x99, 0xf5, 0x5e, 0xcd, 0xf6, 0xf8, 0x3f, 0x0e, 0x3f, 0x71, 0x6a, 0xd1, + 0x89, 0x80, 0x25, 0x30, 0x43, 0x6c, 0x46, 0x3c, 0xd9, 0xa9, 0x70, 0x80, 0x0c, 0xb0, 0x9e, 0xe3, + 0x35, 0x54, 0x23, 0x33, 0x3f, 0xa1, 0x5b, 0xb1, 0x13, 0xda, 0x1d, 0x74, 0x8b, 0x11, 0xaf, 0x76, + 0x4c, 0x98, 0x4d, 0x5a, 0x36, 0x1d, 0x0f, 0xf6, 0x24, 0xde, 0xfb, 0xa4, 0x93, 0xe4, 0xaa, 0x80, + 0x79, 0x12, 0x4d, 0x0a, 0xcf, 0xb9, 0x66, 0x3c, 0x01, 0xff, 0x05, 0x4b, 0xf4, 0x94, 0x79, 0x3e, + 0x73, 0xac, 0xfb, 0x66, 0xc4, 0x3e, 0x35, 0x11, 0xbb, 0xd2, 0x2c, 0x46, 0xae, 0x83, 0x02, 0x74, + 0x50, 0x8e, 0x77, 0xe9, 0xbf, 0x13, 0x87, 0xba, 0x43, 0xf0, 0x3c, 0x18, 0x47, 0xf0, 0x62, 0x80, + 0xee, 0x81, 0x95, 0x94, 0xfd, 0x2d, 0xee, 0xe7, 0xef, 0xa0, 0x1a, 0x5d, 0xb0, 0x3f, 0xb8, 0xe3, + 0xbb, 0xdc, 0xb6, 0xa9, 0x5b, 0x0b, 0xa5, 0x2a, 0x02, 0x5b, 0x05, 0x5f, 0x12, 0xd3, 0x74, 0xa9, + 0x17, 0xed, 0x6b, 0x34, 0x44, 0x3d, 0xb0, 0x31, 0xc6, 0x5b, 0x62, 0xde, 0x01, 0x4b, 0xc6, 0xe8, + 0xa2, 0x84, 0xad, 0x8e, 0xc0, 0xa6, 0x82, 0x48, 0xe4, 0x74, 0x00, 0xf4, 0x40, 0x82, 0xd7, 0x6c, + 0x3b, 0x17, 0xfc, 0xb6, 0x2e, 0xef, 0x6b, 0x45, 0xd6, 0x99, 0x9d, 0x6c, 0x7c, 0x9d, 0xd3, 0x9f, + 0x55, 0xe7, 0xad, 0x5d, 0xea, 0xdd, 0xf3, 0x39, 0x30, 0x23, 0x8a, 0x80, 0x0e, 0x98, 0x0d, 0xc5, + 0x19, 0x6e, 0x8c, 0x70, 0xa5, 0xd5, 0x5f, 0x45, 0xe3, 0x4c, 0xc2, 0x34, 0x68, 0xfd, 0xf1, 0x9b, + 0x0f, 0xcf, 0xa7, 0x56, 0xe0, 0x32, 0x16, 0x8f, 0x57, 0xa8, 0xf5, 0x83, 0x37, 0x0c, 0x3e, 0x02, + 0x0b, 0x43, 0xa7, 0x10, 0xfe, 0x98, 0x15, 0x31, 0xf3, 0x41, 0x50, 0xb7, 0x27, 0x31, 0x95, 0x10, + 0x65, 0x01, 0x51, 0x84, 0x8b, 0x58, 0xbe, 0xa0, 0xb8, 0x6f, 0x32, 0xf3, 0x0c, 0xf6, 0xc0, 0xe2, + 0x90, 0x79, 0xcd, 0xb6, 0xb3, 0x01, 0x32, 0xe5, 0x3f, 0x1b, 0x20, 0x5b, 0xc2, 0x51, 0x51, 0x00, + 0x00, 0x38, 0x17, 0x01, 0xc0, 0x3e, 0x00, 0xf1, 0xb5, 0x85, 0xdf, 0x67, 0xc5, 0x4a, 0xc9, 0x80, + 0xba, 0x79, 0x9d, 0x99, 0x4c, 0xa7, 0x89, 0x74, 0xab, 0xb0, 0x3c, 0xa8, 0x57, 0x08, 0x06, 0xee, + 0x8b, 0x9f, 0x33, 0xf8, 0x54, 0x01, 0xc5, 0x51, 0x29, 0x86, 0x3f, 0xe5, 0x06, 0x4f, 0xcb, 0xbc, + 0xfa, 0xf3, 0x64, 0xc6, 0xb9, 0x3c, 0x42, 0x7d, 0x71, 0x5f, 0xfc, 0x08, 0x9e, 0xc5, 0xa4, 0x00, + 0xe7, 0x35, 0x22, 0x43, 0xd9, 0xf3, 0x1a, 0x91, 0xa5, 0xe7, 0xe8, 0x3b, 0x41, 0xa2, 0xc1, 0x4a, + 0x36, 0x09, 0x36, 0x0e, 0xa9, 0xf1, 0x10, 0xbe, 0x54, 0xc0, 0x52, 0xea, 0x1e, 0x42, 0x9c, 0x73, + 0xe2, 0xf2, 0x34, 0x46, 0xfd, 0x75, 0x72, 0x07, 0x89, 0xb7, 0x29, 0xf0, 0xaa, 0x50, 0x1b, 0xe0, + 0xc5, 0xb7, 0x3e, 0x80, 0x0c, 0xb5, 0xf5, 0x0c, 0xbe, 0x50, 0x40, 0x29, 0x15, 0x25, 0x38, 0xbf, + 0x38, 0xe7, 0x50, 0xde, 0x8c, 0x71, 0x9c, 0x96, 0xa1, 0x8a, 0x60, 0x2c, 0xc3, 0x52, 0x16, 0x63, + 0xbd, 0x7e, 0x7e, 0xa9, 0x29, 0x17, 0x97, 0x9a, 0xf2, 0xfe, 0x52, 0x53, 0x9e, 0x5d, 0x69, 0x85, + 0x8b, 0x2b, 0xad, 0xf0, 0xf6, 0x4a, 0x2b, 0xdc, 0xdd, 0xb2, 0x98, 0x7f, 0xd8, 0x6d, 0xe9, 0x06, + 0x6f, 0x63, 0x8f, 0x3b, 0xee, 0x2f, 0x8c, 0x87, 0x11, 0x4e, 0xe3, 0xbf, 0xb4, 0x7e, 0xaf, 0x43, + 0xbd, 0xd6, 0xac, 0xf8, 0xcb, 0xb9, 0xf7, 0x31, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x7e, 0xf3, 0x81, + 0x50, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1100,10 +896,6 @@ type QueryClient interface { ControllerAccount(ctx context.Context, in *QueryGetControllerAccountRequest, opts ...grpc.CallOption) (*QueryGetControllerAccountResponse, error) // ControllerAccountAll queries all ControllerAccount items. ControllerAccountAll(ctx context.Context, in *QueryAllControllerAccountRequest, opts ...grpc.CallOption) (*QueryAllControllerAccountResponse, error) - // EscrowAccount queries a list of EscrowAccount items. - EscrowAccount(ctx context.Context, in *QueryGetEscrowAccountRequest, opts ...grpc.CallOption) (*QueryGetEscrowAccountResponse, error) - // EscrowAccountAll queries all EscrowAccount items. - EscrowAccountAll(ctx context.Context, in *QueryAllEscrowAccountRequest, opts ...grpc.CallOption) (*QueryAllEscrowAccountResponse, error) } type queryClient struct { @@ -1186,24 +978,6 @@ func (c *queryClient) ControllerAccountAll(ctx context.Context, in *QueryAllCont return out, nil } -func (c *queryClient) EscrowAccount(ctx context.Context, in *QueryGetEscrowAccountRequest, opts ...grpc.CallOption) (*QueryGetEscrowAccountResponse, error) { - out := new(QueryGetEscrowAccountResponse) - err := c.cc.Invoke(ctx, "/core.identity.Query/EscrowAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) EscrowAccountAll(ctx context.Context, in *QueryAllEscrowAccountRequest, opts ...grpc.CallOption) (*QueryAllEscrowAccountResponse, error) { - out := new(QueryAllEscrowAccountResponse) - err := c.cc.Invoke(ctx, "/core.identity.Query/EscrowAccountAll", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // QueryServer is the server API for Query service. type QueryServer interface { // Params queries the parameters of the module. @@ -1224,10 +998,6 @@ type QueryServer interface { ControllerAccount(context.Context, *QueryGetControllerAccountRequest) (*QueryGetControllerAccountResponse, error) // ControllerAccountAll queries all ControllerAccount items. ControllerAccountAll(context.Context, *QueryAllControllerAccountRequest) (*QueryAllControllerAccountResponse, error) - // EscrowAccount queries a list of EscrowAccount items. - EscrowAccount(context.Context, *QueryGetEscrowAccountRequest) (*QueryGetEscrowAccountResponse, error) - // EscrowAccountAll queries all EscrowAccount items. - EscrowAccountAll(context.Context, *QueryAllEscrowAccountRequest) (*QueryAllEscrowAccountResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1258,12 +1028,6 @@ func (*UnimplementedQueryServer) ControllerAccount(ctx context.Context, req *Que func (*UnimplementedQueryServer) ControllerAccountAll(ctx context.Context, req *QueryAllControllerAccountRequest) (*QueryAllControllerAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ControllerAccountAll not implemented") } -func (*UnimplementedQueryServer) EscrowAccount(ctx context.Context, req *QueryGetEscrowAccountRequest) (*QueryGetEscrowAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EscrowAccount not implemented") -} -func (*UnimplementedQueryServer) EscrowAccountAll(ctx context.Context, req *QueryAllEscrowAccountRequest) (*QueryAllEscrowAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method EscrowAccountAll not implemented") -} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1413,42 +1177,6 @@ func _Query_ControllerAccountAll_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } -func _Query_EscrowAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetEscrowAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EscrowAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/core.identity.Query/EscrowAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EscrowAccount(ctx, req.(*QueryGetEscrowAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_EscrowAccountAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAllEscrowAccountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).EscrowAccountAll(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/core.identity.Query/EscrowAccountAll", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).EscrowAccountAll(ctx, req.(*QueryAllEscrowAccountRequest)) - } - return interceptor(ctx, in, info, handler) -} - var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "core.identity.Query", HandlerType: (*QueryServer)(nil), @@ -1485,14 +1213,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ControllerAccountAll", Handler: _Query_ControllerAccountAll_Handler, }, - { - MethodName: "EscrowAccount", - Handler: _Query_EscrowAccount_Handler, - }, - { - MethodName: "EscrowAccountAll", - Handler: _Query_EscrowAccountAll_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "core/identity/query.proto", @@ -2049,212 +1769,65 @@ func (m *QueryAllControllerAccountResponse) MarshalToSizedBuffer(dAtA []byte) (i return len(dAtA) - i, nil } -func (m *QueryGetEscrowAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return dAtA[:n], nil -} - -func (m *QueryGetEscrowAccountRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + dAtA[offset] = uint8(v) + return base } - -func (m *QueryGetEscrowAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil + return n } -func (m *QueryGetEscrowAccountResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *QueryGetEscrowAccountResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n } -func (m *QueryGetEscrowAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *QueryGetDIDDocumentRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - { - size, err := m.EscrowAccount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + l = len(m.Did) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil + return n } -func (m *QueryAllEscrowAccountRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *QueryGetDIDDocumentResponse) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *QueryAllEscrowAccountRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + var l int + _ = l + l = m.DIDDocument.Size() + n += 1 + l + sovQuery(uint64(l)) + return n } -func (m *QueryAllEscrowAccountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryAllEscrowAccountResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAllEscrowAccountResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAllEscrowAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.EscrowAccount) > 0 { - for iNdEx := len(m.EscrowAccount) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.EscrowAccount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryGetDIDDocumentRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Did) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetDIDDocumentResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.DIDDocument.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryAllDIDDocumentRequest) Size() (n int) { - if m == nil { - return 0 - } +func (m *QueryAllDIDDocumentRequest) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l if m.Pagination != nil { @@ -2416,62 +1989,6 @@ func (m *QueryAllControllerAccountResponse) Size() (n int) { return n } -func (m *QueryGetEscrowAccountRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetEscrowAccountResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.EscrowAccount.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryAllEscrowAccountRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryAllEscrowAccountResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.EscrowAccount) > 0 { - for _, e := range m.EscrowAccount { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2539,395 +2056,27 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { return ErrIntOverflowQuery } if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetDIDDocumentRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetDIDDocumentRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetDIDDocumentRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Did = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetDIDDocumentResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGetDIDDocumentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetDIDDocumentResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DIDDocument", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.DIDDocument.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllDIDDocumentRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllDIDDocumentRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllDIDDocumentRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryAllDIDDocumentResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAllDIDDocumentResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllDIDDocumentResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DIDDocument", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DIDDocument = append(m.DIDDocument, DIDDocument{}) - if err := m.DIDDocument[len(m.DIDDocument)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + return io.ErrUnexpectedEOF } - iNdEx = postIndex - case 2: + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2954,10 +2103,7 @@ func (m *QueryAllDIDDocumentResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2982,7 +2128,7 @@ func (m *QueryAllDIDDocumentResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDidByAlsoKnownAsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetDIDDocumentRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3005,15 +2151,15 @@ func (m *QueryDidByAlsoKnownAsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDidByAlsoKnownAsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetDIDDocumentRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDidByAlsoKnownAsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetDIDDocumentRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3041,7 +2187,7 @@ func (m *QueryDidByAlsoKnownAsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Alias = string(dAtA[iNdEx:postIndex]) + m.Did = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3064,7 +2210,7 @@ func (m *QueryDidByAlsoKnownAsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDidByAlsoKnownAsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGetDIDDocumentResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3087,15 +2233,15 @@ func (m *QueryDidByAlsoKnownAsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDidByAlsoKnownAsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetDIDDocumentResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDidByAlsoKnownAsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetDIDDocumentResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DidDocument", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DIDDocument", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3122,7 +2268,7 @@ func (m *QueryDidByAlsoKnownAsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.DidDocument.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.DIDDocument.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3147,7 +2293,7 @@ func (m *QueryDidByAlsoKnownAsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAliasAvailableRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllDIDDocumentRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3170,17 +2316,17 @@ func (m *QueryAliasAvailableRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAliasAvailableRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllDIDDocumentRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAliasAvailableRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllDIDDocumentRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3190,23 +2336,27 @@ func (m *QueryAliasAvailableRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Alias = string(dAtA[iNdEx:postIndex]) + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -3229,7 +2379,7 @@ func (m *QueryAliasAvailableRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAliasAvailableResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllDIDDocumentResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3252,17 +2402,17 @@ func (m *QueryAliasAvailableResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAliasAvailableResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllDIDDocumentResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAliasAvailableResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllDIDDocumentResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Available", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DIDDocument", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3272,15 +2422,29 @@ func (m *QueryAliasAvailableResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.Available = bool(v != 0) + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DIDDocument = append(m.DIDDocument, DIDDocument{}) + if err := m.DIDDocument[len(m.DIDDocument)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExistingDocument", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3307,10 +2471,10 @@ func (m *QueryAliasAvailableResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ExistingDocument == nil { - m.ExistingDocument = &DIDDocument{} + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} } - if err := m.ExistingDocument.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3335,7 +2499,7 @@ func (m *QueryAliasAvailableResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDidByOwnerRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDidByAlsoKnownAsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3358,15 +2522,15 @@ func (m *QueryDidByOwnerRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDidByOwnerRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDidByAlsoKnownAsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDidByOwnerRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDidByAlsoKnownAsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3394,7 +2558,7 @@ func (m *QueryDidByOwnerRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Owner = string(dAtA[iNdEx:postIndex]) + m.Alias = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3417,7 +2581,7 @@ func (m *QueryDidByOwnerRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryDidByOwnerResponse) Unmarshal(dAtA []byte) error { +func (m *QueryDidByAlsoKnownAsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3440,10 +2604,10 @@ func (m *QueryDidByOwnerResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryDidByOwnerResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDidByAlsoKnownAsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryDidByOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDidByAlsoKnownAsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3500,7 +2664,7 @@ func (m *QueryDidByOwnerResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetControllerAccountRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAliasAvailableRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3523,15 +2687,15 @@ func (m *QueryGetControllerAccountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetControllerAccountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAliasAvailableRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetControllerAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAliasAvailableRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3559,7 +2723,7 @@ func (m *QueryGetControllerAccountRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.Alias = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3582,7 +2746,7 @@ func (m *QueryGetControllerAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetControllerAccountResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAliasAvailableResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3605,15 +2769,35 @@ func (m *QueryGetControllerAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetControllerAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAliasAvailableResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetControllerAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAliasAvailableResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Available", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Available = bool(v != 0) + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ControllerAccount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExistingDocument", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3640,7 +2824,10 @@ func (m *QueryGetControllerAccountResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.ControllerAccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if m.ExistingDocument == nil { + m.ExistingDocument = &DIDDocument{} + } + if err := m.ExistingDocument.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3665,7 +2852,7 @@ func (m *QueryGetControllerAccountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllControllerAccountRequest) Unmarshal(dAtA []byte) error { +func (m *QueryDidByOwnerRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3688,17 +2875,17 @@ func (m *QueryAllControllerAccountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllControllerAccountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDidByOwnerRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllControllerAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDidByOwnerRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -3708,27 +2895,23 @@ func (m *QueryAllControllerAccountRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Owner = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -3751,7 +2934,7 @@ func (m *QueryAllControllerAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllControllerAccountResponse) Unmarshal(dAtA []byte) error { +func (m *QueryDidByOwnerResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3774,49 +2957,15 @@ func (m *QueryAllControllerAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllControllerAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryDidByOwnerResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllControllerAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryDidByOwnerResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ControllerAccount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ControllerAccount = append(m.ControllerAccount, ControllerAccount{}) - if err := m.ControllerAccount[len(m.ControllerAccount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DidDocument", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3843,10 +2992,7 @@ func (m *QueryAllControllerAccountResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.DidDocument.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3871,7 +3017,7 @@ func (m *QueryAllControllerAccountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetEscrowAccountRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetControllerAccountRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3894,10 +3040,10 @@ func (m *QueryGetEscrowAccountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetEscrowAccountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetControllerAccountRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetEscrowAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetControllerAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3953,7 +3099,7 @@ func (m *QueryGetEscrowAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetEscrowAccountResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGetControllerAccountResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3976,15 +3122,15 @@ func (m *QueryGetEscrowAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetEscrowAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetControllerAccountResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetEscrowAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetControllerAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowAccount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ControllerAccount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4011,7 +3157,7 @@ func (m *QueryGetEscrowAccountResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.EscrowAccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ControllerAccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -4036,7 +3182,7 @@ func (m *QueryGetEscrowAccountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllEscrowAccountRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllControllerAccountRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4059,10 +3205,10 @@ func (m *QueryAllEscrowAccountRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllEscrowAccountRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllControllerAccountRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllEscrowAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllControllerAccountRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4122,7 +3268,7 @@ func (m *QueryAllEscrowAccountRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllEscrowAccountResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllControllerAccountResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4145,15 +3291,15 @@ func (m *QueryAllEscrowAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllEscrowAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllControllerAccountResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllEscrowAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllControllerAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EscrowAccount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ControllerAccount", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4180,8 +3326,8 @@ func (m *QueryAllEscrowAccountResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.EscrowAccount = append(m.EscrowAccount, EscrowAccount{}) - if err := m.EscrowAccount[len(m.EscrowAccount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.ControllerAccount = append(m.ControllerAccount, ControllerAccount{}) + if err := m.ControllerAccount[len(m.ControllerAccount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/identity/types/query.pb.gw.go b/x/identity/types/query.pb.gw.go index 5d5754517..03bbd2372 100644 --- a/x/identity/types/query.pb.gw.go +++ b/x/identity/types/query.pb.gw.go @@ -393,96 +393,6 @@ func local_request_Query_ControllerAccountAll_0(ctx context.Context, marshaler r } -func request_Query_EscrowAccount_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetEscrowAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := client.EscrowAccount(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_EscrowAccount_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetEscrowAccountRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["address"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") - } - - protoReq.Address, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) - } - - msg, err := server.EscrowAccount(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_EscrowAccountAll_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_EscrowAccountAll_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllEscrowAccountRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EscrowAccountAll_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.EscrowAccountAll(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_EscrowAccountAll_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAllEscrowAccountRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_EscrowAccountAll_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.EscrowAccountAll(ctx, &protoReq) - return msg, metadata, err - -} - // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -673,52 +583,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_EscrowAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_EscrowAccount_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EscrowAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EscrowAccountAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_EscrowAccountAll_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EscrowAccountAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -920,46 +784,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_EscrowAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_EscrowAccount_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EscrowAccount_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_EscrowAccountAll_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_EscrowAccountAll_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_EscrowAccountAll_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -979,10 +803,6 @@ var ( pattern_Query_ControllerAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"core", "id", "controllers", "address"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_ControllerAccountAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"core", "id", "controllers"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_EscrowAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"sonr-io", "core", "identity", "escrow_account", "address"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_EscrowAccountAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sonr-io", "core", "identity", "escrow_account"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -1001,8 +821,4 @@ var ( forward_Query_ControllerAccount_0 = runtime.ForwardResponseMessage forward_Query_ControllerAccountAll_0 = runtime.ForwardResponseMessage - - forward_Query_EscrowAccount_0 = runtime.ForwardResponseMessage - - forward_Query_EscrowAccountAll_0 = runtime.ForwardResponseMessage ) diff --git a/x/identity/types/tx.pb.go b/x/identity/types/tx.pb.go index 7de8a2b06..7be7eb324 100644 --- a/x/identity/types/tx.pb.go +++ b/x/identity/types/tx.pb.go @@ -474,336 +474,6 @@ func (m *MsgDeleteControllerAccountResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgDeleteControllerAccountResponse proto.InternalMessageInfo -// MsgCreateEscrowAccount represents a request to create a new escrow account. -type MsgCreateEscrowAccount struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - PublicKey string `protobuf:"bytes,3,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - LockupUsdBalance string `protobuf:"bytes,4,opt,name=lockupUsdBalance,proto3" json:"lockupUsdBalance,omitempty"` -} - -func (m *MsgCreateEscrowAccount) Reset() { *m = MsgCreateEscrowAccount{} } -func (m *MsgCreateEscrowAccount) String() string { return proto.CompactTextString(m) } -func (*MsgCreateEscrowAccount) ProtoMessage() {} -func (*MsgCreateEscrowAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_893033e8c7493d64, []int{8} -} -func (m *MsgCreateEscrowAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateEscrowAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateEscrowAccount.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateEscrowAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateEscrowAccount.Merge(m, src) -} -func (m *MsgCreateEscrowAccount) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateEscrowAccount) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateEscrowAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateEscrowAccount proto.InternalMessageInfo - -func (m *MsgCreateEscrowAccount) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgCreateEscrowAccount) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *MsgCreateEscrowAccount) GetPublicKey() string { - if m != nil { - return m.PublicKey - } - return "" -} - -func (m *MsgCreateEscrowAccount) GetLockupUsdBalance() string { - if m != nil { - return m.LockupUsdBalance - } - return "" -} - -// MsgCreateEscrowAccountResponse represents the response to a create escrow -// account request. -type MsgCreateEscrowAccountResponse struct { - Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Account *EscrowAccount `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` -} - -func (m *MsgCreateEscrowAccountResponse) Reset() { *m = MsgCreateEscrowAccountResponse{} } -func (m *MsgCreateEscrowAccountResponse) String() string { return proto.CompactTextString(m) } -func (*MsgCreateEscrowAccountResponse) ProtoMessage() {} -func (*MsgCreateEscrowAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_893033e8c7493d64, []int{9} -} -func (m *MsgCreateEscrowAccountResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgCreateEscrowAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgCreateEscrowAccountResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgCreateEscrowAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgCreateEscrowAccountResponse.Merge(m, src) -} -func (m *MsgCreateEscrowAccountResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgCreateEscrowAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgCreateEscrowAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgCreateEscrowAccountResponse proto.InternalMessageInfo - -func (m *MsgCreateEscrowAccountResponse) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *MsgCreateEscrowAccountResponse) GetAccount() *EscrowAccount { - if m != nil { - return m.Account - } - return nil -} - -// MsgUpdateEscrowAccount represents a request to update an existing escrow -// account. -type MsgUpdateEscrowAccount struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - PublicKey string `protobuf:"bytes,4,opt,name=publicKey,proto3" json:"publicKey,omitempty"` - LockupUsdBalance string `protobuf:"bytes,5,opt,name=lockupUsdBalance,proto3" json:"lockupUsdBalance,omitempty"` -} - -func (m *MsgUpdateEscrowAccount) Reset() { *m = MsgUpdateEscrowAccount{} } -func (m *MsgUpdateEscrowAccount) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateEscrowAccount) ProtoMessage() {} -func (*MsgUpdateEscrowAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_893033e8c7493d64, []int{10} -} -func (m *MsgUpdateEscrowAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateEscrowAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateEscrowAccount.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateEscrowAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateEscrowAccount.Merge(m, src) -} -func (m *MsgUpdateEscrowAccount) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateEscrowAccount) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateEscrowAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateEscrowAccount proto.InternalMessageInfo - -func (m *MsgUpdateEscrowAccount) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgUpdateEscrowAccount) GetId() uint64 { - if m != nil { - return m.Id - } - return 0 -} - -func (m *MsgUpdateEscrowAccount) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *MsgUpdateEscrowAccount) GetPublicKey() string { - if m != nil { - return m.PublicKey - } - return "" -} - -func (m *MsgUpdateEscrowAccount) GetLockupUsdBalance() string { - if m != nil { - return m.LockupUsdBalance - } - return "" -} - -// MsgUpdateEscrowAccountResponse represents the response to an update escrow -// account request. -type MsgUpdateEscrowAccountResponse struct { -} - -func (m *MsgUpdateEscrowAccountResponse) Reset() { *m = MsgUpdateEscrowAccountResponse{} } -func (m *MsgUpdateEscrowAccountResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateEscrowAccountResponse) ProtoMessage() {} -func (*MsgUpdateEscrowAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_893033e8c7493d64, []int{11} -} -func (m *MsgUpdateEscrowAccountResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateEscrowAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateEscrowAccountResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateEscrowAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateEscrowAccountResponse.Merge(m, src) -} -func (m *MsgUpdateEscrowAccountResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateEscrowAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateEscrowAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateEscrowAccountResponse proto.InternalMessageInfo - -// MsgDeleteEscrowAccount represents a request to delete an escrow account. -type MsgDeleteEscrowAccount struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` -} - -func (m *MsgDeleteEscrowAccount) Reset() { *m = MsgDeleteEscrowAccount{} } -func (m *MsgDeleteEscrowAccount) String() string { return proto.CompactTextString(m) } -func (*MsgDeleteEscrowAccount) ProtoMessage() {} -func (*MsgDeleteEscrowAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_893033e8c7493d64, []int{12} -} -func (m *MsgDeleteEscrowAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDeleteEscrowAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDeleteEscrowAccount.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgDeleteEscrowAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeleteEscrowAccount.Merge(m, src) -} -func (m *MsgDeleteEscrowAccount) XXX_Size() int { - return m.Size() -} -func (m *MsgDeleteEscrowAccount) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeleteEscrowAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDeleteEscrowAccount proto.InternalMessageInfo - -func (m *MsgDeleteEscrowAccount) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgDeleteEscrowAccount) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -// MsgDeleteEscrowAccountResponse represents the response to a delete escrow -// account request. -type MsgDeleteEscrowAccountResponse struct { -} - -func (m *MsgDeleteEscrowAccountResponse) Reset() { *m = MsgDeleteEscrowAccountResponse{} } -func (m *MsgDeleteEscrowAccountResponse) String() string { return proto.CompactTextString(m) } -func (*MsgDeleteEscrowAccountResponse) ProtoMessage() {} -func (*MsgDeleteEscrowAccountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_893033e8c7493d64, []int{13} -} -func (m *MsgDeleteEscrowAccountResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDeleteEscrowAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDeleteEscrowAccountResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgDeleteEscrowAccountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeleteEscrowAccountResponse.Merge(m, src) -} -func (m *MsgDeleteEscrowAccountResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgDeleteEscrowAccountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeleteEscrowAccountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDeleteEscrowAccountResponse proto.InternalMessageInfo - func init() { proto.RegisterType((*MsgRegisterIdentity)(nil), "core.identity.MsgRegisterIdentity") proto.RegisterType((*MsgRegisterIdentityResponse)(nil), "core.identity.MsgRegisterIdentityResponse") @@ -813,60 +483,45 @@ func init() { proto.RegisterType((*MsgUpdateControllerAccountResponse)(nil), "core.identity.MsgUpdateControllerAccountResponse") proto.RegisterType((*MsgDeleteControllerAccount)(nil), "core.identity.MsgDeleteControllerAccount") proto.RegisterType((*MsgDeleteControllerAccountResponse)(nil), "core.identity.MsgDeleteControllerAccountResponse") - proto.RegisterType((*MsgCreateEscrowAccount)(nil), "core.identity.MsgCreateEscrowAccount") - proto.RegisterType((*MsgCreateEscrowAccountResponse)(nil), "core.identity.MsgCreateEscrowAccountResponse") - proto.RegisterType((*MsgUpdateEscrowAccount)(nil), "core.identity.MsgUpdateEscrowAccount") - proto.RegisterType((*MsgUpdateEscrowAccountResponse)(nil), "core.identity.MsgUpdateEscrowAccountResponse") - proto.RegisterType((*MsgDeleteEscrowAccount)(nil), "core.identity.MsgDeleteEscrowAccount") - proto.RegisterType((*MsgDeleteEscrowAccountResponse)(nil), "core.identity.MsgDeleteEscrowAccountResponse") } func init() { proto.RegisterFile("core/identity/tx.proto", fileDescriptor_893033e8c7493d64) } var fileDescriptor_893033e8c7493d64 = []byte{ - // 665 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x96, 0x4f, 0x6b, 0xdb, 0x3e, - 0x18, 0xc7, 0xeb, 0x24, 0xfd, 0x63, 0xf5, 0xf7, 0x2b, 0xc5, 0x85, 0xd6, 0xb8, 0xc5, 0x18, 0xb3, - 0x8e, 0xac, 0xd0, 0x84, 0x75, 0xb0, 0xc3, 0x60, 0x87, 0xb5, 0xd9, 0xa1, 0x6c, 0x85, 0x61, 0xe8, - 0x65, 0x97, 0xce, 0x91, 0x44, 0x2a, 0xea, 0x5a, 0xc6, 0x92, 0x97, 0xf6, 0x1d, 0x0c, 0x76, 0xd9, - 0x69, 0x97, 0xdd, 0xf7, 0x5a, 0x76, 0xec, 0x71, 0xc7, 0xd1, 0xbe, 0x91, 0x61, 0x39, 0xf6, 0x6c, - 0x47, 0x8a, 0x53, 0x72, 0x94, 0xf2, 0x8d, 0xbe, 0xdf, 0xe7, 0xf3, 0x48, 0x0f, 0x06, 0xdb, 0x90, - 0xc6, 0xb8, 0x4f, 0x10, 0x0e, 0x39, 0xe1, 0xb7, 0x7d, 0x7e, 0xd3, 0x8b, 0x62, 0xca, 0xa9, 0xf1, - 0x7f, 0xba, 0xdf, 0xcb, 0xf7, 0xad, 0x9d, 0xaa, 0x0c, 0x11, 0x94, 0xe9, 0xac, 0xdd, 0xea, 0x0f, - 0x3e, 0x84, 0x34, 0x09, 0x79, 0xf6, 0xa3, 0xfb, 0x55, 0x03, 0x5b, 0x67, 0x6c, 0xe4, 0xe1, 0x11, - 0x61, 0x1c, 0xc7, 0xa7, 0x13, 0x95, 0x61, 0x82, 0x55, 0x18, 0x63, 0x9f, 0xd3, 0xd8, 0xd4, 0x1c, - 0xad, 0xab, 0x7b, 0xf9, 0xd2, 0x78, 0x0d, 0xfe, 0x43, 0x04, 0x5d, 0x20, 0x0a, 0x93, 0x6b, 0x1c, - 0x72, 0xb3, 0xe5, 0x68, 0xdd, 0xf5, 0x23, 0xab, 0x57, 0x49, 0xd3, 0x1b, 0x9c, 0x0e, 0x06, 0x13, - 0x85, 0xb7, 0x8e, 0x08, 0xca, 0x17, 0xc6, 0x2e, 0xd0, 0xc7, 0x7e, 0x10, 0x60, 0x7e, 0x41, 0x90, - 0xd9, 0x76, 0xb4, 0x6e, 0xc7, 0x5b, 0xcb, 0x36, 0x4e, 0x91, 0xfb, 0x19, 0xec, 0x4a, 0xc2, 0x78, - 0x98, 0x45, 0x34, 0x64, 0x38, 0x0d, 0xc5, 0x12, 0x08, 0x31, 0x63, 0x22, 0xd4, 0x9a, 0x97, 0x2f, - 0x17, 0x0c, 0xe5, 0x7e, 0xd7, 0x80, 0x75, 0xc6, 0x46, 0x27, 0x69, 0x89, 0xf8, 0x84, 0x86, 0x3c, - 0xa6, 0x41, 0x80, 0xe3, 0x37, 0x19, 0xaa, 0xd4, 0xd7, 0x47, 0x28, 0xce, 0x7d, 0x75, 0x2f, 0x5f, - 0x1a, 0x7b, 0x40, 0x8f, 0x92, 0x61, 0x40, 0xe0, 0x3b, 0x7c, 0x2b, 0xaa, 0xd1, 0xbd, 0x7f, 0x1b, - 0xc6, 0x53, 0xb0, 0xe1, 0x27, 0xfc, 0x32, 0x75, 0x87, 0x29, 0x3b, 0x66, 0x76, 0x9c, 0x76, 0x57, - 0xf7, 0x6a, 0xbb, 0xe9, 0xf9, 0x19, 0x02, 0x66, 0x2e, 0x0b, 0x41, 0xbe, 0x74, 0x23, 0xe0, 0xaa, - 0x73, 0x15, 0x5c, 0x36, 0x40, 0x8b, 0x20, 0x11, 0xad, 0xe3, 0xb5, 0x08, 0x32, 0x5e, 0x81, 0xd5, - 0x49, 0x97, 0x27, 0x20, 0x9c, 0x1a, 0x88, 0xe9, 0xa3, 0xf2, 0x3f, 0xb8, 0x5f, 0x32, 0x14, 0xe7, - 0x11, 0x7a, 0x24, 0x8a, 0x2c, 0x44, 0xab, 0x08, 0xb1, 0x78, 0xf1, 0x9f, 0x44, 0xf1, 0x8a, 0x24, - 0x45, 0xf1, 0xa5, 0x62, 0xb5, 0xc7, 0x16, 0xfb, 0x41, 0xd4, 0x3a, 0xc0, 0x01, 0x56, 0xd4, 0xaa, - 0x78, 0x03, 0x25, 0x0a, 0xad, 0x0a, 0x05, 0xf7, 0x89, 0xc8, 0xac, 0x38, 0x31, 0xcf, 0x9c, 0xde, - 0xb7, 0xed, 0xa2, 0xaf, 0x6f, 0x19, 0x8c, 0xe9, 0x78, 0x01, 0xd3, 0x86, 0x5b, 0x78, 0x00, 0x36, - 0x03, 0x0a, 0xaf, 0x92, 0xe8, 0x9c, 0xa1, 0x63, 0x3f, 0xf0, 0x43, 0x88, 0xcd, 0x8e, 0x10, 0x4d, - 0xed, 0xbb, 0x97, 0xc0, 0x96, 0xe7, 0x52, 0xde, 0xb5, 0x97, 0xf5, 0xbb, 0xb6, 0x57, 0xc3, 0x5f, - 0x3d, 0xa6, 0x40, 0xff, 0x33, 0x43, 0x90, 0x75, 0x77, 0x5e, 0x04, 0xf5, 0x3b, 0x56, 0x42, 0xd2, - 0x9e, 0x81, 0xa4, 0x33, 0x0f, 0x92, 0x65, 0x05, 0x12, 0x47, 0x20, 0x91, 0xe4, 0x2c, 0xba, 0xf9, - 0x5e, 0x54, 0x92, 0xf5, 0x7c, 0xe1, 0x66, 0x4e, 0xfc, 0x24, 0xa7, 0xe5, 0x7e, 0x47, 0x3f, 0x56, - 0x40, 0xfb, 0x8c, 0x8d, 0x8c, 0x21, 0xd8, 0x9c, 0x9a, 0xdb, 0x6e, 0x8d, 0xbe, 0x64, 0x9c, 0x5a, - 0x07, 0xcd, 0x9a, 0xa2, 0xdd, 0x63, 0xb0, 0xa3, 0x9a, 0x8a, 0xcf, 0xa6, 0x8f, 0x51, 0x48, 0xad, - 0xe7, 0x73, 0x4b, 0xcb, 0xc6, 0xaa, 0x19, 0x24, 0x31, 0x56, 0x48, 0x65, 0xc6, 0x4d, 0xf3, 0x64, - 0x0c, 0x76, 0x54, 0x03, 0x41, 0x62, 0xac, 0x90, 0xca, 0x8c, 0x1b, 0x86, 0x82, 0x71, 0x05, 0xb6, - 0x64, 0x03, 0x61, 0x5f, 0xc5, 0xae, 0x22, 0xb3, 0x0e, 0xe7, 0x92, 0x95, 0xcd, 0x64, 0x4f, 0x6f, - 0x5f, 0xc5, 0xab, 0xd1, 0x6c, 0xc6, 0x03, 0x49, 0xcd, 0x64, 0xaf, 0x63, 0x5f, 0xc5, 0xa8, 0xd1, - 0x6c, 0xc6, 0xeb, 0x38, 0x3e, 0xfe, 0x75, 0x6f, 0x6b, 0x77, 0xf7, 0xb6, 0xf6, 0xe7, 0xde, 0xd6, - 0xbe, 0x3d, 0xd8, 0x4b, 0x77, 0x0f, 0xf6, 0xd2, 0xef, 0x07, 0x7b, 0xe9, 0x63, 0x77, 0x44, 0xf8, - 0x65, 0x32, 0xec, 0x41, 0x7a, 0xdd, 0x67, 0x34, 0x8c, 0x0f, 0x09, 0xed, 0x8b, 0x6f, 0xa3, 0x9b, - 0xd2, 0xd7, 0xd5, 0x6d, 0x84, 0xd9, 0x70, 0x45, 0x7c, 0x1c, 0xbd, 0xf8, 0x1b, 0x00, 0x00, 0xff, - 0xff, 0x54, 0xb5, 0x2a, 0xf7, 0x7b, 0x09, 0x00, 0x00, + // 518 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4f, 0x8b, 0xd3, 0x40, + 0x14, 0xef, 0xb4, 0xd5, 0xdd, 0xcc, 0xea, 0x22, 0x11, 0x6c, 0x48, 0x25, 0x84, 0x20, 0x12, 0x05, + 0x53, 0x5c, 0x6f, 0x82, 0x07, 0x77, 0x7b, 0x29, 0x52, 0x90, 0x01, 0x2f, 0x5e, 0xd6, 0x74, 0x66, + 0xc8, 0x0e, 0x64, 0x33, 0x21, 0x33, 0xb1, 0xdb, 0x6f, 0x20, 0x78, 0xf1, 0xe4, 0x67, 0xf2, 0xb8, + 0x07, 0x0f, 0x1e, 0xa5, 0xfd, 0x22, 0x92, 0x49, 0xa7, 0xf6, 0x4f, 0x86, 0xee, 0xb2, 0xc7, 0xf7, + 0xf2, 0xcb, 0xfb, 0xfd, 0x99, 0x99, 0x07, 0x9f, 0x60, 0x5e, 0xd0, 0x01, 0x23, 0x34, 0x93, 0x4c, + 0xce, 0x06, 0xf2, 0x2a, 0xca, 0x0b, 0x2e, 0xb9, 0xfd, 0xb0, 0xea, 0x47, 0xba, 0xef, 0xf6, 0x37, + 0x61, 0x31, 0xc6, 0xbc, 0xcc, 0x64, 0x8d, 0x75, 0x7b, 0x9b, 0x1f, 0x09, 0x23, 0xf5, 0x87, 0xe0, + 0x3b, 0x80, 0x8f, 0xc7, 0x22, 0x41, 0x34, 0x61, 0x42, 0xd2, 0x62, 0xb4, 0x44, 0xd8, 0x0e, 0x3c, + 0xc0, 0x05, 0x8d, 0x25, 0x2f, 0x1c, 0xe0, 0x83, 0xd0, 0x42, 0xba, 0xb4, 0xdf, 0xc1, 0x07, 0x84, + 0x91, 0x73, 0xc2, 0x71, 0x79, 0x49, 0x33, 0xe9, 0xb4, 0x7d, 0x10, 0x1e, 0x9d, 0xb8, 0xd1, 0x86, + 0x9a, 0x68, 0x38, 0x1a, 0x0e, 0x97, 0x08, 0x74, 0x44, 0x18, 0xd1, 0x85, 0xdd, 0x87, 0xd6, 0x34, + 0x4e, 0x53, 0x2a, 0xcf, 0x19, 0x71, 0x3a, 0x3e, 0x08, 0xbb, 0xe8, 0xb0, 0x6e, 0x8c, 0x48, 0xf0, + 0x15, 0xf6, 0x1b, 0xc4, 0x20, 0x2a, 0x72, 0x9e, 0x09, 0x5a, 0x89, 0x12, 0x25, 0xc6, 0x54, 0x08, + 0x25, 0xea, 0x10, 0xe9, 0xf2, 0x8e, 0xa2, 0x82, 0x9f, 0x00, 0xba, 0x63, 0x91, 0x9c, 0x55, 0x16, + 0xe9, 0x19, 0xcf, 0x64, 0xc1, 0xd3, 0x94, 0x16, 0xef, 0xeb, 0x0c, 0x2b, 0xde, 0x98, 0x90, 0x42, + 0xf3, 0x5a, 0x48, 0x97, 0xf6, 0x53, 0x68, 0xe5, 0xe5, 0x24, 0x65, 0xf8, 0x03, 0x9d, 0x29, 0x37, + 0x16, 0xfa, 0xdf, 0xb0, 0x9f, 0xc3, 0xe3, 0xb8, 0x94, 0x17, 0x15, 0x3b, 0xae, 0xb2, 0x13, 0x4e, + 0xd7, 0xef, 0x84, 0x16, 0xda, 0xea, 0x56, 0xf3, 0xeb, 0x08, 0x84, 0x73, 0x4f, 0x01, 0x74, 0x19, + 0xe4, 0x30, 0x30, 0xeb, 0x5a, 0xe5, 0x72, 0x0c, 0xdb, 0x8c, 0x28, 0x69, 0x5d, 0xd4, 0x66, 0xc4, + 0x7e, 0x0b, 0x0f, 0x96, 0xc7, 0xbf, 0x0c, 0xc2, 0xdf, 0x0a, 0x62, 0x77, 0x94, 0xfe, 0x21, 0xf8, + 0x56, 0x47, 0xf1, 0x29, 0x27, 0xb7, 0x8c, 0xa2, 0x16, 0xd1, 0x5e, 0x89, 0xb8, 0xbb, 0xf9, 0x2f, + 0xca, 0xbc, 0x41, 0xc9, 0xca, 0xfc, 0x9a, 0x59, 0x70, 0x5b, 0xb3, 0x1f, 0x95, 0xd7, 0x21, 0x4d, + 0xa9, 0xc1, 0xab, 0xe1, 0x0d, 0xac, 0xa5, 0xd0, 0xde, 0x48, 0x21, 0x78, 0xa6, 0x34, 0x1b, 0x26, + 0x6a, 0xcd, 0x27, 0xbf, 0x3b, 0xb0, 0x33, 0x16, 0x89, 0x3d, 0x81, 0x8f, 0x76, 0x5e, 0x5e, 0xb0, + 0x25, 0xbf, 0xe1, 0x41, 0xb8, 0x2f, 0xf7, 0x63, 0x56, 0xf9, 0x4c, 0x61, 0xcf, 0x74, 0xaf, 0x5f, + 0xec, 0x8e, 0x31, 0x40, 0xdd, 0xd7, 0x37, 0x86, 0xae, 0x13, 0x9b, 0x6e, 0x51, 0x03, 0xb1, 0x01, + 0xda, 0x44, 0xbc, 0xef, 0x46, 0x4c, 0x61, 0xcf, 0x74, 0xa4, 0x0d, 0xc4, 0x06, 0x68, 0x13, 0xf1, + 0x9e, 0x63, 0x3d, 0x3d, 0xfd, 0x35, 0xf7, 0xc0, 0xf5, 0xdc, 0x03, 0x7f, 0xe7, 0x1e, 0xf8, 0xb1, + 0xf0, 0x5a, 0xd7, 0x0b, 0xaf, 0xf5, 0x67, 0xe1, 0xb5, 0x3e, 0x87, 0x09, 0x93, 0x17, 0xe5, 0x24, + 0xc2, 0xfc, 0x72, 0x20, 0x78, 0x56, 0xbc, 0x62, 0x7c, 0xa0, 0x56, 0xf2, 0xd5, 0xda, 0x62, 0x9f, + 0xe5, 0x54, 0x4c, 0xee, 0xab, 0xbd, 0xfc, 0xe6, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x3d, + 0x6a, 0x75, 0xf6, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -889,12 +544,6 @@ type MsgClient interface { UpdateControllerAccount(ctx context.Context, in *MsgUpdateControllerAccount, opts ...grpc.CallOption) (*MsgUpdateControllerAccountResponse, error) // DeleteControllerAccount deletes a controller account. DeleteControllerAccount(ctx context.Context, in *MsgDeleteControllerAccount, opts ...grpc.CallOption) (*MsgDeleteControllerAccountResponse, error) - // CreateEscrowAccount creates a new escrow account. - CreateEscrowAccount(ctx context.Context, in *MsgCreateEscrowAccount, opts ...grpc.CallOption) (*MsgCreateEscrowAccountResponse, error) - // UpdateEscrowAccount updates an existing escrow account. - UpdateEscrowAccount(ctx context.Context, in *MsgUpdateEscrowAccount, opts ...grpc.CallOption) (*MsgUpdateEscrowAccountResponse, error) - // DeleteEscrowAccount deletes an escrow account. - DeleteEscrowAccount(ctx context.Context, in *MsgDeleteEscrowAccount, opts ...grpc.CallOption) (*MsgDeleteEscrowAccountResponse, error) } type msgClient struct { @@ -941,33 +590,6 @@ func (c *msgClient) DeleteControllerAccount(ctx context.Context, in *MsgDeleteCo return out, nil } -func (c *msgClient) CreateEscrowAccount(ctx context.Context, in *MsgCreateEscrowAccount, opts ...grpc.CallOption) (*MsgCreateEscrowAccountResponse, error) { - out := new(MsgCreateEscrowAccountResponse) - err := c.cc.Invoke(ctx, "/core.identity.Msg/CreateEscrowAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateEscrowAccount(ctx context.Context, in *MsgUpdateEscrowAccount, opts ...grpc.CallOption) (*MsgUpdateEscrowAccountResponse, error) { - out := new(MsgUpdateEscrowAccountResponse) - err := c.cc.Invoke(ctx, "/core.identity.Msg/UpdateEscrowAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) DeleteEscrowAccount(ctx context.Context, in *MsgDeleteEscrowAccount, opts ...grpc.CallOption) (*MsgDeleteEscrowAccountResponse, error) { - out := new(MsgDeleteEscrowAccountResponse) - err := c.cc.Invoke(ctx, "/core.identity.Msg/DeleteEscrowAccount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // MsgServer is the server API for Msg service. type MsgServer interface { // RegisterIdentity registers a new identity. @@ -978,12 +600,6 @@ type MsgServer interface { UpdateControllerAccount(context.Context, *MsgUpdateControllerAccount) (*MsgUpdateControllerAccountResponse, error) // DeleteControllerAccount deletes a controller account. DeleteControllerAccount(context.Context, *MsgDeleteControllerAccount) (*MsgDeleteControllerAccountResponse, error) - // CreateEscrowAccount creates a new escrow account. - CreateEscrowAccount(context.Context, *MsgCreateEscrowAccount) (*MsgCreateEscrowAccountResponse, error) - // UpdateEscrowAccount updates an existing escrow account. - UpdateEscrowAccount(context.Context, *MsgUpdateEscrowAccount) (*MsgUpdateEscrowAccountResponse, error) - // DeleteEscrowAccount deletes an escrow account. - DeleteEscrowAccount(context.Context, *MsgDeleteEscrowAccount) (*MsgDeleteEscrowAccountResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -1002,15 +618,6 @@ func (*UnimplementedMsgServer) UpdateControllerAccount(ctx context.Context, req func (*UnimplementedMsgServer) DeleteControllerAccount(ctx context.Context, req *MsgDeleteControllerAccount) (*MsgDeleteControllerAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteControllerAccount not implemented") } -func (*UnimplementedMsgServer) CreateEscrowAccount(ctx context.Context, req *MsgCreateEscrowAccount) (*MsgCreateEscrowAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateEscrowAccount not implemented") -} -func (*UnimplementedMsgServer) UpdateEscrowAccount(ctx context.Context, req *MsgUpdateEscrowAccount) (*MsgUpdateEscrowAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateEscrowAccount not implemented") -} -func (*UnimplementedMsgServer) DeleteEscrowAccount(ctx context.Context, req *MsgDeleteEscrowAccount) (*MsgDeleteEscrowAccountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteEscrowAccount not implemented") -} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -1088,60 +695,6 @@ func _Msg_DeleteControllerAccount_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -func _Msg_CreateEscrowAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateEscrowAccount) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateEscrowAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/core.identity.Msg/CreateEscrowAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateEscrowAccount(ctx, req.(*MsgCreateEscrowAccount)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateEscrowAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateEscrowAccount) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateEscrowAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/core.identity.Msg/UpdateEscrowAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateEscrowAccount(ctx, req.(*MsgUpdateEscrowAccount)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_DeleteEscrowAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDeleteEscrowAccount) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).DeleteEscrowAccount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/core.identity.Msg/DeleteEscrowAccount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DeleteEscrowAccount(ctx, req.(*MsgDeleteEscrowAccount)) - } - return interceptor(ctx, in, info, handler) -} - var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "core.identity.Msg", HandlerType: (*MsgServer)(nil), @@ -1162,18 +715,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "DeleteControllerAccount", Handler: _Msg_DeleteControllerAccount_Handler, }, - { - MethodName: "CreateEscrowAccount", - Handler: _Msg_CreateEscrowAccount_Handler, - }, - { - MethodName: "UpdateEscrowAccount", - Handler: _Msg_UpdateEscrowAccount_Handler, - }, - { - MethodName: "DeleteEscrowAccount", - Handler: _Msg_DeleteEscrowAccount_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "core/identity/tx.proto", @@ -1514,236 +1055,6 @@ func (m *MsgDeleteControllerAccountResponse) MarshalToSizedBuffer(dAtA []byte) ( return len(dAtA) - i, nil } -func (m *MsgCreateEscrowAccount) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateEscrowAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateEscrowAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.LockupUsdBalance) > 0 { - i -= len(m.LockupUsdBalance) - copy(dAtA[i:], m.LockupUsdBalance) - i = encodeVarintTx(dAtA, i, uint64(len(m.LockupUsdBalance))) - i-- - dAtA[i] = 0x22 - } - if len(m.PublicKey) > 0 { - i -= len(m.PublicKey) - copy(dAtA[i:], m.PublicKey) - i = encodeVarintTx(dAtA, i, uint64(len(m.PublicKey))) - i-- - dAtA[i] = 0x1a - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgCreateEscrowAccountResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgCreateEscrowAccountResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgCreateEscrowAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Account != nil { - { - size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateEscrowAccount) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateEscrowAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateEscrowAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.LockupUsdBalance) > 0 { - i -= len(m.LockupUsdBalance) - copy(dAtA[i:], m.LockupUsdBalance) - i = encodeVarintTx(dAtA, i, uint64(len(m.LockupUsdBalance))) - i-- - dAtA[i] = 0x2a - } - if len(m.PublicKey) > 0 { - i -= len(m.PublicKey) - copy(dAtA[i:], m.PublicKey) - i = encodeVarintTx(dAtA, i, uint64(len(m.PublicKey))) - i-- - dAtA[i] = 0x22 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x1a - } - if m.Id != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x10 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateEscrowAccountResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateEscrowAccountResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateEscrowAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgDeleteEscrowAccount) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgDeleteEscrowAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgDeleteEscrowAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgDeleteEscrowAccountResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgDeleteEscrowAccountResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgDeleteEscrowAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -1874,923 +1185,42 @@ func (m *MsgUpdateControllerAccountResponse) Size() (n int) { l = m.Account.Size() n += 1 + l + sovTx(uint64(l)) } - return n -} - -func (m *MsgDeleteControllerAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgDeleteControllerAccountResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgCreateEscrowAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.PublicKey) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.LockupUsdBalance) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgCreateEscrowAccountResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovTx(uint64(m.Id)) - } - if m.Account != nil { - l = m.Account.Size() - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgUpdateEscrowAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - if m.Id != 0 { - n += 1 + sovTx(uint64(m.Id)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.PublicKey) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.LockupUsdBalance) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgUpdateEscrowAccountResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgDeleteEscrowAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgDeleteEscrowAccountResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgRegisterIdentity) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterIdentity: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterIdentity: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DidDocument", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DidDocument == nil { - m.DidDocument = &DIDDocument{} - } - if err := m.DidDocument.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field WalletId", wireType) - } - m.WalletId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.WalletId |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRegisterIdentityResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterIdentityResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterIdentityResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Success = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DidDocument", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DidDocument == nil { - m.DidDocument = &DIDDocument{} - } - if err := m.DidDocument.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateControllerAccount) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateControllerAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateControllerAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authenticators", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authenticators = append(m.Authenticators, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Wallets", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Wallets = append(m.Wallets, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgCreateControllerAccountResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgCreateControllerAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateControllerAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Account == nil { - m.Account = &ControllerAccount{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateControllerAccount) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateControllerAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateControllerAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - m.Id = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Id |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authenticators", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authenticators = append(m.Authenticators, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Wallets", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Wallets = append(m.Wallets, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateControllerAccountResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateControllerAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateControllerAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Account == nil { - m.Account = &ControllerAccount{} - } - if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + return n +} + +func (m *MsgDeleteControllerAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) } + return n +} - if iNdEx > l { - return io.ErrUnexpectedEOF +func (m *MsgDeleteControllerAccountResponse) Size() (n int) { + if m == nil { + return 0 } - return nil + var l int + _ = l + return n } -func (m *MsgDeleteControllerAccount) Unmarshal(dAtA []byte) error { + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgRegisterIdentity) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2813,10 +1243,10 @@ func (m *MsgDeleteControllerAccount) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDeleteControllerAccount: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRegisterIdentity: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeleteControllerAccount: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRegisterIdentity: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2853,9 +1283,9 @@ func (m *MsgDeleteControllerAccount) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field DidDocument", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2865,24 +1295,47 @@ func (m *MsgDeleteControllerAccount) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + if m.DidDocument == nil { + m.DidDocument = &DIDDocument{} + } + if err := m.DidDocument.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WalletId", wireType) + } + m.WalletId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.WalletId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2904,7 +1357,7 @@ func (m *MsgDeleteControllerAccount) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDeleteControllerAccountResponse) Unmarshal(dAtA []byte) error { +func (m *MsgRegisterIdentityResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2927,12 +1380,68 @@ func (m *MsgDeleteControllerAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDeleteControllerAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgRegisterIdentityResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeleteControllerAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgRegisterIdentityResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DidDocument", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DidDocument == nil { + m.DidDocument = &DIDDocument{} + } + if err := m.DidDocument.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2954,7 +1463,7 @@ func (m *MsgDeleteControllerAccountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCreateEscrowAccount) Unmarshal(dAtA []byte) error { +func (m *MsgCreateControllerAccount) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2977,15 +1486,15 @@ func (m *MsgCreateEscrowAccount) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCreateEscrowAccount: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCreateControllerAccount: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateEscrowAccount: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCreateControllerAccount: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3013,11 +1522,11 @@ func (m *MsgCreateEscrowAccount) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Creator = string(dAtA[iNdEx:postIndex]) + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3045,11 +1554,11 @@ func (m *MsgCreateEscrowAccount) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) + m.PublicKey = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Authenticators", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3077,11 +1586,11 @@ func (m *MsgCreateEscrowAccount) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PublicKey = string(dAtA[iNdEx:postIndex]) + m.Authenticators = append(m.Authenticators, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 4: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LockupUsdBalance", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Wallets", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3109,7 +1618,7 @@ func (m *MsgCreateEscrowAccount) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.LockupUsdBalance = string(dAtA[iNdEx:postIndex]) + m.Wallets = append(m.Wallets, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -3132,7 +1641,7 @@ func (m *MsgCreateEscrowAccount) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgCreateEscrowAccountResponse) Unmarshal(dAtA []byte) error { +func (m *MsgCreateControllerAccountResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3155,10 +1664,10 @@ func (m *MsgCreateEscrowAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgCreateEscrowAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgCreateControllerAccountResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgCreateEscrowAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgCreateControllerAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3210,7 +1719,7 @@ func (m *MsgCreateEscrowAccountResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Account == nil { - m.Account = &EscrowAccount{} + m.Account = &ControllerAccount{} } if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -3237,7 +1746,7 @@ func (m *MsgCreateEscrowAccountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateEscrowAccount) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateControllerAccount) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3260,15 +1769,15 @@ func (m *MsgUpdateEscrowAccount) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateEscrowAccount: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateControllerAccount: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateEscrowAccount: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateControllerAccount: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3296,7 +1805,7 @@ func (m *MsgUpdateEscrowAccount) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Creator = string(dAtA[iNdEx:postIndex]) + m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { @@ -3317,41 +1826,9 @@ func (m *MsgUpdateEscrowAccount) Unmarshal(dAtA []byte) error { break } } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Authenticators", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3379,11 +1856,11 @@ func (m *MsgUpdateEscrowAccount) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.PublicKey = string(dAtA[iNdEx:postIndex]) + m.Authenticators = append(m.Authenticators, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LockupUsdBalance", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Wallets", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3411,7 +1888,7 @@ func (m *MsgUpdateEscrowAccount) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.LockupUsdBalance = string(dAtA[iNdEx:postIndex]) + m.Wallets = append(m.Wallets, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -3434,7 +1911,7 @@ func (m *MsgUpdateEscrowAccount) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateEscrowAccountResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateControllerAccountResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3457,12 +1934,48 @@ func (m *MsgUpdateEscrowAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateEscrowAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateControllerAccountResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateEscrowAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateControllerAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Account == nil { + m.Account = &ControllerAccount{} + } + if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -3484,7 +1997,7 @@ func (m *MsgUpdateEscrowAccountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDeleteEscrowAccount) Unmarshal(dAtA []byte) error { +func (m *MsgDeleteControllerAccount) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3507,10 +2020,10 @@ func (m *MsgDeleteEscrowAccount) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDeleteEscrowAccount: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDeleteControllerAccount: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeleteEscrowAccount: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDeleteControllerAccount: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3598,7 +2111,7 @@ func (m *MsgDeleteEscrowAccount) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgDeleteEscrowAccountResponse) Unmarshal(dAtA []byte) error { +func (m *MsgDeleteControllerAccountResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3621,10 +2134,10 @@ func (m *MsgDeleteEscrowAccountResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgDeleteEscrowAccountResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgDeleteControllerAccountResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeleteEscrowAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgDeleteControllerAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/x/service/types/org.pb.go b/x/service/types/org.pb.go deleted file mode 100644 index 64cd5d8bc..000000000 --- a/x/service/types/org.pb.go +++ /dev/null @@ -1,583 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: core/service/org.proto - -package types - -import ( - fmt "fmt" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ServiceOrganization struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Admin string `protobuf:"bytes,2,opt,name=admin,proto3" json:"admin,omitempty"` - ServiceRecords []string `protobuf:"bytes,3,rep,name=service_records,json=serviceRecords,proto3" json:"service_records,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - Tlds []string `protobuf:"bytes,6,rep,name=tlds,proto3" json:"tlds,omitempty"` -} - -func (m *ServiceOrganization) Reset() { *m = ServiceOrganization{} } -func (m *ServiceOrganization) String() string { return proto.CompactTextString(m) } -func (*ServiceOrganization) ProtoMessage() {} -func (*ServiceOrganization) Descriptor() ([]byte, []int) { - return fileDescriptor_16e02270ebb624e0, []int{0} -} -func (m *ServiceOrganization) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceOrganization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ServiceOrganization.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ServiceOrganization) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceOrganization.Merge(m, src) -} -func (m *ServiceOrganization) XXX_Size() int { - return m.Size() -} -func (m *ServiceOrganization) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceOrganization.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceOrganization proto.InternalMessageInfo - -func (m *ServiceOrganization) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *ServiceOrganization) GetAdmin() string { - if m != nil { - return m.Admin - } - return "" -} - -func (m *ServiceOrganization) GetServiceRecords() []string { - if m != nil { - return m.ServiceRecords - } - return nil -} - -func (m *ServiceOrganization) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ServiceOrganization) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *ServiceOrganization) GetTlds() []string { - if m != nil { - return m.Tlds - } - return nil -} - -func init() { - proto.RegisterType((*ServiceOrganization)(nil), "core.service.ServiceOrganization") -} - -func init() { proto.RegisterFile("core/service/org.proto", fileDescriptor_16e02270ebb624e0) } - -var fileDescriptor_16e02270ebb624e0 = []byte{ - // 241 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4b, 0xce, 0x2f, 0x4a, - 0xd5, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0xcf, 0x2f, 0x4a, 0xd7, 0x2b, 0x28, 0xca, - 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0x89, 0xeb, 0x41, 0xc5, 0x95, 0xd6, 0x31, 0x72, 0x09, 0x07, 0x43, - 0xd8, 0xfe, 0x45, 0xe9, 0x89, 0x79, 0x99, 0x55, 0x89, 0x25, 0x99, 0xf9, 0x79, 0x42, 0x7c, 0x5c, - 0x4c, 0x99, 0x29, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x4c, 0x99, 0x29, 0x42, 0x22, 0x5c, - 0xac, 0x89, 0x29, 0xb9, 0x99, 0x79, 0x12, 0x4c, 0x60, 0x21, 0x08, 0x47, 0x48, 0x9d, 0x8b, 0x1f, - 0x6a, 0x50, 0x7c, 0x51, 0x6a, 0x72, 0x7e, 0x51, 0x4a, 0xb1, 0x04, 0xb3, 0x02, 0xb3, 0x06, 0x67, - 0x10, 0x1f, 0x54, 0x38, 0x08, 0x22, 0x2a, 0x24, 0xc4, 0xc5, 0x92, 0x97, 0x98, 0x9b, 0x2a, 0xc1, - 0x02, 0xd6, 0x0d, 0x66, 0x0b, 0x29, 0x70, 0x71, 0xa7, 0xa4, 0x16, 0x27, 0x17, 0x65, 0x16, 0x80, - 0x6c, 0x94, 0x60, 0x05, 0x4b, 0x21, 0x0b, 0x81, 0x74, 0x95, 0xe4, 0xa4, 0x14, 0x4b, 0xb0, 0x81, - 0xcd, 0x04, 0xb3, 0x9d, 0x1c, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, - 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, - 0x3d, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0xbf, 0x38, 0x3f, 0xaf, 0x48, - 0x37, 0x33, 0x5f, 0x1f, 0x1c, 0x06, 0x15, 0xf0, 0x50, 0x28, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, - 0x03, 0x07, 0x84, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xbd, 0x95, 0xf9, 0x72, 0x22, 0x01, 0x00, - 0x00, -} - -func (m *ServiceOrganization) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceOrganization) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceOrganization) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Tlds) > 0 { - for iNdEx := len(m.Tlds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Tlds[iNdEx]) - copy(dAtA[i:], m.Tlds[iNdEx]) - i = encodeVarintOrg(dAtA, i, uint64(len(m.Tlds[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintOrg(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x2a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintOrg(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x22 - } - if len(m.ServiceRecords) > 0 { - for iNdEx := len(m.ServiceRecords) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ServiceRecords[iNdEx]) - copy(dAtA[i:], m.ServiceRecords[iNdEx]) - i = encodeVarintOrg(dAtA, i, uint64(len(m.ServiceRecords[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Admin) > 0 { - i -= len(m.Admin) - copy(dAtA[i:], m.Admin) - i = encodeVarintOrg(dAtA, i, uint64(len(m.Admin))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintOrg(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintOrg(dAtA []byte, offset int, v uint64) int { - offset -= sovOrg(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ServiceOrganization) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovOrg(uint64(l)) - } - l = len(m.Admin) - if l > 0 { - n += 1 + l + sovOrg(uint64(l)) - } - if len(m.ServiceRecords) > 0 { - for _, s := range m.ServiceRecords { - l = len(s) - n += 1 + l + sovOrg(uint64(l)) - } - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovOrg(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovOrg(uint64(l)) - } - if len(m.Tlds) > 0 { - for _, s := range m.Tlds { - l = len(s) - n += 1 + l + sovOrg(uint64(l)) - } - } - return n -} - -func sovOrg(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozOrg(x uint64) (n int) { - return sovOrg(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ServiceOrganization) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOrg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceOrganization: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceOrganization: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOrg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOrg - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOrg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOrg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOrg - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOrg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Admin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceRecords", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOrg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOrg - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOrg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServiceRecords = append(m.ServiceRecords, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOrg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOrg - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOrg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOrg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOrg - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOrg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tlds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOrg - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOrg - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOrg - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tlds = append(m.Tlds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOrg(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOrg - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOrg(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOrg - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOrg - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOrg - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthOrg - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupOrg - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthOrg - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthOrg = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOrg = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupOrg = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/service/types/params.go b/x/service/types/params.go index 144e10d3c..f42799435 100644 --- a/x/service/types/params.go +++ b/x/service/types/params.go @@ -4,7 +4,7 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/go-webauthn/webauthn/protocol" "github.com/go-webauthn/webauthn/protocol/webauthncose" - "github.com/sonr-io/core/pkg/crypto" + "github.com/sonr-io/core/internal/crypto" "gopkg.in/yaml.v2" ) diff --git a/x/service/types/query.pb.go b/x/service/types/query.pb.go index 05af876f3..c18b9641e 100644 --- a/x/service/types/query.pb.go +++ b/x/service/types/query.pb.go @@ -318,39 +318,39 @@ func init() { func init() { proto.RegisterFile("core/service/query.proto", fileDescriptor_5cf4b2348245f9e3) } var fileDescriptor_5cf4b2348245f9e3 = []byte{ - // 500 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xb1, 0x6e, 0x13, 0x41, - 0x10, 0x86, 0x7d, 0x09, 0x58, 0x62, 0x21, 0x02, 0x2d, 0xc6, 0x18, 0x63, 0x8e, 0x70, 0x05, 0x41, - 0x41, 0xdc, 0x2a, 0x46, 0xa2, 0x77, 0x0a, 0x2c, 0xba, 0x70, 0x74, 0x74, 0xeb, 0xf3, 0x72, 0x59, - 0x71, 0xbe, 0xb9, 0xec, 0xae, 0x23, 0x2c, 0x44, 0x13, 0x51, 0x50, 0x22, 0xf1, 0x24, 0xbc, 0x45, - 0xca, 0x48, 0x34, 0x54, 0x08, 0xd9, 0x3c, 0x08, 0xf2, 0xee, 0x00, 0x5e, 0x7c, 0x07, 0x88, 0xce, - 0xf6, 0xff, 0xcf, 0xcc, 0x37, 0x9e, 0x7f, 0x49, 0x27, 0x05, 0x25, 0x98, 0x16, 0xea, 0x58, 0xa6, - 0x82, 0x1d, 0x4d, 0x85, 0x9a, 0xc5, 0xa5, 0x02, 0x03, 0xf4, 0xd2, 0x52, 0x89, 0x51, 0xe9, 0xb6, - 0x32, 0xc8, 0xc0, 0x0a, 0x6c, 0xf9, 0xc9, 0x79, 0xba, 0xbd, 0x0c, 0x20, 0xcb, 0x05, 0xe3, 0xa5, - 0x64, 0xbc, 0x28, 0xc0, 0x70, 0x23, 0xa1, 0xd0, 0xa8, 0xee, 0xa6, 0xa0, 0x27, 0xa0, 0xd9, 0x88, - 0x6b, 0x6c, 0xcd, 0x8e, 0xf7, 0x46, 0xc2, 0xf0, 0x3d, 0x56, 0xf2, 0x4c, 0x16, 0xd6, 0x8c, 0xde, - 0x1b, 0x1e, 0x47, 0xc9, 0x15, 0x9f, 0xe8, 0x4a, 0x49, 0x89, 0x14, 0xd4, 0x18, 0xa5, 0xeb, 0x56, - 0x92, 0x63, 0x51, 0x18, 0x69, 0x66, 0x6c, 0x2c, 0x51, 0x88, 0x5a, 0x84, 0x3e, 0x5d, 0x0e, 0x3c, - 0xb0, 0x8d, 0x12, 0x71, 0x34, 0x15, 0xda, 0x44, 0x4f, 0xc8, 0x55, 0xef, 0x57, 0x5d, 0x42, 0xa1, - 0x05, 0xed, 0x93, 0xa6, 0x1b, 0xd8, 0x09, 0xb6, 0x83, 0x7b, 0x17, 0xfb, 0xad, 0x78, 0x75, 0xf5, - 0xd8, 0xb9, 0xf7, 0xcf, 0x9d, 0x7e, 0xb9, 0xdd, 0x48, 0xd0, 0x19, 0x3d, 0x22, 0x3d, 0xdb, 0x6a, - 0x28, 0xcc, 0x33, 0xe7, 0x4b, 0x2c, 0x18, 0x8e, 0xa2, 0x6d, 0xd2, 0x04, 0x25, 0x33, 0x59, 0xd8, - 0x9e, 0x17, 0x12, 0xfc, 0x16, 0x1d, 0x92, 0x5b, 0x35, 0x75, 0x08, 0x33, 0x24, 0x5b, 0x9e, 0x80, - 0x4c, 0x37, 0x7d, 0x26, 0xcf, 0x82, 0x68, 0x7e, 0x5d, 0xf4, 0x02, 0x09, 0x07, 0x79, 0x5e, 0x49, - 0xf8, 0x98, 0x90, 0x5f, 0x57, 0xc0, 0x29, 0x77, 0x63, 0x77, 0xb2, 0x78, 0x79, 0xb2, 0xd8, 0xa5, - 0x01, 0x4f, 0x16, 0x1f, 0xf0, 0x4c, 0x60, 0x6d, 0xb2, 0x52, 0x19, 0x7d, 0x0c, 0x70, 0xa5, 0xf5, - 0x41, 0xf5, 0x2b, 0x6d, 0xfe, 0xcf, 0x4a, 0x74, 0xe8, 0x21, 0x6f, 0x58, 0xe4, 0x9d, 0xbf, 0x22, - 0x3b, 0x8a, 0x55, 0xe6, 0xfe, 0xdb, 0x4d, 0x72, 0xde, 0x32, 0xd3, 0x97, 0xa4, 0xe9, 0xee, 0x4b, - 0xb7, 0x7d, 0x9c, 0xf5, 0xf8, 0x74, 0xef, 0xfc, 0xc1, 0xe1, 0x86, 0x44, 0xbd, 0x93, 0x4f, 0xdf, - 0x3e, 0x6c, 0xb4, 0x69, 0x8b, 0xd9, 0x64, 0xba, 0xb0, 0xfc, 0xc8, 0x2e, 0x7d, 0x17, 0xfc, 0xf6, - 0x4f, 0xd0, 0xdd, 0x8a, 0x96, 0x35, 0x91, 0xea, 0xde, 0xff, 0x27, 0x2f, 0x82, 0x84, 0x16, 0xa4, - 0x43, 0xdb, 0xcc, 0x7b, 0x3d, 0xaf, 0x5d, 0x0c, 0xdf, 0xd0, 0x93, 0x80, 0x5c, 0xf1, 0x2a, 0x07, - 0x79, 0x5e, 0x49, 0x53, 0x13, 0x9f, 0x4a, 0x9a, 0xba, 0x04, 0x44, 0xd7, 0x2c, 0xcd, 0x65, 0xba, - 0xe5, 0xd1, 0xec, 0x0f, 0x4e, 0xe7, 0x61, 0x70, 0x36, 0x0f, 0x83, 0xaf, 0xf3, 0x30, 0x78, 0xbf, - 0x08, 0x1b, 0x67, 0x8b, 0xb0, 0xf1, 0x79, 0x11, 0x36, 0x9e, 0xef, 0x64, 0xd2, 0x1c, 0x4e, 0x47, - 0x71, 0x0a, 0x13, 0xa6, 0xa1, 0x50, 0x0f, 0x24, 0xb8, 0xd2, 0x57, 0x3f, 0x57, 0x31, 0xb3, 0x52, - 0xe8, 0x51, 0xd3, 0xbe, 0xf7, 0x87, 0xdf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x92, 0x37, 0x06, - 0xc8, 0x04, 0x00, 0x00, + // 502 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0x9b, 0x0d, 0x2a, 0x61, 0x98, 0x40, 0xa6, 0x94, 0x52, 0x4a, 0x18, 0x39, 0x30, 0x34, + 0x44, 0xac, 0x15, 0x89, 0x7b, 0x77, 0xa0, 0xe2, 0x36, 0xc2, 0x8d, 0x9b, 0x9b, 0x9a, 0xcc, 0x22, + 0xcd, 0xcb, 0x6c, 0x77, 0xa2, 0x42, 0x5c, 0x26, 0x0e, 0x1c, 0x91, 0xf8, 0x24, 0x7c, 0x8b, 0x1d, + 0x27, 0x71, 0xe1, 0x84, 0x50, 0xcb, 0x07, 0x41, 0xb5, 0xdf, 0xa0, 0x66, 0x09, 0xa0, 0xdd, 0x92, + 0xf8, 0xff, 0x7f, 0xef, 0xf7, 0xf2, 0xfe, 0x26, 0x9d, 0x14, 0x94, 0x60, 0x5a, 0xa8, 0x43, 0x99, + 0x0a, 0x76, 0x30, 0x15, 0x6a, 0x16, 0x97, 0x0a, 0x0c, 0xd0, 0x2b, 0xcb, 0x93, 0x18, 0x4f, 0xba, + 0x37, 0xad, 0x4e, 0x8e, 0x45, 0x61, 0xa4, 0x99, 0xb1, 0xb1, 0x1c, 0x3b, 0x59, 0xf7, 0x96, 0x57, + 0xa0, 0xe4, 0x8a, 0x4f, 0x74, 0xe5, 0x91, 0x12, 0x29, 0xa8, 0x53, 0xd7, 0x76, 0x0a, 0x7a, 0x02, + 0x9a, 0x8d, 0xb8, 0xc6, 0xae, 0xec, 0x70, 0x67, 0x24, 0x0c, 0xdf, 0x61, 0x25, 0xcf, 0x64, 0xc1, + 0x8d, 0x84, 0x02, 0xb5, 0xad, 0x0c, 0x32, 0xb0, 0x8f, 0x6c, 0xf9, 0x84, 0x5f, 0x7b, 0x19, 0x40, + 0x96, 0x0b, 0xc6, 0x4b, 0xc9, 0x78, 0x51, 0x80, 0xb1, 0x16, 0x6c, 0x1d, 0xb5, 0x08, 0x7d, 0xbe, + 0xac, 0xba, 0x67, 0x79, 0x12, 0x71, 0x30, 0x15, 0xda, 0x44, 0xcf, 0xc8, 0x75, 0xef, 0xab, 0x2e, + 0xa1, 0xd0, 0x82, 0xf6, 0x49, 0xd3, 0x71, 0x77, 0x82, 0xcd, 0xe0, 0xc1, 0xe5, 0x7e, 0x2b, 0x5e, + 0x1d, 0x3d, 0x76, 0xea, 0xdd, 0x0b, 0xc7, 0xdf, 0xee, 0x36, 0x12, 0x54, 0x46, 0x4f, 0x48, 0xcf, + 0x96, 0x1a, 0x0a, 0xf3, 0xc2, 0xe9, 0x12, 0x3b, 0x1f, 0xb6, 0xa2, 0x6d, 0xd2, 0x04, 0x25, 0x33, + 0x59, 0xd8, 0x9a, 0x97, 0x12, 0x7c, 0x8b, 0xf6, 0xc9, 0x9d, 0x1a, 0x1f, 0xc2, 0x0c, 0xc9, 0x86, + 0x77, 0x80, 0x4c, 0xb7, 0x7d, 0x26, 0x4f, 0x82, 0x68, 0xbe, 0x2f, 0x7a, 0x85, 0x84, 0x83, 0x3c, + 0xaf, 0x24, 0x7c, 0x4a, 0xc8, 0xef, 0x5f, 0x8d, 0x5d, 0xee, 0xc7, 0x6e, 0x2f, 0xf1, 0x72, 0x2f, + 0xb1, 0x4b, 0x03, 0xee, 0x25, 0xde, 0xe3, 0x99, 0x40, 0x6f, 0xb2, 0xe2, 0x8c, 0x3e, 0x07, 0x38, + 0xd2, 0xd9, 0x46, 0xf5, 0x23, 0xad, 0x9f, 0x67, 0x24, 0x3a, 0xf4, 0x90, 0xd7, 0x2c, 0xf2, 0xd6, + 0x3f, 0x91, 0x1d, 0xc5, 0x2a, 0x73, 0xff, 0xfd, 0x3a, 0xb9, 0x68, 0x99, 0xe9, 0x6b, 0xd2, 0x74, + 0xfb, 0xa5, 0x9b, 0x3e, 0xce, 0xd9, 0xf8, 0x74, 0xef, 0xfd, 0x45, 0xe1, 0x9a, 0x44, 0xbd, 0xa3, + 0x2f, 0x3f, 0x3e, 0xad, 0xb5, 0x69, 0x8b, 0xd9, 0xec, 0xbb, 0xb0, 0x9c, 0x5e, 0x01, 0xfa, 0x21, + 0xf8, 0xe3, 0x4f, 0xd0, 0xed, 0x8a, 0x92, 0x35, 0x91, 0xea, 0x3e, 0xfc, 0x2f, 0x2d, 0x82, 0x84, + 0x16, 0xa4, 0x43, 0xdb, 0xcc, 0xbb, 0x84, 0x6f, 0x5d, 0x0c, 0xdf, 0xd1, 0xa3, 0x80, 0x5c, 0xf3, + 0x9c, 0x83, 0x3c, 0xaf, 0xa4, 0xa9, 0x89, 0x4f, 0x25, 0x4d, 0x5d, 0x02, 0xa2, 0x1b, 0x96, 0xe6, + 0x2a, 0xdd, 0xf0, 0x68, 0x76, 0x07, 0xc7, 0xf3, 0x30, 0x38, 0x99, 0x87, 0xc1, 0xf7, 0x79, 0x18, + 0x7c, 0x5c, 0x84, 0x8d, 0x93, 0x45, 0xd8, 0xf8, 0xba, 0x08, 0x1b, 0x2f, 0xb7, 0x32, 0x69, 0xf6, + 0xa7, 0xa3, 0x38, 0x85, 0x09, 0xd3, 0x50, 0xa8, 0x47, 0x12, 0x9c, 0xf5, 0xcd, 0xaf, 0x51, 0xcc, + 0xac, 0x14, 0x7a, 0xd4, 0xb4, 0xf7, 0xfd, 0xf1, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe2, 0xc1, + 0x7c, 0xba, 0xc8, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/service/types/record.go b/x/service/types/record.go index ef97531ca..f2f715c5e 100644 --- a/x/service/types/record.go +++ b/x/service/types/record.go @@ -9,6 +9,7 @@ import ( "strings" "github.com/go-webauthn/webauthn/protocol" + "github.com/sonr-io/core/types/webauthn" ) const ( @@ -81,7 +82,7 @@ func (s *ServiceRecord) RelyingPartyEntity() protocol.RelyingPartyEntity { } // VerifyCreationChallenge verifies the challenge and a creation signature and returns an error if it fails to verify -func (vm *ServiceRecord) VerifyCreationChallenge(resp string, chal string) (*Credential, error) { +func (vm *ServiceRecord) VerifyCreationChallenge(resp string, chal string) (*webauthn.Credential, error) { // Get Credential Creation Respons var ccr protocol.CredentialCreationResponse err := json.Unmarshal([]byte(resp), &ccr) @@ -101,7 +102,7 @@ func (vm *ServiceRecord) VerifyCreationChallenge(resp string, chal string) (*Cre } // VeriifyAssertionChallenge verifies the challenge and an assertion signature and returns an error if it fails to verify -func (vm *ServiceRecord) VerifyAssertionChallenge(resp string) (*Credential, error) { +func (vm *ServiceRecord) VerifyAssertionChallenge(resp string) (*webauthn.Credential, error) { var ccr protocol.CredentialAssertionResponse err := json.Unmarshal([]byte(resp), &ccr) if err != nil { diff --git a/x/service/types/record.pb.go b/x/service/types/record.pb.go index e1e77700f..3895139d3 100644 --- a/x/service/types/record.pb.go +++ b/x/service/types/record.pb.go @@ -71,6 +71,7 @@ type ServiceRecord struct { Origins []string `protobuf:"bytes,3,rep,name=origins,proto3" json:"origins,omitempty"` Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` + Category string `protobuf:"bytes,6,opt,name=category,proto3" json:"category,omitempty"` } func (m *ServiceRecord) Reset() { *m = ServiceRecord{} } @@ -141,6 +142,13 @@ func (m *ServiceRecord) GetDescription() string { return "" } +func (m *ServiceRecord) GetCategory() string { + if m != nil { + return m.Category + } + return "" +} + // ServiceRelationship is a relationship between a service and a User entity. // This relation is used to track the number of times a user has interacted with // a service, utilizing a verifiable random function (VRF) to generate a random @@ -218,29 +226,30 @@ func init() { func init() { proto.RegisterFile("core/service/record.proto", fileDescriptor_17bfe358aaf56022) } var fileDescriptor_17bfe358aaf56022 = []byte{ - // 337 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0x41, 0x4f, 0xc2, 0x30, - 0x1c, 0xc5, 0xd7, 0x0d, 0xc4, 0xfd, 0x01, 0xb3, 0x54, 0x0f, 0x33, 0x31, 0xcb, 0xc2, 0x45, 0x62, - 0x22, 0x3b, 0xf8, 0x09, 0xc0, 0x4c, 0xc3, 0x05, 0x4d, 0x47, 0x62, 0xd4, 0x03, 0x81, 0xae, 0x42, - 0x13, 0x68, 0x97, 0x76, 0x18, 0xfd, 0x14, 0xfa, 0xb1, 0x3c, 0x72, 0xf4, 0x68, 0xe0, 0x8b, 0x98, - 0x95, 0x89, 0xdc, 0xde, 0xfb, 0xbd, 0xf6, 0x9f, 0x97, 0x3c, 0x38, 0xa5, 0x52, 0xb1, 0x48, 0x33, - 0xf5, 0xca, 0x29, 0x8b, 0x14, 0xa3, 0x52, 0xa5, 0x9d, 0x4c, 0xc9, 0x5c, 0xe2, 0x46, 0x11, 0x75, - 0xca, 0xa8, 0xf5, 0x81, 0xa0, 0x99, 0x6c, 0x35, 0x31, 0xaf, 0xf0, 0x11, 0xd8, 0x3c, 0xf5, 0x51, - 0x88, 0xda, 0x2e, 0xb1, 0x79, 0x8a, 0x03, 0x00, 0x2a, 0x45, 0xae, 0xe4, 0x7c, 0xce, 0x94, 0x6f, - 0x1b, 0xbe, 0x47, 0xb0, 0x0f, 0x35, 0xa9, 0xf8, 0x94, 0x0b, 0xed, 0x3b, 0xa1, 0xd3, 0x76, 0xc9, - 0x9f, 0xc5, 0x18, 0x2a, 0x62, 0xbc, 0x60, 0x7e, 0xc5, 0xfc, 0x31, 0x1a, 0x87, 0x50, 0x4f, 0x99, - 0xa6, 0x8a, 0x67, 0x39, 0x97, 0xc2, 0xaf, 0x9a, 0x68, 0x1f, 0xb5, 0x9e, 0xe1, 0x78, 0x57, 0x68, - 0x3e, 0x2e, 0x90, 0x9e, 0xf1, 0x0c, 0x9f, 0x81, 0xab, 0xd8, 0x0b, 0x53, 0x4c, 0x50, 0x56, 0xb6, - 0xfb, 0x07, 0xd8, 0x03, 0x27, 0xe5, 0x69, 0xd9, 0xae, 0x90, 0xf8, 0x04, 0xaa, 0x54, 0x2e, 0x45, - 0xee, 0x3b, 0x21, 0x6a, 0x37, 0xc9, 0xd6, 0x5c, 0x24, 0x50, 0xbf, 0x67, 0x6a, 0xc1, 0xb5, 0x2e, - 0xee, 0xe2, 0x3a, 0xd4, 0x12, 0x32, 0xea, 0x75, 0x93, 0xd8, 0xb3, 0x4a, 0x93, 0xf4, 0x6f, 0x07, - 0x1e, 0xc2, 0x0d, 0x38, 0x4c, 0xc8, 0xe8, 0x81, 0xf4, 0x87, 0xb1, 0x67, 0xe3, 0x26, 0xb8, 0x09, - 0x19, 0x5d, 0x93, 0xb8, 0x3b, 0x8c, 0x3d, 0xa7, 0xb4, 0x83, 0xbb, 0x61, 0xff, 0xe6, 0xd1, 0xab, - 0xf4, 0xba, 0x5f, 0xeb, 0x00, 0xad, 0xd6, 0x01, 0xfa, 0x59, 0x07, 0xe8, 0x73, 0x13, 0x58, 0xab, - 0x4d, 0x60, 0x7d, 0x6f, 0x02, 0xeb, 0xe9, 0x7c, 0xca, 0xf3, 0xd9, 0x72, 0xd2, 0xa1, 0x72, 0x11, - 0x69, 0x29, 0xd4, 0x25, 0x97, 0x91, 0x59, 0xe6, 0x6d, 0xb7, 0x4d, 0xfe, 0x9e, 0x31, 0x3d, 0x39, - 0x30, 0xdb, 0x5c, 0xfd, 0x06, 0x00, 0x00, 0xff, 0xff, 0xd7, 0xb9, 0xe3, 0x35, 0xb8, 0x01, 0x00, - 0x00, + // 356 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0x4f, 0x6e, 0xe2, 0x30, + 0x18, 0xc5, 0xe3, 0x84, 0x7f, 0xf9, 0x80, 0x51, 0xe4, 0x99, 0x85, 0x67, 0x34, 0x8a, 0x22, 0x36, + 0x83, 0x46, 0x2a, 0x59, 0xf4, 0x04, 0x50, 0xa5, 0x15, 0x1b, 0x5a, 0x39, 0x48, 0x55, 0xdb, 0x05, + 0x02, 0xc7, 0x05, 0x4b, 0x10, 0x47, 0x76, 0xa8, 0xca, 0x2d, 0x7a, 0x8f, 0x5e, 0xa4, 0x4b, 0x96, + 0x5d, 0x56, 0x70, 0x91, 0x2a, 0x26, 0xa5, 0xec, 0xde, 0xef, 0xbd, 0xcf, 0xd6, 0x93, 0x1e, 0xfc, + 0x66, 0x52, 0xf1, 0x50, 0x73, 0xf5, 0x24, 0x18, 0x0f, 0x15, 0x67, 0x52, 0x25, 0xbd, 0x4c, 0xc9, + 0x5c, 0xe2, 0x56, 0x11, 0xf5, 0xca, 0xa8, 0xf3, 0x8a, 0xa0, 0x1d, 0x1f, 0x34, 0x35, 0x57, 0xf8, + 0x07, 0xd8, 0x22, 0x21, 0x28, 0x40, 0x5d, 0x97, 0xda, 0x22, 0xc1, 0x3e, 0x00, 0x93, 0x69, 0xae, + 0xe4, 0x72, 0xc9, 0x15, 0xb1, 0x8d, 0x7f, 0xe2, 0x60, 0x02, 0x75, 0xa9, 0xc4, 0x5c, 0xa4, 0x9a, + 0x38, 0x81, 0xd3, 0x75, 0xe9, 0x17, 0x62, 0x0c, 0x95, 0x74, 0xba, 0xe2, 0xa4, 0x62, 0xde, 0x18, + 0x8d, 0x03, 0x68, 0x26, 0x5c, 0x33, 0x25, 0xb2, 0x5c, 0xc8, 0x94, 0x54, 0x4d, 0x74, 0x6a, 0xe1, + 0x3f, 0xd0, 0x60, 0xd3, 0x9c, 0xcf, 0xa5, 0xda, 0x90, 0x9a, 0x89, 0x8f, 0xdc, 0x79, 0x80, 0x9f, + 0xc7, 0xb2, 0xcb, 0x69, 0x71, 0xae, 0x17, 0x22, 0xc3, 0x7f, 0xc1, 0x55, 0xfc, 0x91, 0x2b, 0x9e, + 0x32, 0x5e, 0x36, 0xff, 0x36, 0xb0, 0x07, 0x4e, 0x22, 0x92, 0xb2, 0x79, 0x21, 0xf1, 0x2f, 0xa8, + 0x32, 0xb9, 0x4e, 0x73, 0xe2, 0x04, 0xa8, 0xdb, 0xa6, 0x07, 0xf8, 0x1f, 0x43, 0xf3, 0x86, 0xab, + 0x95, 0xd0, 0xba, 0xf8, 0x17, 0x37, 0xa1, 0x1e, 0xd3, 0xc9, 0xa0, 0x1f, 0x47, 0x9e, 0x55, 0x42, + 0x3c, 0xbc, 0x1a, 0x79, 0x08, 0xb7, 0xa0, 0x11, 0xd3, 0xc9, 0x2d, 0x1d, 0x8e, 0x23, 0xcf, 0xc6, + 0x6d, 0x70, 0x63, 0x3a, 0xb9, 0xa0, 0x51, 0x7f, 0x1c, 0x79, 0x4e, 0x89, 0xa3, 0xeb, 0xf1, 0xf0, + 0xf2, 0xce, 0xab, 0x0c, 0xfa, 0x6f, 0x3b, 0x1f, 0x6d, 0x77, 0x3e, 0xfa, 0xd8, 0xf9, 0xe8, 0x65, + 0xef, 0x5b, 0xdb, 0xbd, 0x6f, 0xbd, 0xef, 0x7d, 0xeb, 0xfe, 0xdf, 0x5c, 0xe4, 0x8b, 0xf5, 0xac, + 0xc7, 0xe4, 0x2a, 0xd4, 0x32, 0x55, 0x67, 0x42, 0x86, 0x66, 0xb5, 0xe7, 0xe3, 0x6e, 0xf9, 0x26, + 0xe3, 0x7a, 0x56, 0x33, 0xbb, 0x9d, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x37, 0x0d, 0xe9, 0xb2, + 0xd4, 0x01, 0x00, 0x00, } func (m *ServiceRecord) Marshal() (dAtA []byte, err error) { @@ -263,6 +272,13 @@ func (m *ServiceRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Category) > 0 { + i -= len(m.Category) + copy(dAtA[i:], m.Category) + i = encodeVarintRecord(dAtA, i, uint64(len(m.Category))) + i-- + dAtA[i] = 0x32 + } if len(m.Description) > 0 { i -= len(m.Description) copy(dAtA[i:], m.Description) @@ -384,6 +400,10 @@ func (m *ServiceRecord) Size() (n int) { if l > 0 { n += 1 + l + sovRecord(uint64(l)) } + l = len(m.Category) + if l > 0 { + n += 1 + l + sovRecord(uint64(l)) + } return n } @@ -602,6 +622,38 @@ func (m *ServiceRecord) Unmarshal(dAtA []byte) error { } m.Description = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Category", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRecord + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRecord + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRecord + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Category = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRecord(dAtA[iNdEx:]) diff --git a/x/service/types/utils.go b/x/service/types/utils.go index eefdcfddb..eacc77a99 100644 --- a/x/service/types/utils.go +++ b/x/service/types/utils.go @@ -8,6 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/go-webauthn/webauthn/protocol" + "github.com/sonr-io/core/types/webauthn" "lukechampine.com/blake3" ) @@ -266,19 +267,19 @@ func blake3HashHex(input string) string { // makeCredentialFromCreationData creates a new Credential from a ParsedCredentialCreationData and contains all needed information about a WebAuthn credential for storage. // This is then used to create a VerificationMethod for the DID Document. -func makeCredentialFromCreationData(c *protocol.ParsedCredentialCreationData) *Credential { +func makeCredentialFromCreationData(c *protocol.ParsedCredentialCreationData) *webauthn.Credential { transport := make([]string, 0) for _, t := range c.Response.Transports { transport = append(transport, string(t)) } - newCredential := &Credential{ + newCredential := &webauthn.Credential{ Id: c.Response.AttestationObject.AuthData.AttData.CredentialID, PublicKey: c.Response.AttestationObject.AuthData.AttData.CredentialPublicKey, AttestationType: c.Response.AttestationObject.Format, Transport: transport, - Authenticator: &Authenticator{ + Authenticator: &webauthn.Authenticator{ Aaguid: c.Response.AttestationObject.AuthData.AttData.AAGUID, SignCount: c.Response.AttestationObject.AuthData.Counter, Attachment: string(c.AuthenticatorAttachment), @@ -289,11 +290,11 @@ func makeCredentialFromCreationData(c *protocol.ParsedCredentialCreationData) *C // makeCredentialFromAssertionData creates a new Credential from a ParsedCredentialAssertionData and contains all needed information about a WebAuthn credential for storage. // This is then used to create a VerificationMethod for the DID Document. -func makeCredentialFromAssertionData(c *protocol.ParsedCredentialAssertionData) *Credential { - return &Credential{ +func makeCredentialFromAssertionData(c *protocol.ParsedCredentialAssertionData) *webauthn.Credential { + return &webauthn.Credential{ Id: c.RawID, PublicKey: c.Response.AuthenticatorData.AttData.CredentialPublicKey, - Authenticator: &Authenticator{ + Authenticator: &webauthn.Authenticator{ Aaguid: c.Response.AuthenticatorData.AttData.AAGUID, SignCount: c.Response.AuthenticatorData.Counter, },